Overview of Input and Output Processing | Circuit | Online Help

Overview

Any system is defined by the data it receives as input, the way it processes that data, and the output it generates. In a Circuit execution, the input to the circuit is provided as JSON key-value pairs. This JSON is passed as input to the initial state and the processed output is passed as input to the subsequent state in the Circuit. Each state handles JSON input and produces output in JSON format, until reaching an end state or a terminal state like Success or Failure.
 
Here, we'll explore how JSON data is passed from one state to another within a circuit and how the JSON data transforms during this process. This requires an understanding of the field structures in the Input and Processing of the Circuit and their significance in data selection and filtering.
 
The flow of JSON input and output data between different states of a circuit can be regulated, managed, and manipulated through the different types of fields explained below:
  1. InputPath - Filters the state's JSON input by restricting the input passed to the state as required or by relevance.
  2. Parameters - Used to add a collection of key-value pairs to the state's input to incorporate new values, exclusive to specific states.
  3. Result Selector - Refines and filters the task output (state's result) by picking up the required elements in the result object and constructing the key-value pairs. This allows us to choose what to pass to the next field, ResultPath. 
  4. ResultPath - Customize a state's output by merging its input and result(ie., via Result Selector), enabling the transmission of modified JSON to the next state for processing. It helps to replace, augment, or adjust the State Input using the task's result.
  5. OutputPath - Determines the final result of the state. This is what serves as the input for the next state enabling further refinement of the information. If not defined, ResultPath controls the State Input for the subsequent task.
The below diagram illustrates the flow of JSON data within a task state.    
      



It is essential to specify the respective location or path of data within the Input, Output, and Result datasets for further processing. The conventions for defining the specific data path required from the input, output, and result data sets are explained in the JSON Path article.



Next: JSON Path

    • Related Articles

    • 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 ...
    • 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, ...
    • 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 ...
    • 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 ...
    • 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 ...

    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.