Error Handling

The HTM floclient also offers an implementation of the flo-lang 'FlowErrorExtensions' interface. This extension provides the ability to hook errors that occur in flow processing into HTM so that users can handle them.

The extension provides the following capability when activated:

  • When unexpected errors occur during flow processing, the flow will move to the 'In Error' state and a new HTM task of type 'ERROR_PROCESS' is raised.

  • The new task will be available in HTM and have four different types of outcome:

    • Abort - this will abort the flow.

    • Force Complete - this will force the flow to the special 'Force Completed' state.

    • Resume - this will tell the flow to attempt to retry the previous actions; this is particularly useful, for example, if the issue has been resolved and a retry is the logical next step.

    • CustomOperations - If the error occurred on a state in which a custom operation can be performed then this will be made available as an option.

Details on how to use the extension are provided here.