You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

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 one declared Workflow Variable named "firstStatus".

Figure 2: Workflow Process 2

Workflow Process 2 has one declared Workflow Variable named "secondStatus".

Subflow Properties

Title

Description

Id

Process to be called

Execution

Synchronous: Calls and create the Subflow instance and waits for the Subflow Process to finish before continuing to the next node in the Workflow Process.
Asynchronous: Calls the Subflow Process and continues on to the next node in the process without waiting.

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.

Id: Workflow Variable ID.
Mode:

  • In: Pass the value from the current Workflow Process's variable to the Subflow Process's variable only upon calling up the Subflow Process.
  • Out: Pass the value from the Subflow Workflow Process's variable to the current Workflow Process's variable only upon completion of the Subflow Process.
  • In and Out: Combination of both above.

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 chronically.

  1. Start of process "Workflow Process 1".
  2. "Activity 1" started.
  3. "Activity 1" completed with "firstStatus" set to "a".
  4. Subflow Process started. As the parameter is set to "In and Out", the value "a" is now set to "secondStatus" of the Subflow process.
  5. "Activity 3" started with "secondStatus" initialized to "a".
  6. "Activity 3" completed with "secondStatus" set to "ab".
  7. "Activity 4" started with "secondStatus" initialized to "ab".
  8. "Activity 4" completed with "secondStatus" set to "abc".
  9. 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 "firstStatus" of the parent process. "Activity 2" started with "firstStatus" set to "abc".
  • No labels