We assume that you have already learned what is described in:
If you want to find the right Other component for your purposes, see Others Comparison.
RunGraph runs CloudConnect graphs.
Component | Same input metadata | Sorted inputs | Inputs | Outputs | Each to all outputs1) | Java | CTL |
---|---|---|---|---|---|---|---|
RunGraph | - | no | 0-1 | 1-2 | - | no | no |
1) Component sends each data record to all connected output ports.
RunGraph executes CloudConnect graphs whose names can be specified in the component attribute or received through the input port.
Port type | Number | Required | Description | Metadata |
---|---|---|---|---|
Input | 0 | no | For graph names and CloudConnect command line arguments | Input Metadata for RunGraph (In-Out Mode) |
Output | 0 | yes | For information about graph execution1) | Output Metadata for RunGraph |
1 | 2) | For information about unsuccessful graph execution | Output Metadata for RunGraph |
Legend:
1): Information about successful execution of the specified graph is sent to the first output port if graph is specified in the component itself, or information about both success and fail is sent to it if the graph(s) is(are) specified on the input port.
2): If the name of a single graph that should be executed is specified in the component itself, the second output port must be connected. Data record is sent to it only if the specified graph fails. If the name(s) of one or more graphs that should be executed are received through input port, second output port does not need to be connected. Information about both success or fail is sent to the first output port only.
Table 57.1. Input Metadata for RunGraph (In-Out Mode)
Field number | Field name | Data type | Description |
---|---|---|---|
0 | <anyname1> | string | Name of the graph to be executed, including path |
1 | <anyname2> | string | CloudConnect command line argument |
Table 57.2. Output Metadata for RunGraph
Field number | Field name | Data type | Description |
---|---|---|---|
0 | graph | string | Name of the graph to be executed, including path |
1 | result | string | Result of graph execution
(Finished OK , Aborted ,
or Error ) |
2 | description | string | Detailed description of graph fail |
3 | message | string | Value of
org.jetel.graph.Result |
4 | duration | integer, long, or decimal | Duration of graph execution in milliseconds |
5 | runID | decimal | Identification of the execution of the graph which runs on CloudConnect Server. |
Attribute | Req | Description | Possible values |
---|---|---|---|
Basic | |||
Graph URL | 1) | Name of one graph, including path, that should be executed by the component. In this case, both output ports must be connected and information about success or fail is sent to the first or the second output port, respectively. (Pipeline mode) | |
The same JVM | By default, the same JVM instance is used to run the
specified graphs. If switched to false , graph(s)
run as external processes. When working in the server environment,
this attribute always has to be true .
| true (default) | false | |
Graph parameters to pass | Parameters that are used by executed graphs.
List a sequence separated by semicolon.
If The same JVM attribute is switched to false ,
this attribute is ignored.
See
Advanced Description for more information.
| ||
Alternative JVM command | 2) | Command line to execute external process.
If you
want to give more memory to individual graphs that should be
run by this RunGraph component, type here
java -Xmx1g -cp or equivalent according to
the maximum memory needed by any of the specified
graphs. | java -cp (default) | other java command |
Advanced | |||
Log file URL | Name of the file, including path, containing the log of
external processes. The logging will be performed to the
specified file independently on the value of The
same JVM attribute. If The same
JVM is set true (the default
setting), logging will also be performed to console. If it is switched to
false , logging to console will not be
performed and logging information will be written to the specified file.
See URL File Dialog.
| ||
Append to log file | 2) | By default, data in the specified log file is overwritten on each graph run. | false (default) | true |
Graph execution class | 2) | Full class name to execute graph(s). | org.jetel.main.runGraph (default) | other execution class |
Command line arguments | 2) | Arguments of Java command to be executed when running graph(s). | |
Ignore graph fail | By default, if the execution of any of the specified
graphs fails (their names are received by RunGraph through the input port),
the graph with RunGraph (that executes them) fails too.
If this attribute is set to true , fail of each executed graph is ignored.
It is also ignored if the graph with RunGraph (that executes one other graph)
is specified in the component itself as
the success information is sent to the first output port and the fail information is sent to the second output port.
| false (default) | true |
Legend:
1): Must be specified if input port is not connected.
2): These attributes are applied only if The same JVM attribute
is set to false
.
Pipeline mode
If the component works in pipeline mode
(without input edge, with the Graph URL attribute specified),
the Command line arguments attribute must
at least specify CloudConnect plugins in the following way: -plugins <plugins of CloudConnect>
In-out mode
If the component works in in-out mode (with input port connected, with empty Graph URL attribute) plugins do not need to be specified in the Command line arguments attribute.
Processing of command line arguments
All command line arguments passed to the RunGraph
component (either as the second field of an input record or as
the cloudconnectCmdLineArgs
component property) are
regarded as a space delimited list of arguments which can be
quoted. Moreover, the quote character itself can be escaped by backslash.
Example 57.1. Working with Quoted Command Line Arguments
Let us have the the following list of arguments:
firstArgument "second argument with spaces" "third argument with spaces and \" a quote"
The resulting command line arguments which will be passed to the child JVM are:
1) firstArgument
2) second argument with spaces
3) third argument with spaces and " a quote
Notice in 2) the argument is actually unquoted. That grants an OS-independent approach and smooth run on all platforms.