Sub Process
SubProcesses in Softyflow allow you to modularize your workflow by calling other processes from within a main process. This enables better organization, reusability, and the ability to run multiple instances in parallel.

The SubProcess element visually represents an embedded process within your workflow, allowing you to create modular, reusable workflow components that simplify complex process designs and improve maintainability. In the process builder, a sub-process is a card with a dashed border; you add one with the last icon of the palette, Create Sub-Process (collapsed).
1. OverviewDirect link to 1. Overview
A SubProcess is a BPMN element that represents the execution of another complete process within the current process flow. When the execution reaches a SubProcess element, Softyflow:
- Pauses the current process: the parent instance waits at the sub-process step, with no task of its own
- Launches the specified SubProcess with the provided variables (one child instance, or one per array item in parallel multi-instance)
- Waits for the SubProcess to complete (every child instance)
- Resumes the parent process with the SubProcess results
2. ConfigurationDirect link to 2. Configuration
2.1. Basic SubProcess ConfigurationDirect link to 2.1. Basic SubProcess Configuration
To configure a SubProcess in the Process Modeler:
- Add the SubProcess Element: Drag Create Sub-Process (collapsed), the last icon of the palette, onto the canvas and connect it like any other step (see Adding and Connecting Components)
- Select the SubProcess Element: Click on the SubProcess element in your BPMN diagram: the panel on the right shows SubProcess with the id of the element, and the Configuration and Input Output tabs
- Configure Sub Process Settings: In the Configuration tab, expand the "Sub Process Configuration" section
- Choose the Process: Select the process you want to execute as a SubProcess from the Sub Process dropdown
- Save the Process: The builder does not save automatically: click Save Process (first button of the rail on the right) or press Ctrl + S
2.2. SubProcess SelectionDirect link to 2.2. SubProcess Selection

This configuration panel is where you choose the process to start. Once multi-instance is enabled (see Configuration), it also shows the Parallel Array field.
The SubProcess dropdown shows all available processes in your project:
- Process names are displayed for easy identification
- Only processes within the same project are available (the list also shows the current process: choose another one)
- The selected process will be executed with the current process variables
- The process to start is fixed: it is not computed from a variable (see Dynamic SubProcess Selection)
3. Variable PassingDirect link to 3. Variable Passing
3.1. Input VariablesDirect link to 3.1. Input Variables
When a SubProcess is launched, each child instance receives:
- All current process variables: A copy of the variable context of the parent process at the sub-process step
- Special variables:
SF_mode: The execution mode (test/uat/prod)SF_version: The version IDSF_initiator: The user whose action reached the sub-process step (the user who started the parent when the step comes right after the start, otherwise the user who validated the previous task)SF_loop_variables: Contains the current array element data in multi-instance execution ({}without a parallel array)SF_loop_index: Contains the current iteration index (0-based) in multi-instance execution
The child instance has its own instance id and number. Use an input parameter of the sub-process step (Input Output tab) to prepare data before the children start, for example to build the array of a parallel multi-instance.
3.2. Output VariablesDirect link to 3.2. Output Variables
What a child instance does never changes the variables of the parent, except one array:
SF_sub_process_res: Each time a child instance ends, its final variables are added to this array of the parent, one entry per child, in the order in which they end (sort the entries bySF_loop_indexwhen the order matters). It is used for a single sub-process too (an array with one entry). The array is never reset: when several sub-process steps run, or the same step runs again, their results are added to it.SF_sub_process_data: Only the name under which a child instance sends its final variables to the parent; the parent does not keep it as a variable. Read the results inSF_sub_process_res.
Read the results in an output parameter of the sub-process step (Input Output tab), which runs once the last child instance has ended, or in a later step.
4. Parallel Multi-Instance ExecutionDirect link to 4. Parallel Multi-Instance Execution
Softyflow supports parallel execution of SubProcesses using BPMN Multi-Instance Loop Characteristics.

The parallel multi-instance configuration transforms a single SubProcess into a powerful parallel processing engine, creating and executing multiple SubProcess instances simultaneously, each processing a different element from your data array.
4.1. ConfigurationDirect link to 4.1. Configuration
- Enable Multi-Instance: Select the SubProcess element, click the wrench (Change type) in its context pad, then the Parallel Multi Instance icon (three vertical bars) at the top of the menu. The three bars appear on the card. The Parallel Array field appears in the Sub Process Configuration section the next time the element is selected: select another element, then the sub-process again. Clicking the icon again removes the three bars and, at the next selection, hides the field, but its value stays active: the engine reads it without looking at the bars, and still starts one child instance per array item. To go back to a single sub-process, first empty Parallel Array, then click the icon and save the process (if the field is already hidden, click the icon and select the element again to bring it back). The other entries of the menu change the step into a Task, a Send Task or a User Task.
- Set Parallel Array: Specify a variable that contains an array of values
- Configure Array Variable: Each array element will be used to start a separate SubProcess instance
4.2. Parallel Array SetupDirect link to 4.2. Parallel Array Setup
In the SubProcess configuration:
- Parallel Array Field: Enter the name of a variable containing an array
- Variable Usage: Each array element becomes available as
SF_loop_variablesin the SubProcess - Index Access: The current array index is available as
SF_loop_index
4.3. Important NotesDirect link to 4.3. Important Notes
- Variable Name Only: Don't use
{{}}or${}syntax in the array field - just the variable name - Array Validation: If the variable is not an array (unknown name, object), Softyflow treats it as a single-element array
[{}]: one child instance starts, withSF_loop_variablesset to{} - Empty Array: An empty array starts no child instance, and the parent waits forever at the step. When the list can be empty, add an exclusive gateway before the sub-process to go around it
- Parallel Execution: All SubProcess instances start at once; the parent goes on when the last one has ended
- Result Collection: Results from all instances are collected in
SF_sub_process_resarray
5. Best PracticesDirect link to 5. Best Practices
Variable NamingDirect link to Variable Naming
- Use clear, descriptive names for SubProcess variables
- Prefix SubProcess-specific variables to avoid conflicts
- Document expected input and output variables
Error HandlingDirect link to Error Handling
- Implement error handling in both parent and SubProcess
- Use timer boundary events on the user tasks of the called process for timeout scenarios (see Timeout Configuration)
- Consider retry mechanisms for failed SubProcess instances
Performance ConsiderationsDirect link to Performance Considerations
- Limit parallel SubProcess instances to avoid resource exhaustion
- Monitor SubProcess execution times
- Use appropriate timeout values for long-running SubProcesses
TestingDirect link to Testing
- Test SubProcesses independently before integration
- Use test mode to validate variable passing
- Verify parallel execution behavior with different array sizes
6. Monitoring and DebuggingDirect link to 6. Monitoring and Debugging
6.1. Instance TrackingDirect link to 6.1. Instance Tracking
Open the parent instance from the Run mode of the project (see Monitor & Run). The page of an instance, redesigned in version 8.6, follows its sub-processes:
- Parent-Child Relationships: The Sub-processes view, in the Follow-up group of the parent instance (shown when the instance started sub-processes, with their number), lists one row per child instance: its Step (the id of the sub-process element), its Activity and its Status. Open the instance opens the child instance. See The Sub-processes View.
- Child Instances of One Step: On the Schema view of the parent, click the sub-process box. The panel that opens has a Sub-process tab, with the number of child instances. It lists the child instances started by the last run of this step, each with its Parent activity (the id of that run), its status and an Open link. The Sub-processes view lists the child instances of all the steps; this tab only shows those of this step.
- Execution Status: On the Schema view of the parent, the sub-process box stays running (orange) until the last child instance has ended. The status shown for a child instance, in the Sub-processes view and in the Sub-process tab, only tells whether it has ended (Running or Ended): it does not show errors. A child instance in error stays Running there and the parent keeps waiting, with nothing in its own Errors view. To see the real status of a child instance, open it (Open the instance): its own status and its Errors view show what happened. Once the cause is fixed, restart it from its own Schema view; when it ends, the parent goes on.
- Restart from here: Since version 8.6, the sub-process box carries the Restart from here button like the other steps that already ran (see Restart From Here). Running the step again starts the sub-process again: a sub-process that is still running is not stopped, a new one starts (the restart card says "The sub-process already started is not stopped: a new one starts.").
- Variable Flow: The Variables view of a child instance shows what it received (
SF_loop_variables,SF_loop_index); the Variables view of the parent showsSF_sub_process_resonce child instances have ended.


6.2. Common IssuesDirect link to 6.2. Common Issues
- Variable Not Found: Ensure the array variable exists and is properly named
- SubProcess Not Starting: Check that a process is chosen in the Sub Process list and, in UAT or Prod, that this process is part of the version of the instance. When a child instance cannot start, there is no error message: no child instance appears (the Sub-processes view is not even shown when none has started) and the parent stays waiting
- Parent Waiting Forever: The parent goes on when the last child instance has ended. Check that the parallel array is not empty, then open each child instance shown as Running (Open the instance): a child instance in error stays Running in the parent, and the parent shows no error. Its own status and its Errors view give the cause; fix it, then restart the child instance from its Schema view (see Restart From Here)
- Performance Issues: Monitor parallel execution limits
- Variable Conflicts: Use unique variable names to avoid overwrites
7. Advanced ConfigurationDirect link to 7. Advanced Configuration
7.1. Conditional SubProcess ExecutionDirect link to 7.1. Conditional SubProcess Execution
Use gateway conditions to execute SubProcesses conditionally:
// Gateway condition example
{{ approvalRequired }} == true && {{ documentType }} == 'contract'
7.2. Dynamic SubProcess SelectionDirect link to 7.2. Dynamic SubProcess Selection
The process started by a sub-process step is the one chosen in its Sub Process dropdown: it cannot be computed from a variable. To start a different process depending on the data, put an exclusive gateway in front of several sub-process steps, one per process:
// Condition of the flow to the "Contract approval" sub-process
documentType == 'contract'
// Condition of the flow to the "Invoice approval" sub-process
documentType == 'invoice'
7.3. Timeout ConfigurationDirect link to 7.3. Timeout Configuration
A timer boundary event cannot be attached to a sub-process step: the builder refuses to save the process ("Timer event can only be attached to user task"). Configure the timeouts in the called process, with timer boundary events on its user tasks:
- Timer Duration: Set appropriate timeout values (Start in, in minutes)
- Timeout Actions: Define what happens when a task of the SubProcess times out (the path that leaves the timer)
- Escalation: Implement escalation procedures for delayed SubProcesses
8. ConclusionDirect link to 8. Conclusion
SubProcesses in Softyflow provide powerful capabilities for:
- Modularization: Breaking complex processes into manageable components
- Reusability: Using the same SubProcess in multiple parent processes
- Parallel Processing: Executing multiple instances simultaneously for improved performance
- Maintainability: Easier updates and testing of individual process components
By following the configuration guidelines and best practices outlined in this documentation, you can effectively leverage SubProcesses to build robust, scalable workflow solutions in Softyflow.