Events happen only within top-level process and complex activities. The different types of event handling activities are: exception, timeout, and compensation handling.
- Exceptions are caused by <<ThrowException>> activities or correspond to faults returned by operations invoked by service invocation activities. Exception handling is possible when the complex activity contains an exception activity or service invocation. These activities are modeled as follows:
- Exception handler - Composite process with the <<ExceptionHandler>> stereotype. The exception handler must be at the same level as the complex activity and connected with a flow to this activity.
- Connecting flow - Flow with a <<Fault>> event.
- Default exception handler - Flow with <<DefaultExceptionHandler>> stereotype.
- Timeout handling is possible only when the complex activity contains timers. These activities are modeled as follows:
- Timeout handler - Composite process with the <<TimeoutHandler>> stereotype. The timeout handler must be at the same level as the complex activity and connected with a flow to this activity.
- Connecting flow - Flow with a <<Timer>> event.
- Compensation handling is executed when a compensate activity is executed in the outer scope of the complex activity to compensate. A compensate activity must be used within an exception handler or another compensation handler; it cannot be linked to more than one complex activity. These activities are modeled as follows:
- Compensation handler - Composite process with the <<CompensationHandler>> stereotype. The compensation handler must be at the same level as the complex activity and connected with a flow to this activity.
- Connecting flow - Flow with a <<Compensation>> event.