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

Pass

The Pass state serves the purpose of forwarding data to the next specified state.  It allows you to pass the input data as-is or include supplementary information if needed during the process. To put it differently, with this state, you can insert new data or make changes (or manipulations) to the input JSON data by configuring the Input path, Output path, or Result path fields as discussed in the Input & Output processing section.
 
Besides the common fields, Pass state also has an additional Result field, which is not available in any other states. This field is used to insert a new object into the input JSON data and pass the modified JSON data as the input to the next state. The path of the new object added to the input is to be defined in the Result Path. If the Result Path and Result are not specified in the circuit, the state simply passes the input data as such to the next state.  
 
Use case Example: Let's consider the use case of automating IT tasks involved in the employee onboarding process. In this scenario, the HR department supplies the new employee details as an input JSON to the Circuit, which includes attributes like name, date of birth, and role. Now, the HR department wants to augment the input JSON with additional data, like the employee's work location, and then pass this modified input to the next state in the process.
 
To achieve this, the path for the new attribute to be added in the input JSON has to be specified in the Result Path field, which is represented as '$.key'(Ex: $.location) and the corresponding value for the new attribute has to be specified in the Result field. As a result, the modified JSON input to the next state will include the objects with attributes for name, date of birth, role, and location.
 
We will now explore the steps to configure the mentioned process in the Pass state, both in Builder View and Code View.

Builder view

To use a Pass state in Builder View:

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

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

  3. Select the Input/Output tab located on the right side of the builder view page, and establish the paths. For further details, refer to the Input/Output Processing section

  4. For inserting a new parameter to the input passed, enter the key (in format '$.fieldname') in ResultPath and the value within Result.

      

Code view

In Code View, you can directly add the parameters resultPath and result within the state.

The JSON input to the state is:

{
"org_name": "Global Solutions",
"employee_details": {
"name": "Henry",
"date of birth": "15-03-1990",
"role": "Business Analyst"
}
}

In Pass state, you can add the new parameter location in the Result Path as below:
{
"Get Employee Details": {
"start": true,
"type": "pass",
"next": "End",
"input_path": "$.employee_details",
"output_path": "$.employee_details",
"result_path": "$.location",
"result": "New York"
}
}


Then the JSON output will be:
{
"org_name": "Global Solutions",
"employee_details": {
"name": "Henry",
"date of birth": "15-03-1990",
"role": "Business Analyst",
"location": "New York"
}
}



Next : Branch state

    • Related Articles

    • Output Path

      Output Path enables you to select a portion of the state's output and transfer it to the next state for processing, eliminating any unecessary objects from the JSON output. If the Output Path isn't specified, the entire JSON node (determined by the ...
    • Parameters in Circuit

      Parameters in Circuit allow you to use dynamic values in your automated workflows, making it easier to customize and control various parts of your process. These parameters are created in the ConfigStore and can be referenced throughout the different ...
    • 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 ...
    • Overview of Reports

      One of the best ways to manage teams in an organization is to take a step back and analyse the work pattern. Evaluate different aspects of your team’s progress using Reports in Qntrl. Apart from the default reports provided by Qntrl, users can also ...
    • Input Path

      Input Path enables you to filter and control the actual input passed to the state. By defining an Input Path (either in Builder View or Code View), using JSONPath notation, you can select a portion of the JSON input and use it for processing within ...

    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.