cancel
Showing results for 
Search instead for 
Did you mean: 

Retrieving error details in generic ErrorBoundaryEvent flow

vivverma
Champ in-the-making
Champ in-the-making
Hi All,
Is there any way by which we can get the error details in a generic ErrorBoundaryEvent flow.
The Scenario is something like this:-
The Wrapper Workflow definition is attached below.
we have defined a wrapping workflow which has a callActivity that invokes dynamic standalone subprocess(ie the call element is passed dynamically). We have also defined an errorBoundaryEvent for the callActivity which is generic and catches all BPMNErrors generated by the subprocess. Now is there a way by which we could identify the error details in the Handler flow?
Also please let me know of the other alternative approaches that could be used.
1 REPLY 1

frederikherema1
Star Contributor
Star Contributor
AFAIK, only the error-code is used to find the correct handler. The rest of the exception is ignored:



public static void propagateError(BpmnError error, ActivityExecution execution) throws Exception {   
    propagateError(error.getErrorCode(), execution);
  }

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

Either you create specific handlers for each error-type you expect OR store (before throwing the BPMNError) some context on a thread-local somewhere.