Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Automatic task flows are used when creating a DCM application. It’s an exposed flow that could be used in the task definition. The automatic task flow behaves like a normal flow except that it Is always exposed and that it can be used to retry functional exceptions in automated tasks.

Let us start with an example. In a task flow, a document has been generated then the document is uploaded and in the following service call, a REST service is called to update some information. Let’s imagine that the REST call succeeded, and the response is a 200 OK. However, the response does not contain the expected information. Technically it didn’t fail so there is no exception thrown and the flow will continue.

In this case the automatic task flow can be used. The automatic task flow has a retry event node which allows you to pass data with it for the next retry. In the parameters of the automatic task flow, this data can be added to profile again. With this mechanism the generation of the document can be skipped because we can pass the data of the document (e.g. ID) from the first try) and skip document generation if the file exists.

If at runtime the flow reached a retry node, the runtime will:

  • Rollback and reopen the task
  • Add the parameters from the retry event to the automated task message
  • Send the message to the dead letter queue

From there it can be retried using the DCM Maintenance App but with the added information. The second time the message reaches the runtime, the data from the retry event node will be added to the profile using the flow’s parameters. Using condition nodes, the generation and uploading of the document can be skipped.

Note that retry event parameters are single valued and meant to be used in small quantities.

Add picture

How to create an automatic task flow

Add a new flow, change the flow type to “AutomaticTask”. The flow type is available in the Blueriq case modelling Library.

Note that the automatic task flow cannot be used as a sub flow.