[FEAT] Detect Compensation Events #315
Labels
BPMN support
Something about the BPMN specification that the lib is already supporting or will support
enhancement
New feature or request
external contribution 👤
Pull requests provided by someone who is not a core maintainer
good first issue
Good for newcomers
hacktoberfest
Can be done during the Hacktoberfest
Milestone
Is your feature request related to a problem? Please describe.
Given a bpmn input source, detect the BPMN
Compensation Intermediate Event Attached to an Activity Boundary
andCompensation Throwing Event
.Describe the solution you'd like
Manage all Compensation Events declared in the BPMN input source.
Describe alternatives you've considered
N/A
Additional context
The final shape rendering of the
Compensation Events
won't be done as part of this issue and will be managed later, see #655.BPMN specification
General information
Compensation Events are used in the context of triggering or handling compensation (see page 301 for more details on compensation). There are four variations: a Start Event, both a catch and throw Intermediate Event, and an End Event.
The
CompensationEventDefinition
element inherits the attributes and model associations of BaseElement(see Table 8.5) through its relationship to the
EventDefinition
element (see page 259). Table 10.94 (the following) presents the additional attributes and model associations of theCompensationEventDefinition
element.activityRef : Activity [0..1]
For a Start Event:
This Event “catches” the compensation for an Event Sub-Process. No further
information is REQUIRED. The Event Sub-Process will provide the Id necessary
to match the Compensation Event with the Event that threw the compensation,
or the compensation will have been a broadcast.
For an End Event :
The Activity to be compensated MAY be supplied. If an Activity is not supplied,
then the compensation is broadcast to all completed Activities in the current Sub-
Process (if present), or the entire Process instance (if at the global level).
For an Intermediate Event within normal flow:
The Activity to be compensated MAY be supplied. If an Activity is not supplied,
then the compensation is broadcast to all completed Activities in the current Sub-
Process (if present), or the entire Process instance (if at the global level). This
“throws” the compensation.
For an Intermediate Event attached to the boundary of an Activity:
This Event “catches” the compensation. No further information is REQUIRED. The
Activity the Event is attached to will provide the Id necessary to match the
Compensation Event with the Event that threw the compensation, or the
compensation will have been a broadcast.
waitForCompletion : boolean = true
For a throw Compensation Event, this flag determines whether the throw
Intermediate Event waits for the triggered compensation to complete (the default),
or just triggers the compensation and immediately continues (the BPMN 1.2
behavior).
Boundary Event
The Event will be triggered by a thrown compensation targeting that Activity. When the Event is triggered, the Compensation Activity that is associated to the Event will be performed (see page 301).
Note that the interrupting a non-interrupting aspect of other Events does not apply in the case of a Compensation Event. Compensations can only be triggered after completion of the Activity to which they are attached. Thus they cannot interrupt the Activity.
Boundary Event attributes
whether the boundary catch Event acts as an Error or an Escalation.
If the Activity is not canceled, multiple instances of that handler can run concurrently.
This attribute cannot be applied to Error Events (where it’s always true), or Compensation Events (where it doesn’t apply).
Compensation End Event
This type of End indicates that compensation is necessary. If an Activity
is identified, and it was successfully completed, then that Activity will be
compensated. The Activity MUST be visible from the Compensation
End Event, i.e., one of the following MUST be true:
same level of Sub-Process.
Event Sub-Process that is contained in the Sub-Process
containing the Activity.
visible from the Compensation End Event are compensated, in
reverse order of their Sequence Flows. Visible means one of the
following:
the same level of Sub-Process as the Activities.
Event Sub-Process that is contained in the Sub-Process
containing the Activities.
To be compensated, an Activity MUST have a boundary Compensation
Event or contain a Compensation Event Sub-Process .
The text was updated successfully, but these errors were encountered: