takeouts:
There is a distinction between raising errors (throw events) and handling errors (catch events).
-
-
- The Catching Error Event
Note that errors are propagated to parent scopes upwards until a scope is found on which a boundary error event is defined that matches the error event definition. See [BPMN 2.0 Constructs](<%= @docUrl('api-references/bpmn20/#events-error-events') %>) for more information. An error event definition references an error element. The following is an example of an error event, referencing an error declaration:
<error id="notOnStock" errorCode="NOT_ON_STOCK_ERROR" />
<process>
...
<serviceTask id="bookOutFromStock" .../>
<boundaryEvent id="catchError" attachedToRef="bookOutFromStock">
<errorEventDefinition errorRef="notOnStock"/>
</boundaryEvent>
You can handle errors not only with boundary events, but also by having an error sub process. This means that the normal flow iscompletely interrupted and the sub process is started:
<center><img src="<%= @docUrl('assets/img/real-life/bpmn_error_event_subprocess.png') %>" class="img-responsive"/></center>
takeouts:
There is a distinction between raising errors (throw events) and handling errors (catch events).
Note that errors are propagated to parent scopes upwards until a scope is found on which a boundary error event is defined that matches the error event definition. See [BPMN 2.0 Constructs](<%= @docUrl('api-references/bpmn20/#events-error-events') %>) for more information. An error event definition references an error element. The following is an example of an error event, referencing an error declaration:
<error id="notOnStock" errorCode="NOT_ON_STOCK_ERROR" />
<process>
...
<serviceTask id="bookOutFromStock" .../>
<boundaryEvent id="catchError" attachedToRef="bookOutFromStock">
<errorEventDefinition errorRef="notOnStock"/>
</boundaryEvent>
You can handle errors not only with boundary events, but also by having an error sub process. This means that the normal flow iscompletely interrupted and the sub process is started:
<center><img src="<%= @docUrl('assets/img/real-life/bpmn_error_event_subprocess.png') %>" class="img-responsive"/></center>