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

Failure

The Failure state is also an end state that signifies the failure of the previous task executed in the Circuit and stops its execution, marking it as a failure. It is used to represent a failed execution for the user's reference.
 
Example Use Case: In the employee onboarding case, specifically during the employee document verification stage, when the verification status indicates a failure, we can employ a Failure state to terminate execution along with an error message and reason for failure.

Builder View

To configure a Failure state to your circuit:
  1. In Builder View, drag and drop the Failure state from the left pane into your circuit or click the required Failure state in your circuit.
  2. Under Configuration, you can add a specific Error Message and an optional Reason in the state for your reference that will be displayed in the execution response to help in debugging.
Notes
  1. There is no next state for a Failure state since it is the last state for that path.
  2. You will also not be able to configure an input path or output path for a Failure state.



Code View

The below JSON is used in Code View and the equivalent fields for adding failure details are errorMessage and reason.

Failure state example:
"Offer Cancelled": {
"type": "failure",
"error_message": "Document verification unsuccessful",
"reason": "Documents submitted are invalid"
}






NextFunction state

    • Related Articles

    • Error Selector and Error Path

      Error Selector and Error Path are used to manage errors in a system. While Result Selector and Result Path control the output of a state upon successful execution, Error Selector and Error Path come into play when the are exceptional circumstances, ...
    • Error Handling

      In Qntrl Circuit, you can configure error handling while building a circuit. State definition errors are detected even before saving the circuit. When you save the circuit, a compilation check runs and lists out errors related to its state ...
    • 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 ...
    • PowerShell Task Engine

      These states are used to perform any actions in the Windows machines of a private network using PowerShell commands. There are six states available in the PowerShell Task Engine for performing different operations. PowerShell Engine Install ...
    • 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.