Configure Parallel state in Circuit | Qntrl | Circuit | Online Help

Parallel

Parallel state allows you to process multiple states in parallel and perform simultaneous executions.
 
The executions are initiated at the same time, and their input, output, and results are processed and generated concurrently. Additionally, the states exit only when all parallel tasks execution is completed. You can check the parallel processing from the execution logs after the Circuit has been executed.
 
Example Use Case: In the employee onboarding scenario, once the employee documents have been verified, we can add a state to provision the verified employees within the organization. Provisioning involves executing multiple tasks in parallel, such as adding user details in Active Directory, adding the user to the team's channel, making an entry in the legacy database, and allocating resources. This parallel execution of tasks can be accomplished using the Parallel state, allowing all four tasks to be performed simultaneously.
 
Let us see how to configure the Parallel state in Builder View and Code View.

Builder View

To execute states in parallel, you must configure them as paths in the Parallel state.

  1. In Builder View, drag and drop the Parallel state from the left pane into your circuit or click the required Parallel state in your circuit.

  2. Under the Configurations tab, update the common state field attributes.

  3. In the Path section, click Add Path to insert a state that will serve as the root or starting point for the path. Once the state is added, provide a name for the path in the designated Name field.

  4. In the Input/Output section, you can configure the required paths for a parallel state as discussed in Input & output processing.

      

  • If any path fails, either by an unhandled error or by transitioning to a failure state, the entire Parallel state is considered failed, halting all paths. If the error is not handled by the Parallel state itself, the circuit terminates the execution with an error.
  • The parallel state can only be deleted if all its sub-states have been deleted.

Code View

In Code View, along with the common fields, the paths are also defined with their unique name and root.

Parallel state example:

"Parallel IT Tasks - Employee Provisioning": {
"type": "parallel",
"next": "Onboarded Successfully",
"paths": [
{
"name": "add_ad_user",
"root": "Add User in AD"
},
{
"name": "add_ad_group",
"root": "Add User to AD Group"
},
{
"name": "add_user_db",
"root": "Add User in Legacy Database"
},
{
"name": "add_asset",
"root": "Asset Allocation"
}
]
}




Next : Wait state

    • Related Articles

    • Parallel and Common Transitions

      Parallel Transitions Some workflows require multiple transitions before they can move to the next stage. For example, when a customer purchases your product, several teams might be involved in processing the order, such as Finance, Legal, and Sales. ...
    • Wait

      The Wait state introduces a pause or delay within your circuit, temporarily halting the execution for a specified duration before resuming and progressing to the next state. The delay duration can be configured in seconds. For example, if you set a ...
    • Sample Use Cases

      Payment process In a typical payment process, for every purchase made, a payment link with the invoice will be shared with the purchaser. Upon successful payment, a receipt will be generated; in the event of failure, the entire process will have to ...
    • Other actions in Bridge

      View / Edit Bridge properties Follow the given steps to view or edit the properties of a bridge: Click the settings gear icon located in the left pane. Navigate to Advanced >> Bridge >> choose Bridge. In the Bridge list page, choose the specific ...
    • Branch

      The Branch state allows you to add conditions to the circuit's workflow and execute tasks based on those conditions. It decides the path of execution based on input to this Branch state. This is similar to having an 'If else' or 'switch' case. A ...

    You are currently viewing the help articles of Qntrl 3.0. If you are still using our older version and require guidance with it, Click here.