Subflow
The Subflow transformation object is used to call a subflow that will run as part of your dataflow. The subflow acts like a wrapper for the objects it contains. Subflows can be seen as ‘black boxes’ inside your dataflow, simplifying and streamlining the dataflow design, increasing reusability, achieving an easier-to-understand view of your dataflow, and possibly eliminating the need to know what is going on inside the subflow so that you can focus on the output it creates. Over time, if the logic inside your subflow changes, you can modify the subflow, and the modified subflow can now be used by the dataflow calling your subflow.
Subflows can be nested, meaning that a subflow can call other subflows. The output of the subflow can be fed into downstream objects on your dataflow, just like the output of any dataflow object.
To add a Subflow transformation, drag the Subflow object from the Transformations group in the Flow toolbox and drop it on the dataflow.
An example of what a Subflow object might look like is shown below.
To configure the properties of a Subflow object after it was added to the dataflow, right-click on it and select Properties from the context menu. The following properties are available:
Subflow Properties screen:
Enter the file path of your subflow in the path input. Using UNC paths is recommended to allow for remote execution of your dataflow on a server.
General Options screen:
This screen shares the options common to most objects on the dataflow.
Clear Incoming Record Messages
When this option is on, any messages coming in from objects preceding the current object will be cleared. This is useful when you need to capture record messages in the log generated by the current object and filter out any record messages generated earlier in the dataflow.
Do Not Process Records with Errors
When this option is on, records with errors will not be output by the object. When this option is off, records with errors will be output by the object, and a record message will be attached to the record. This record message can then feed into downstream objects on the dataflow, for example a destination file that will capture record messages, or a log that will capture the messages and as well as collect their statistics.
The Comments input allows you to enter comments associated with this object.
Creating a Subflow
Creating a subflow is similar to creating a regular dataflow, because a subflow is essentially a dataflow. The difference between the two, however, is that a subflow may optionally have an input and output. The subflow input makes it possible to feed data into the subflow from an upstream object on the dataflow that calls the subflow. The subflow’s output is used to send data to the downstream dataflow object connected to the subflow.
To create a new subflow, go to File -> New -> Subflow on the main menu. Or you can expand the dropdown on the main toolbar and select Subflow as shown below.
Designing a subflow is similar to designing a dataflow. For more information on working with dataflow, see the Creating Dataflow chapter.
When a subflow tab is active, the flow Toolbox has an additional group Subflow. This group has two objects that control input and output properties of your subflow.
Subflow Input
Subflow Input object is a connector controlling the input layout of your subflow. Any data feeding into the subflow will pass through the Subflow Input when the subflow is called by a dataflow or another subflow.
To add the subflow input, drag the Subflow Input object from the Subflow group in the Flow toolbox and drop it on the subflow.
To configure the properties of a Subflow Input object after it was added to the subflow, right-click on it and select Properties from the context menu. The following properties are available:
Meta Object Builder screen:
Meta Object Builder screen allows you to add or remove fields in the field layout, as well as select their data type. The fields added in Meta Object Builder will show in the SubflowInput1 node inside the object box.
General Options screen:
This screen shares the options common to most objects on the dataflow.
Subflow Output
Subflow Output object is a connector controlling the output layout of your subflow. Any data leaving the subflow will pass through the Subflow Output when the subflow is called by a dataflow or another subflow.
To add the subflow output, drag the Subflow Output object from the Subflow group in the Flow toolbox and drop it on the subflow.
To configure the properties of a Subflow Output object after it was added to the subflow, right-click on it and select Properties from the context menu. The following properties are available:
Meta Object Builder screen:
Meta Object Builder screen allows you to add or remove fields in the field layout, as well as select their data type. The fields added in Meta Object Builder will show in the SubflowOutput1 node inside the object box.
General Options screen:
This screen shares the options common to most objects on the dataflow.
Usage
Some examples of using Subflows are shown below:
0 Comments