Retrying a Failed Task

During normal course of execution, the workflow engine interacts with external systems. Each such interaction adds a point of failure. E.g. Rest Call made in service node could result in failure because the remote server was down for maintainance. Similarly, business rule evaluation could fail due to erroneous rule definition. In such cases, the process execution can not continue since the subsequent nodes may depend on the output of failed node.

The workflow engine suspends such failed processes and marks the corresponding node as failed along with any available error message.

Below API’s are available to deal with failure scenarios -

  • GET /api/ProcessInstances/failures

    • This api returns all the ProcessInstances that have one or more failed tokens.
    • Once, the failed Process Instances are available, admin can investigate the cause of failure by looking for error in the failed node.
  • GET /api/ProcessInstances/{id}/failureTokens

    • Fetches all the failed tokens in a particular process instance.
  • PUT /api/ProcessInstances/{id}/retry/{tokenId}

    • This api allows to retry a failed Task by providing the process id and token id.
    • Optionally, corrections to the process variables can also be submitted through this API.
    {
      "variable1": "new value",
      "variable2": "another correction"
    }
    
  • PUT /api/ProcessInstances/retryAll

    • This api allows retrying all failed tasks
    • Optional filter criteria can be provide in query parameters. e.g. ?filter={"where":{"name":"order-processing"}}
    • Optionally, corrections to the process variables can also be submitted through this API.