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)
I was wondering how to know if the task timed out?
For example based on your suggestion - task times out and I want to set retries to (retries-1) - how that can be done?
Would you be able to give example of pseudo code which roughly describes how to implement it?
The timer solution assumes that the external task started i.e. if the external task client is off/unavailable the timer will go off anyway even though no fetchAndLock has taken place. Is there any other way to ensure that a task is not retried/assigned to another worker that specifically takes into consideration whether or not fetchAndLock was called?