- as a global flow variable via the "Workflow Variable Administration" window;
- as a local flow variable via:
- the "Quickform" node
- the "Java Edit Variable" node
- the "TableRow to Variable" node
- the flow variable button in the configuration window
- the unlabelled box in the "Flow Variables" tab in the configuration window
This last way of creating a flow variable on some branch in the middle of a workflow is the least documented one.
Let's make an example. A Row Filter node is extracting all products with a given name, like "brand 1" . After that a second Row Filter node is extracting all products with a similar product name, like "brand 1 discounted".
If the name of the first product never changes, we can use hardcoded settings in the first Row Filter node. We can then transfer the product name into a flow variable, append "discounted" to it and reuse it in the configuration settings of the second Row Filter node.
In the "Flow Variables" tab of the configuration window of each node there is a box without label. This box can be used to create a new flow variable with a specific name and to fill it with the value of the configuration settings it refers to. By filling the box with the new flow variable name, you create a new flow variable with that name and with that setting value (see figure below).
The function of this unlabelled box is equivalent to the function of the "create variable" flag in the flow variable button where this is available.
One of the most common tasks for a workflow is to read a file with the "File Reader" node, make some processing on the data, and write the processed data on a slightly differently named file.
If the file name of the input file does not change, we can use a "File Reader" node with hardcoded settings in the configuration window. We could then move that filename into a flow variable, change it, and reuse it to write the final data. The filename setting from the File Reader node can be transferred into a flow variable by using the unlabeled box of the "Flow Variables" tab of its configuration window.
I hope this post helps clarifying the usage of the mysterious unlabelled box in the "Flow Variables" tab of each node.