AnsweredAssumed Answered

'No catching boundary event' exception with 5.16

Question asked by gokceng1 on Aug 14, 2014
Latest reply on Aug 19, 2014 by jbarrez
Hello,
I'm sure I've asked this but I couldn't find the link on the forums. It may be a duplicate.
We have been using 5.14 and upgraded to 5.16 recently. After this we've faced with some problems on root processes' error end events. On 5.14 <i>ErrorPropagation.propagateError</i> method is like this:


  public static void propagateError(String errorCode, ActivityExecution execution) throws Exception {
    // find local error handler
    String eventHandlerId = findLocalErrorEventHandler(execution, errorCode); 

    // TODO: merge two approaches (super process / regular process approach)
    if(eventHandlerId != null) {
      executeCatch(eventHandlerId, execution);
    }else {
      ActivityExecution superExecution = getSuperExecution(execution);
      if (superExecution != null) {
        executeCatchInSuperProcess(errorCode, superExecution);
      } else {
        LOG.info("{} throws error event with errorCode '{}', but no catching boundary event was defined. Execution will simply be ended (none end event semantics).",
                execution.getActivity().getId(), errorCode);
        execution.end();
      }
    }
  }


and in 5.16 it becomes this:


public static void propagateError(String errorCode, ActivityExecution execution) throws Exception {

     while (execution != null) {
          String eventHandlerId = findLocalErrorEventHandler(execution, errorCode);
          if (eventHandlerId != null) {
              executeCatch(eventHandlerId, execution, errorCode);
              break;
          }
          execution = getSuperExecution(execution);
     };
     if (execution == null) {
        throw new BpmnError(errorCode, "No catching boundary event found for error with errorCode '"
                   + errorCode + "', neither in same process nor in parent process");       
     }
  }


Although <i>findLocalErrorEventHandler</i> method has not changed, 5.16 code runs in to <i>if (execution == null) {</i> line and this get me an exception.

I can provide sample process if you need it.
Thanks.

Outcomes