RunGraph
Short description
RunGraph functionality has been superseded by jobflow components ExecuteGraph and ExecuteJobflow. These components are more powerful and together with the jobflow functionality allow for more precise control of job execution. |
RunGraph runs CloverDX graphs. Graph names can be specified in the component attribute or received through the input port.
Same input metadata | Sorted inputs | Inputs | Outputs | Each to all outputs[1] | Java | CTL | Auto-propagated metadata |
---|---|---|---|---|---|---|---|
- |
⨯ |
0-1 |
1-2 |
- |
⨯ |
⨯ |
✓ |
Ports
Port type | Number | Required | Description | Metadata |
---|---|---|---|---|
Input |
0 |
⨯ |
For graph names and CloverDX command line arguments. |
|
Output |
0 |
✓ |
For information about a graph execution. |
|
1 |
⨯ |
For information about an unsuccessful graph execution. |
Information about a successful execution of the specified graph is sent to the first output port.
Information about an unsuccessful execution of the specified graph is sent to the second output port.
metadata
Metadata cannot be propagated through the RunGraph component.
The component has metadata templates assigned to all its ports.
Input metadata
Metadata on the input port must have at least 2 fields.
The first two metadata fields must be string
.
Field number | Field name | Data type | Description |
---|---|---|---|
0 |
<anyname1> |
string |
The name of the graph to be executed, including the path. |
1 |
<anyname2> |
string |
CloverDX command line argument. Warning: Arguments sent in this field are ignored when the Same JVM attribute is |
Output metadata
Both output ports must have the same metadata. The metadata on the output ports can have additional fields, the additional fields must be placed after the metadata fields from the template.
Field number | Field name | Data type | Description |
---|---|---|---|
0 |
graph |
string |
The name of the graph to be executed, including the path. |
1 |
result |
string |
Result of the graph execution ( |
2 |
description |
string |
Detailed description of a graph fail. |
3 |
message |
string |
The value of |
4 |
duration |
integer, long, or decimal |
The duration of a graph execution in milliseconds. |
5 |
runId |
long |
Identification of the execution of the graph which runs on CloverDX Server. |
RunGraph attributes
Attribute | Req | Description | Possible values |
---|---|---|---|
Basic |
|||
Graph URL |
The name of one graph, including the path, that should be executed by the component. Information about success or fail is sent to the first or the second output port, respectively. |
||
The same JVM |
By default, the same JVM instance is used to run the specified graphs.
If switched to |
true (default) | false |
|
Graph parameters to pass |
Parameters that are used by executed graphs.
List a sequence separated by a semicolon.
If the attribute The same JVM is switched to |
||
Alternative JVM command |
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 in |
java -cp (default) | other java command |
|
Advanced |
|||
Log file URL |
The name of the file, including the path, containing the log of external processes. The logging will be performed to the specified file independently on the value of the attribute The same JVM.
If The same JVM is set to |
||
Create directories |
If set to |
false (default) | true |
|
Append to log file |
By default, data in the specified log file is overwritten on each graph run. |
false (default) | true |
|
Graph execution class |
Full class name to execute graph(s). |
org.jetel.main.runGraph (default) | other execution class |
|
Command line arguments |
Arguments of a Java command to be executed when running graph(s). |
||
Ignore graph fail |
By default, if the execution of any of the specified graphs fails, the graph with RunGraph (that executes them) fails too.
If this attribute is set to |
false (default) | true |
Details
RunGraph works in two modes. You can define a graph to run using the Graph URL attribute or send it using input edge.
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 cloverCmdLineArgs
component property) are regarded as a space delimited list of arguments which can be quoted.
Moreover, the quote character itself can be escaped by a backslash.
Let us have 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.
Error logging
If the executed graph fails, the caused error message and exception stacktrace are printed out to a standard graph log. If this graph failure caused the parent graph to fail (the Ignore graph fail attribute is false) the caused error message is printed out on ERROR logging level, otherwise on INFO level.
Notes and limitations
RunGraph cannot run a graph with subgraphs in separate JVM.
Details of graphs running in separate JVM cannot be seen in execution view of the component.
Graphs running in separate JVM do not send runId to the output.
Use the Ctrl+double-click shortcut to instantly open the graph. |
Examples
Running a graph using RunGraph
Run graph ProcessInvoices.grf.
Solution
Use the Graph URL attribute to define the graph to be run and do not connect an input edge.
Attribute | Value |
---|---|
Graph URL |
${GRAPH_DIR}/ProcessInvoices.cdf |
Running several graphs using RunGraph
Run several graphs using the RunGraph component.
Solution
Send graph URLs to the RunGraph using the input edge. Do not fill in the attribute Graph URL.
Compatibility
Version | Compatibility Notice |
---|---|
6.4 |
RunGraph was deprecated. Use ExecuteGraph and ExecuteJobflow instead. |