Error handling

Overview

A key aspect of any workflow is how errors are handled. To ensure that users are able to create workflows that can be run with confidence, Accode implements a set of features that help to minimize errors and handle them when they do occur.

Accode provides two primary methods for identifying faulty states for specific entities:

  • The else result: actions can define an else action path (i.e. "route the entity right instead of down"). This is not a true error state, but rather indicates that the action was not able to produce its standard result during evaluation. This is preferred for expected false outcomes of the action, such as the comparison between two values indicating that they are not equal.
  • The error result: actions always define an explicit error state for situations that break the evaluation of that action. Such errors can range from anything between errors from a 3rd party system, such as in a failed API call, and invalid data structures or values that the developer had not expected. The entity evaluation will be stopped, and the entity will be left “stuck” in that action. You can manually resume evaluation for these actions by viewing the data via the error metric.

There is also another method to identify faulty states in the action or workflow itself:

  • The validation error: Each action can implement a validation function that tests the action input against a set of tests to determine if the input is valid and placement of the action is valid. This is indicated by a red exclamation icon over the action, which can be opened to view the specifics of the error(s). These tests are run each time the action is saved, and also periodically each day.

Best practices

The following is a basic set of suggestions that workflow builders can follow to better ensure that workflows remain robust when the unexpected occurs.

  1. Test using a sandbox workflow: Before running any changes, it is important to test it thoroughly to ensure that all potential errors are addressed. This can be done manually or using automated testing tools provided by Accode.
  2. Provide fallbacks: Actions that provide an else path should always have a terminating action, such as a Task action, that allow for a degree of flexibility in handling the entities that are routed to the right.
  3. Monitor errors and logs: Error logs should be monitored regularly to identify any errors that may have been missed during testing. This can help to quickly identify and address any errors that may arise. You can even build workflows around the error logs generated by Accode, which can be used to send emails or Slack messages for specific errors. The Latest Errors widget can help you easily see the latest errors in a specific workflow.
Previous
Create a new data model