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

      The Branch state allows you to add conditions to the circuit's workflow and execute tasks based on those conditions. It decides the path of execution based on input to this Branch state. This is similar to having an 'If else' or 'switch' case. A ...
    • Success

      A Success state can be used to terminate an execution. It is used to represent a successful execution for the user's reference. As Success states are end states, they don't have any configuration or properties, such as Next state or End fields. You ...
    • Sample Use Cases

      Payment process In a typical payment process, for every purchase made, a payment link with the invoice will be shared with the purchaser. Upon successful payment, a receipt will be generated; in the event of failure, the entire process will have to ...
    • Other Actions in Circuit

      Quick Actions in Circuit To manage and organize circuits in your account: Hover near the name of the circuit in the Circuits list view page. Click on the action menu next to the name. From the action menu, you can: Edit Circuit: Change the name and ...

    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.