Circuit States | Online Help | Qntrl | Circuit | Building blocks of a Circuit in Qntrl

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 states are categorized as follows:

  • Flow Control

  • Functional

  • Notification

  • IT Orchestration

  • Data Transformation

Flow Control

Flow controls help you create complex workflows that orchestrate the flow of logic and data in the circuit. Flow Controls comprises the following states:
  • Pass  Passes input from one state to another
  • Branch – Defines the execution branches, a state's input and/or output directs the execution flow
  • Parallel –  Performs simultaneous executions
  • Wait  Inserts a delay for the specified time
  • Batch  Implements multiple group executions
  • Success  Terminates an execution, returning the Success status
  • Failure  Terminates an execution, returning the Failure status

For detailed information about Flow Control states, refer to Flow Control.

Functional 

Functional states help you create real-time workflows to execute business logic in a circuit.  You can accomplish this by composing functions using a built-in editor, generating webhooks through links, or linking circuits within a circuit.

The following functional states are avaialble in a circuit:
  • Function Execute custom logic using supported languages, enabling flexible automation and integration within the circuit.
  • Webhook – Communicate with third-party applications by making API calls or triggering actions based on workflow events.
  • Circuit  Reuse an existing circuit within another workflow, enabling modular design and handling of complex sub-processes.

For configuring Functional states, refer to Functional.

Notification

Notification states help you automate communication within a circuit by triggering alerts or messages at specific stages of the workflow. These states ensure timely updates and reduce the need for manual intervention.

The following notification state is available:

  1. Email – Sends automated email notifications to specified recipients, keeping stakeholders informed throughout the workflow.  
For detailed information about Notification states, refer to Notification.

IT Orchestration

These controls are used to perform certain operations in an application, database, or computer in any private network. The tasks in these controls require the bridge agent to be deployed and active in the end user's network. To learn how to deploy a bridge, click here. Bridge Controls include the following:
  • Task Engine  Connects and executes an API from a closed space
  • DB Task – Executes a SQL query in a Database hosted on a private network
  • SSH Task – Perform actions using shell commands or script in the intended Linux machine.
  • Files  Create workflows for file management
    • File Upload
    • File Transfer
    • File Download
  • AD Task  Integrate and perform actions in the AD service in the client network.
    • Add AD User               
    • Add AD Group
    • Add User to Group     
    • Add AD Computer
    • Enable AD User    
    • Disable AD User
    • Reset AD Password  
    • Unlock AD User
    • Remove AD Object     
    • Update AD Object
    • Read AD Object
  1. PowerShell task Engine  Perform actions using PowerShell command or script in a Windows machine.
    • PowerShell Engine    
    • Install WindowsApp
    • Uninstall WindowsApp
    • Start Service
    • Stop Service     
    • Restart WindowsServer
For detailed information about IT Orchestration states, refer to IT Orchestration.

Data Transformation

Data Transformation states help you convert, reshape, and process data within a circuit, enabling seamless data flow between different stages without external scripting.

Data Transformation comprises the following categories:

  1. JSON Conversion: JSON Conversion states convert data from various file formats into JSON for further processing within the circuit.
    • JSON to JSON 
    • CSV to JSON 
    • XML to JSON 
    • YAML to JSON 
    • XLSX to JSON 
    • TXT to JSON 
  1. Dataset – Dataset states help you refine and manage collections of records within the circuit.
    • Limit – Restricts the number of records in a dataset
    • Remove Duplicates – Eliminates duplicate records from a dataset
  1. Date & Time – Enables operations on date and time values within the circuit.
    • Add – Adds a duration to a date or time
    • Subtract – Subtracts a duration from a date or time
    • Format – Converts date or time into a specified format
    • Difference – Calculates the difference between two date or time values
    • Current Datetime – Retrieves the current date and time
    • Extract Duration – Extracts specific units from a duration
    • Extract Datetime – Extracts components from a date or time

For detailed information about Data Transformation states, refer to Data Transformation.


Every State is defined by a set of attributes; most of the attributes are common for states, and a few states have some exclusive attributes as well.  Each state must have a Type field indicating what type of state it is.  Except for Success and Failure states, the rest require a Next field or can become a terminal state by specifying an End field.

Common State attributes

In a circuit, the attributes must be defined for each State deployed. As explained above, some of the attributes are common to all states. The common attributes to be defined for each state are given below.

NotesEvery field and its values are case-sensitive. Once a value is defined, the exact value must be passed throughout the Circuit. 

Name: A unique name assigned to states when they are added to a circuit to identify the states within the circuit. The name can be modified under the Configuration section in the right pane.

 

Type: The actual state type is mentioned in this field. While you drag and add a state to the circuit, the state will be automatically allocated in the Type field. You can also select the state from the dropdown list available in this field.

 

Next State: The name of the next state that has to be run after the completion of the current state is given in this field. Except for the terminal states 'Success' and 'Failure', all other states must define this field. The last state of the Circuit should be assigned the next state value as End.

 

Input Path: Allows you to control the actual input passed to the state. It selects parts of the input JSON to pass to the state.

 

Result Path: Allows you to manipulate the output of a state. After the input is processed by the state, the result path determines what combination of the state result and the actual state input has to be passed to the output.

 

Output Path: Output path further filters the data from the Result Path to pass it as state output.

 

Parameters: Parameters allow you to control the actual input passed to the state.  Parameters enable you to insert a collection of key-value pairs into the input. Parameter values can either be static or parts of the input JSON selected as paths.

 

For more details, visit the Input and Output processing section.












    • Related Articles

    • Create and Configure a Circuit

      Circuits are visual workflows that help automate tasks across various modules in Qntrl. You can create circuits by using pre-built templates or by building them from scratch using Builder View or Code View. Common Circuit Functionalities Maximum of ...
    • Sample Use Case - Configuring Input and Output Processing in Circuit console

      Let's explore Input/Output Processing further by building a Circuit using the example of an Employee Onboarding Process. We initiate the process with the following state Input which contains information about the employee details for employee ...
    • JSON Path

      Path serves to locate specific parts or components within a JSON object. These paths start with the '$' symbol and follow JSONPath syntax. It is used to access particular elements or values within JSON objects passed in the Input Path, Output Path, ...
    • Features of Circuit

      Configure with or without code Circuit provides a platform to build workflow orchestrations with or without code. You can either visually design the Circuit schematics by dragging and dropping its elements in Builder View, or build its JSON code in ...
    • 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.