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 "master" 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 "end point" type jumps, Adobe Campaign will use the "end 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 "start point" type jumps, Adobe Campaign will use the "start point" jump with the highest number.If the sub-workflow activity references a workflow with several Jump activities, the sub-workflow is executed between the "end point" type jump with the lowest number and the "start point" type jump with the highest number.For the sub-workflow to be run correctly, you must have only one "end point" type jump with the lowest number, and only one "start point" type jump with the highest number.
- Complete and save this "sub-workflow".
- Create a "master" 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 is still 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 logs are aggregated in the "master" workflow and they are only labelled as "subworkflow".
Indeed, this workflow is only a template. A new sub-workflow based on this template is created when called from the "master" workflow.
Input parameters (optional)
Each inbound event must specify a target defined by these parameters.
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 .