AnsweredAssumed Answered

End process after Retries

Question asked by lastseeds on Aug 26, 2015
Latest reply on Aug 31, 2015 by martin.grofcik
I need to end process after 3 retries. Ive implemented JobRetryCmd like:

    public Object execute(CommandContext commandContext) {
        JobEntity job = commandContext.getJobEntityManager().findJobById(jobId);

        if (isFirstException(job)) {

        if (noMoreRetries(job)) {
            updateStatus(commandContext, job);
           //throw new BpmnError("myError"); //Go to diagram error handler - DOES NOT WORK

        return super.execute(commandContext);

How do I end process after job failed 3 times?This event happens aside from the flow.
The process should never be fired again.