When you add a Subtaskflow step, you can embed and reuse an existing taskflow.
You can use a subtaskflow to reuse the same orchestration flow across multiple branches of a taskflow or across different taskflows. You can then invoke the taskflow with different sets of parameters. The subtaskflow is published when you publish its parent taskflow.
When you have a taskflow that contains numerous steps, consider splitting the orchestration logic across multiple smaller taskflows. You can then simplify the design by using the Subtaskflow step to embed the smaller taskflows in the parent taskflow. This not only leads to modular design, but also helps with faster loading when you open the taskflow for editing.
You can define properties for the subtaskflow. The following sections describe the Subtaskflow step properties:
General properties
In the general properties, you can specify a descriptive name for the Subtaskflow step.
The name can contain only alphanumeric characters, underscores (_), spaces, and Unicode characters. The name can't contain curly brackets {}, full width lowline (_), and hyphen (-).
Subtaskflow properties
On the Subtaskflow tab, select the taskflow that you want to embed. Data Integration displays the location, description, input fields, and output fields for the embedded taskflow.
Input Fields
The Input Fields section appears when you add a subtaskflow to the taskflow.
If the taskflow contains parameters that you can override, you can add input fields. You can set properties for an input field to override Data Integration run-time parameters.
Fault handling properties
You can configure the following fault handling properties:
Catch faults
Select this option to enable fault handling for the Subtaskflow step.
By default, this option is not selected.
Fault field name
Required if you select the Catch faults option.
The name of the field that captures the fault information.
Default is faultInfo.
The name can't start with temp.<name>, input.<name>, output.<name>.
Fail taskflow on completion
Defines the behavior when the subtaskflow associated with the Subtaskflow step fails or does not run.
By default, when the subtaskflow associated with the Subtaskflow step fails, the parent taskflow also fails.
To configure a taskflow to fail on its completion when the subtaskflow fails, select the Catch faults option and the If this subtaskflow fails option. To configure a taskflow to fail on its completion when the subtaskflow does not run, select the If this subtaskflow does not run option. In these cases, when the subtaskflow fails or does not run, the taskflow continues running the subsequent steps. However, after the taskflow completes, the taskflow status is set to failed.
Note: If you configure both the Suspend on Fault taskflow advanced property and the Fail taskflow on completion property, the Suspend on Fault property takes precedence. In this case, if the subtaskflow associated with the Subtaskflow step fails or does not run, the taskflow is suspended. The taskflow does not run the subsequent steps after the Subtaskflow step.