I want to periodically query an external system (DNS server in my case) for arrival of some information up to some maximum amount of retries. How to react if this amount of retries is executed without success?
Now more details regarding the setup I've programmed so far:
Within Camunda BPM Engine I've configured an External Task, its topic subscribed by a Java program. This program executes the check (against DNS server). If this check succeeds, the task is marked as completed:
externalTaskService.complete(externalTask);
Otherwise as failed setting a decremented retry counter (together with a retry timeout):
externalTaskService.handleFailure(externalTask,
"Failure",
"[More failure details]",
decrementedRetries,
RETRY_TIMEOUT_MILLIS);
After swallowing all retries (decrementedRetries == 0
) the External Task is marked in Camunda BPM Engine with a red sign, stating the amount of failed Task executions, etc.
Now I would like to model another Task to react to this situation (execution of compensating steps). How would you recommend to model triggering this Task?
I've tried applying a Conditional Flow pointing from the first to the compensating second Task, but have not found any hint how to configure this Conditional Flow instance to react only to task instances with retries < 1
.
Thanks
Christian
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…