Previous UML Classes Table of Contents UML Packages Next


12.3.33 InterruptibleActivityRegion

CompleteActivities


   An interruptible activity region is an activity group that supports termination of tokens flowing in the portions of an activity.

*Generalizations

   ActivityGroup (from BasicActivities , FundamentalActivities ) on page 346

*Description

   An interruptible region contains activity nodes. When a token leaves an interruptible region via edges designated by the region as interrupting edges, all tokens and behaviors in the region are terminated.

*Attributes

   No additional attributes

*Associations

   • interruptingEdge : ActivityEdge [0..*] The edges leaving the region that will abort other tokens flowing in the region.

Issue 9106 -add ‘node’ entry

   • node : ActivityNode [0..*] Nodes directly contained in the region. {Subsets ActivityGroup ::containedNode}

*Constraints

   [1] Interrupting edges of a region must have their source node in the region and their target node outside the region in the same activity containing the region.

*Semantics

   The region is interrupted, including accept event actions in the region, when a token traverses an interrupting edge. At this point the interrupting token has left the region and is not terminated. AcceptEventActions in the region that do not have incoming edges are enabled only when a token enters the region, even if the token is not directed at the accept event action.

   Token transfer is still atomic, even when using interrupting regions. If a non-interrupting edge is passing a token from a source node in the region to target node outside the region, then the transfer is completed and the token arrives at the target even if an interruption occurs during the traversal. In other words, a token transition is never partial; it is either complete or it does not happen at all.

   Do not use an interrupting region if it is not desired to abort all flows in the region in some cases. For example, if the same execution of an activity is being used for all its invocations, then multiple streams of tokens will be flowing through the same activity. In this case, it is probably not desired to abort all tokens just because one leaves the region. Arrange for separate invocations of the activity to use separate executions of the activity when employing interruptible regions, so tokens from each invocation will not affect each other.

*Notation

   An interruptible activity region is notated by a dashed, round-cornered rectangle drawn around the nodes contained by the region. An interrupting edge is notation with a lightning-bolt activity edge.


   Figure 12.98 - InterruptibleActivityRegion notation with interrupting edge

*Presentation Options

   An option for notating an interrupting edge is a zig zag adornment on a straight line.


   Figure 12.99 - InterruptibleActivityRegion notation with interrupting edge

*Examples

   The first figure below illustrates that when an order cancellation request is made—only while receiving, filling, or shipping) orders—the Cancel Order behavior is invoked.

   [order

Figure 12.100 - InterruptibleActivityRegion example

   Invoice

   Interruptible regions are introduced to support more flexible non-local termination of flow.

*Changes from previous UML

   Interruptible regions in activity modeling are new to UML 2.0.