In this example, we have 2 processes, with the first process "Workflow Process 1" containing a Subflow calling the second process "Workflow Process 2".Figure 1: Workflow Process 1 with Subflow to Workflow Process 2
Workflow Process 1 has three declared workflow variable named "status", "name" and "email". We will pass these three variables to Subflow Workflow Process 2.
Figure 2: Workflow Process 2
Workflow Process 2 has three declared workflow variable named "sub_status", "sub_name" and "sub_email". The Subflow will return these three workflow variables to Workflow Process 1.
Maintain the sequence of the fields when passing from parent to subflow process. Both the "status" & "sub_status" field id should be in the first parameter row.
Subflow Properties
Title | Description |
---|---|
Id | Process to be called |
Execution | Synchronous: calls and creates the subflow instance and waits for the subflow process to finish before continuing to the next node in the workflow process |
Subflow Parameters / Actual Parameters | Workflow variables in the subflow process to be mapped with the existing workflow variables in the current workflow process. The number of entries in Subflow Parameters and Actual Parameters should be identical.
|
Example:
In the screenshot above, the subflow process will be executed synchronously. Parameter is set to "In and Out".
Let's walk through the entire process flow chronologically:
- Start of process "Workflow Process 1"
- "Activity 1" started.
- "Activity 1" completed with "status" set to "a".
- Subflow process started. As the parameter is set to "In and Out", the value "a" is now set to "sub_status" of the subflow process.
- "Activity 3" started with "sub_status" initialized to "a".
- "Activity 3" completed with "sub_status" set to "ab".
- "Activity 4" started with "sub_status" initialized to "ab".
- "Activity 4" completed with "sub_status" set to "abc".
- The subflow process has now come to an end. As the parameter is set to "In and Out", the value "abc" is now returned to "status" of the parent process. "Activity 2" started with "status" set to "abc".
Sample app to demonstrate use of parameters in subflow process for Joget Workflow Enterprise v6: APP_process_subflow_parameter.jwa
Related Elements
Attachments:





