Search code examples
spring-bootworkflowbpmnflowable

Failed Service Task state after application reboot


What happens to a failed Service Task when the application is restarted. Will it attempt to retry the Service task once again.

If not, how does the Process proceed. Is there a way to manually retry the Service task ?

I could see from Flowable API, that taskQuery lists only the UserTasks.


Solution

  • In Flowable when an execution fail (due to some exception), the transaction would be rollbacked to the previous wait state in your workflow. This means that the next time it runs it would continue from there.

    You can make a Service Task async which would make it a wait state. In that case an Async Job would be created and that would be retried (by default 3 times, but that is configurable). If the Service Task fails all the time (the configured number of retries) the job would be moved into the dead letter job and then you need to manually trigger it.