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 Controls
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; the input and/or output of a state 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 success status. Failure - Terminates an execution, returning failure status.
Functional States
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.
Functional states available in the circuit are:
Bridge Controls
These controls are used to perform certain operations in an application, a 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 know how to deploy a bridge, click here.
Following are the Bridge Controls:
- 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 command or script in the intended Unix/Linux machine.
- Files - Create workflows for file management.
- File Upload
- File Transfer
- AD Task - Integrate and perform actions in the AD service in the client network.
- 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
- 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
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.
- Name: A unique name assigned to states when they are added to a circuit to identify the states within the circuit. Name can be modified under the Configuration section available on 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 the 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. It enables 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.
Every field and its values are case-sensitive. Once a value is defined, the exact value must be passed throughout the Circuit.
For more details visit the Input and Output processing section.