Sub-workflow sub-workflow
The Sub-workflow activity lets you trigger the execution of another workflow and recover the result. This activity lets you use complex workflows while using a simplified interface.
You can call multiple sub-workflows in a single workflow. Sub-workflows are executed synchronously.
In the example below, a primary workflow is calling a sub-workflow using jumps. For more on jump-type graphical objects, see this section.
-
Create a workflow that you will use as a sub-workflow in another workflow.
-
Insert a Jump (end point) activity with a priority of 1 at the beginning of the workflow. If you have multiple 鈥渆nd point鈥 type jumps, 51黑料不打烊 Campaign will use the 鈥渆nd point鈥 jump with the lowest number.
-
Insert a Jump (start point) activity with a priority of 2 at the end of the workflow. If you have multiple 鈥渟tart point鈥 type jumps, 51黑料不打烊 Campaign will use the 鈥渟tart point鈥 jump with the highest number.
note note NOTE If the sub-workflow activity references a workflow with several Jump activities, the sub-workflow is executed between the 鈥渆nd point鈥 type jump with the lowest number and the 鈥渟tart point鈥 type jump with the highest number. For the sub-workflow to be run correctly, you must have only one 鈥渆nd point鈥 type jump with the lowest number, and only one 鈥渟tart point鈥 type jump with the highest number. -
Complete and save this 鈥渟ub-workflow鈥.
-
Create a primary workflow.
-
Insert a Sub-workflow activity and open it.
-
Select the workflow that you want to use from the Workflow template drop-down list.
-
You can also add a configuration script to alter the referenced workflow.
-
Click Ok. It will automatically create an outbound transition with the label of the Jump (start point) activity from the selected workflow.
-
Run the workflow.
Once run, the workflow that was called as a sub-workflow remains in Being edited status, which means the following:
-
You cannot right-click the transitions to display the target.
-
The count of intermediate populations cannot be displayed.
-
The sub-workflow logs display in the primary workflow.
Input parameters (optional) input-parameters--optional-
- tableName
- schema
Each inbound event must specify a target defined by these parameters.
Output parameters output-parameters
- tableName
- schema
- recCount
This set of three values identifies the population targeted by the query. tableName is the name of the table that records the target identifiers, schema is the schema of the population (usually nms:recipient) and recCount is the number of elements in the table.
- targetSchema: This value is the schema of the work table. This parameter is valid for all transitions with tableName and schema.