BPMN Error (interrupting) and Escalation (interrupting and non-interrupting) Events can be used in the PROCEED Engine. Throwing this events is possible from a Script and User Task, or from within a Subprocess. Catching is only possible with a boundary event.
Script and User Tasks Catching Events
The following shows a BPMN diagram with a Script Task having two catching, interrupting error events and two catching escalation events.
If you create this diagram in PROCEED's Management System, the following elements/attributes are automatically added for execution:
- if you specify the (visible)
name
attribute for theboundaryEvent
, anerror
orescalation
element are added with a unique id on the root level next toprocess
- the
name
anderrorCode/escalationCode
attributes oferror
orescalation
are set to the same value of thename
attribute from theboundaryEvent
by default - an
errorRef
orescalationRef
is linking the boundaryEvent with the respectiveerror/escalation
element - you can trigger a specific attached error or escalation event inside a Script Task or a User Task with a reference to the boundaryEvent name or errorCode/escalationCode
- the
- if no
name
attribute is specified on theboundaryEvent
, noerror
orescalation
element is automatically created- on one task there must at a maximum one not-named error and escalation event
- if an error is thrown within a Script or User Task without any specific reference, then this not-named event is triggered
<bpmn:error id="Error_0p5lm2q" name="Problem_1" errorCode="Problem_1" />
<bpmn:escalation id="Escalation_07t55lw" name="Escal No 1" escalationCode="Escal No 1" />
<bpmn:process id="Process_1u7agcv" isExecutable="true">
<bpmn:scriptTask id="Activity_0re3sgy" name="Script with errors and escalations" />
<bpmn:boundaryEvent id="Event_0dmzh52" name="Problem_1" attachedToRef="Activity_0re3sgy">
<bpmn:outgoing>Flow_1wosgix</bpmn:outgoing>
<bpmn:errorEventDefinition id="ErrorEventDefinition_062kbu7" errorRef="Error_0p5lm2q" />
</bpmn:boundaryEvent>
<bpmn:boundaryEvent id="Event_1795ba4" attachedToRef="Activity_0re3sgy">
<bpmn:outgoing>Flow_0w2ip3t</bpmn:outgoing>
<bpmn:errorEventDefinition id="ErrorEventDefinition_15vocsh" />
</bpmn:boundaryEvent>
<bpmn:boundaryEvent id="Event_0j6ky2q" name="Escal No 1" cancelActivity="false" attachedToRef="Activity_0re3sgy">
<bpmn:outgoing>Flow_1tgumwe</bpmn:outgoing>
<bpmn:escalationEventDefinition id="EscalationEventDefinition_0xpf778" escalationRef="Escalation_07t55lw" />
</bpmn:boundaryEvent>
<bpmn:boundaryEvent id="Event_0htafdc" attachedToRef="Activity_0re3sgy">
<bpmn:outgoing>Flow_13j3ojn</bpmn:outgoing>
<bpmn:escalationEventDefinition id="EscalationEventDefinition_0kx2mnk" />
</bpmn:boundaryEvent>
<bpmn:endEvent id="Event_1vpjmsf">
<bpmn:incoming>Flow_13j3ojn</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="Flow_13j3ojn" sourceRef="Event_0htafdc" targetRef="Event_1vpjmsf" />
...
</bpmn:process>
Subprocesses and Throwing/Catching Error and Escalation Events
For throwing escalation and error events inside a subprocess, nearly the same rules apply as for catching boundary events:
- instead of being triggered inside a script or user task, this events are automatically thrown by the BPMN engine
- if the event's
name
attribute (visual) is given, then anerror
orescalation
element are added with a unique id on the root level next toprocess
- the
name
anderrorCode/escalationCode
attributes oferror
orescalation
are set to the same value of thename
attribute from the event by default - an
errorRef
orescalationRef
is linking the event with the respectiveerror/escalation
element
- the
- if no
name
attribute is specified on the event, noerror
orescalation
element is automatically created- if an event that has no
name
is specified, then a not-named boundary event is triggered
- if an event that has no
<bpmn:escalation id="Escalation_18e9fre" name="Escalation 1" escalationCode="Escalation 1" />
<bpmn:error id="Error_144jikv" name="Error_1" errorCode="Error_1" />
<bpmn:process id="Process_1ojjagv" isExecutable="true">
<bpmn:startEvent id="StartEvent_1"></bpmn:startEvent>
<bpmn:sequenceFlow id="Flow_0nty2qp" sourceRef="StartEvent_1" targetRef="Activity_1w0jsne" />
<bpmn:subProcess id="Activity_1w0jsne">
...
<bpmn:inclusiveGateway id="Gateway_1fdf7ee"></bpmn:inclusiveGateway>
<bpmn:sequenceFlow id="Flow_1no4wsz" sourceRef="Gateway_1fdf7ee" targetRef="Event_1vdoptb" />
<bpmn:sequenceFlow id="Flow_1wx0ki4" sourceRef="Gateway_1fdf7ee" targetRef="Event_1s7o6hh" />
<bpmn:sequenceFlow id="Flow_0urj8zs" sourceRef="Gateway_1fdf7ee" targetRef="Event_0143olm" />
<bpmn:sequenceFlow id="Flow_0urj8zs" sourceRef="Gateway_1fdf7ee" targetRef="Event_0143olm" />
<bpmn:sequenceFlow id="Flow_0ce2ytk" sourceRef="Gateway_1fdf7ee" targetRef="Event_12tqyq3" />
<bpmn:intermediateThrowEvent id="Event_1vdoptb" name="Escalation 1">
<bpmn:escalationEventDefinition id="EscalationEventDefinition_15ep28m" escalationRef="Escalation_18e9fre" />
</bpmn:intermediateThrowEvent>
<bpmn:sequenceFlow id="Flow_0v5hf7j" sourceRef="Event_1vdoptb" targetRef="Event_1d926ax" />
<bpmn:endEvent id="Event_1d926ax"></bpmn:endEvent>
<bpmn:endEvent id="Event_0143olm" name="Error_1">
<bpmn:errorEventDefinition id="ErrorEventDefinition_11syieg" errorRef="Error_144jikv" />
</bpmn:endEvent>
<bpmn:endEvent id="Event_1s7o6hh">
<bpmn:errorEventDefinition id="ErrorEventDefinition_1p0uaqb" />
</bpmn:endEvent>
<bpmn:endEvent id="Event_12tqyq3">
<bpmn:escalationEventDefinition id="EscalationEventDefinition_0cpfe49" />
</bpmn:endEvent>
</bpmn:subProcess>
<bpmn:sequenceFlow id="Flow_0bb4gvw" sourceRef="Activity_1w0jsne" targetRef="Event_1tw963x" />
<bpmn:endEvent id="Event_1tw963x"></bpmn:endEvent>
<bpmn:boundaryEvent id="Event_1b01on6" name="Escalation 1" cancelActivity="false" attachedToRef="Activity_1w0jsne">
<bpmn:escalationEventDefinition id="EscalationEventDefinition_0kywvic" />
</bpmn:boundaryEvent>
<bpmn:boundaryEvent id="Event_1s78a23" attachedToRef="Activity_1w0jsne">
<bpmn:escalationEventDefinition id="EscalationEventDefinition_1nqgx43" />
</bpmn:boundaryEvent>
<bpmn:boundaryEvent id="Event_0vjr6qb" name="Error_1" attachedToRef="Activity_1w0jsne">
<bpmn:errorEventDefinition id="ErrorEventDefinition_0uo6nxr" errorRef="Error_144jikv" />
</bpmn:boundaryEvent>
<bpmn:boundaryEvent id="Event_0qfyaud" attachedToRef="Activity_1w0jsne">
<bpmn:errorEventDefinition id="ErrorEventDefinition_1mg9f0w" />
</bpmn:boundaryEvent>
...
</bpmn:process>
Open Issues
- Currently not possbile to use Escalation and Error events on call acticivies
- Unnamed Error/escalation events don't have a global
error/escalation
element without a value forerrorCode/escalationCode
- The data mapping (error and escalation) is not standard conform.