Flow properties
You can control a variety of flow properties with scripting. To reference flow properties, you must set the execution method to use scripts:
stream = modeler.script.stream() stream.setPropertyValue("execute_method", "Script")
Example
The node property is used to refer to the nodes in the current flow. The following flow script provides an example:
stream = modeler.script.stream() annotation = stream.getPropertyValue("annotation") annotation = annotation + "\n\nThis flow is called \"" + stream.getLabel() + "\" and contains the following nodes:\n" for node in stream.iterator(): annotation = annotation + "\n" + node.getTypeName() + " node called \"" + node.getLabel() + "\"" stream.setPropertyValue("annotation", annotation)
The previous example uses the node property to create a list of all nodes in the flow and write that list in the flow annotations. The annotation produced looks like this:
This flow is called "druglearn" and contains the following nodes: type node called "Define Types" derive node called "Na_to_K" variablefile node called "DRUG1n" neuralnetwork node called "Drug" c50 node called "Drug" filter node called "Discard Fields"
Flow properties are described in the following table.
Property name | Data type | Property description |
---|---|---|
|
|
|
|
|
|
|
number | |
|
number | |
|
|
|
|
flag | |
|
flag | |
|
number | |
|
|
|
|
flag | |
|
flag | |
|
number | |
|
|
|
|
flag | Use to refresh import nodes automatically upon flow execution. |
|
string | |
|
string | |
|
string | This property is read-only. If you want to change the name of a flow, you should save it with a different name. |
|
Use this property to update flow parameters from within a stand-alone script. | |
|
See detailed information that follows. | |
|
|
|
|
boolean | |
|
boolean | |
|
boolean | |
|
boolean | |
|
boolean | |
|
boolean | |
|
boolean | |
|
boolean | |
|
boolean | |
|
boolean | |
|
boolean | |
|
boolean | |
|
integer | |
|
boolean | If true, then flow-specific settings are used, otherwise user preferences are used. |
|
boolean | If true, when a model builder creates a new model, and it has no active update links, a new model applier is added. |
|
|
Defines the type of link created when a model applier node is added automatically. |
|
boolean | If true, when a source builder creates a new source output, and it has no active update links, a new import node is added. |
|
|
Defines the type of link created when an import node is added automatically. |
|
boolean | If true, applies a coordinate system to the entire flow. |
|
string | The name of the selected projected coordinate system. |
|
|
Choose how you want to deploy the flow. If this value is set to
, no other deployment entries are used. |
|
string | Choose the scoring branch in the flow. It can be any terminal node in the flow. |
|
string | Choose the nugget in the scoring branch. |
|
string | Choose the modeling node in the flow. |