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.
  • It is not possible to configure a parallel state within another parallel state.

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

    • Introduction to States of Circuit

      States are the building blocks of a circuit that can perform tasks, make decisions, or simply pass the output from one state to another. The state defines a specific task or process that has to be executed in that segment of the circuit. Circuit ...
    • AD task

      The AD task is used to connect to the Active Directory of the company's network and perform AD operations securely there. The following AD States are available in AD Task: Add AD User Add AD Group Add User to Group Add AD Computer Enable AD User ...
    • Task Engine

      Circuit's Task Engine state is used to connect with other applications and access APIs from a closed space. To retrieve data from a private network, the required API must be accessed from the local machine's network for the required conditions. ...
    • Execution Logs

      A record of all tested executions is maintained in Circuit, allowing you to access and re-run specific executions anytime. Follow these steps to access the execution history of a circuit: Access Execution History Go to the left pane and click on the ...
    • Result Selector and Result Path

      Result Path and Result Selector are employed to extract dynamic data from the state's result when the execution is successful. Result Selector Result Selector lets you retrieve and process the runtime data, enabling flexible and dynamic data ...

    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.