AnsweredAssumed Answered

ErrorEndEvent is not propagated to parent process

Question asked by joao.p.silva on Feb 27, 2014
Latest reply on Mar 3, 2014 by joao.p.silva
We have two processes, A and B, where B is a sub-process of A.

In the parent process A, we have an Event Sub-Process with an ErrorStartEvent with Error Code "customError".

In process B, we also have an Event Sub-Process with an ErrorStartEvent with Error Code "customError", but at the end, we re-throw this same error code with an ErrorEndEvent, in order to trigger the Event Sub-Process of the parent process A.

This, however, produces an infinite loop. In other words, instead of propagating the ErrorEndEvent from process B to the parent process A, it keeps processing the error in process B. Making an analogy with Java, what we have is the following:


A() { // Parent Process
  try {
    B();  // Sub Process
  } catch (CustomError e) {  // Event Sub Process ErrorStartEvent
    doSomething();
  }
}

B() {
  try {
    doSomethingElse();
  } catch (CustomError e) { // Event Sub Process ErrorStartEvent
    doYetSomething();
    throw e; // This ErrorEndEvent is never caught by A
  }
}


However, the Exception from B never reaches A, it keeps looping in the catch block of B.

Outcomes