In this example, we have 2 processes, with the first process "Workflow Process 1" containing a Subflow calling the second process "Workflow Process 2".
...
Workflow Process 1 has one declared Workflow Variable workflow variable named "firstStatus".
Figure 2: Workflow Process 2
Workflow Process 2 has one declared Workflow Variable workflow variable named "secondStatus".
Subflow Properties
Title | Description |
---|---|
Id | Process to be called |
Execution | Synchronous: Calls calls and create creates the Subflow subflow instance and waits for the Subflow Process subflow process to finish before continuing to the next node in the Workflow Process. workflow process |
Subflow Parameters / Actual Parameters | Workflow Variables variables in the Subflow subflow process to be mapped with the existing Workflow Variables workflow variables in the current Workflow Processworkflow process. The number of entries in Subflow Parameters and Actual Parameters should be identical.
|
Example:
In the screenshot above, the Subflow Process subflow process will be executed synchronously. Parameter is set to "In and Out".
Let's walk through the entire process flow chronically.chronologically:
- Start of process "Workflow Process 1".
- "Activity 1" started.
- "Activity 1" completed with "firstStatus" set to "a".
- Subflow Process process started. As the parameter is set to "In and Out", the value "a" is now set to "secondStatus" of the Subflow subflow process.
- "Activity 3" started with "secondStatus" initialized to "a".
- "Activity 3" completed with "secondStatus" set to "ab".
- "Activity 4" started with "secondStatus" initialized to "ab".
- "Activity 4" completed with "secondStatus" set to "abc".
- The Subflow Process subflow process has now come to an end. As the parameter is set to "In and Out", the value "abc" is now returned to "firstStatus" of the parent process. "Activity 2" started with "firstStatus" set to "abc".