cancel
Showing results for 
Search instead for 
Did you mean: 

'No catching boundary event' exception with 5.16

gokceng1
Champ in-the-making
Champ in-the-making
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.
2 REPLIES 2

gokceng1
Champ in-the-making
Champ in-the-making
I couldn't see edit option so I'm adding this to my first post.
I've tracked the situation at 5.14 and it runs in to second else statement and only writes log but in 5.16 it throws exception. Should I catch and ignore it or do I have another option?
Thanks.

jbarrez
Star Contributor
Star Contributor
hmm that code has indeed changed. In fact, the logic was wrong before as it didn't propagte correctly in some cases.

It would be very helpful if you could get me a process/unit test that demonstrates the problem you are seeing.