Description:
Starts a subworkflow from a step - dynamically builds the workflow.
Usage:
Example:
Let’s build and execute the dynamicsubworkflowDef example and pass variables / globals to subworkflows and back.
- Create a new form definition called “dynamicsubworkflowDef”
- Select the definition and click the “design” button
- Drag table, file and submit controls to the canvas and arrange them as shown on the below graphic
- Click on the “File” control to configure its properties. Save the form definition
- Create a new process definition called “dynamicsubworkflowDef”
- Select the definition and click the “design” button
- Define and configure the following variables
- Define and configure the following globals
- Drag and connect the steps on the canvas as shown on the below graphic
- Click on the “updateVariables” step to configure its properties
- Click on the “updateGlobals” step to configure its properties
- Click on the “getFileAttachments” step to configure its properties
- Click on the “dynamicSubworkflow” step to configure its properties
- Configure the following values as shown on the below graphic. The dynamicSubworfklow step uses another process definition to build the workflow dynamically. In this example, the other process definition is created prior to this.
- NOTE: The configurations to pass variables/globals from parent workflow to child and back during run time are optional.
- Click on the "Parent to child variable mapping" and configure the values as shown on the below graphic.
- Click on the "Parent to child global mapping" and configure the values as shown on the below graphic.
- Click on the "Child to Parent variable mapping" and configure the values as shown on the below graphic.
- Click on the "Child to Parent global mapping" and configure the values as shown on the below graphic.
- Save the "dynamicsubworkflowDef" process definition to confirm the changes.
- Create another process definition called “BooleanDef” to be referred by the dynamicSubworkflow step.
- Select the definition and click the “design” button
- Define and configure the following variables
- Drag and connect the steps on the canvas as shown on the below graphic
- Click on the “updateVariables” step to configure its properties
- Click on the “updateGlobals” step to configure its properties
- Click on the “decision” step to configure its properties
- Save the "BooleanDef" process definition.
- Navigate to Create - Form Definition page. Select the above form definition "dynamicsubworkflowDef". Click on View - Execute by params menu option
- Execute the form using the following configuration
- A form instance is created and rendered in a new tab. As per this example, choose 3 files from your local system folders and upload. Click to SUBMIT the form.
- The dynamic subprocess step builds the subworkflow and executes it dynamically.
- In this example, the steps executes the subworkflow dynamically 3 times.