How to disable retries of Extenal Tasks that time out?


#1

Hi

When using External Tasks and calling “fetchAndLock” a mandatory parameter in the REST API is “lockDuration”. After this time Camunda will unlock the External Task (so the task won’t fail silently and it will be available again for execution).

Is there a way to either:

  • mark this task as failed after the timeout instead of automatically unlocking it (this is a not requested retry)
  • execute an alternative flow after the timeout (this could i.e. send a notification about the timeout)

#2

Hi @albex,

you have different ways to solve this. You can

  • mark the task as failed and set retries to 0
  • mark the task as failed and send a BPMN error
  • using a timer boundary event on the external task

The last option is more robust and still works if the worker of the external task is not able to send a response.

Does this help you?

Best regards,
Philipp


#3

Yes. I guess the timer boundary solution is the only one applicable in may case.
Just want to be sure I haven’t over overlook something.

Thanks Alex