JBoss.orgCommunity Documentation

Chapter 4. Unsupported

4.1. Parallel
4.2. Global Escape
4.3. Raise
4.4. Unordered
4.4.1. Syntax
4.4.2. Usage
4.5. Merge
4.5.1. Syntax
4.5.2. Usage

This chapter describes constructs that are still work in progress.

This means that they may be included in the tool support for the notation, but may change in a future version. So any use of these constructs are not guaranteed to be supported in future versions of the tools.

The parallel construct defines a set of paths that represent behaviour that should occur concurrently.

The syntax for the parallel construct is:

For example,

The concept of a 'global escape' is to support the abrupt termination of a set of activities based on the occurance of a situation. The situation may result from an interaction, or an internal condition within one of the co-operating participants, which subsequently results in the other parties being informed to 'escape' from their normal activities.

There can be zero or more catch blocks, and zero or more interupt blocks.

The catch block represents a set of activities triggered based on an exception being raised at local participant (see the raise activity. If a located participant is specified, then this will be the participant at which the exception will be raised - and the initiator participant for any subsequent activity performed in the block. If more than one participant is specified, then each of these participants will need to be synchronized in their decision to escape from the try block.

The interrupt block represents a set of activities triggered by some internal condition. If a located participant is specified, then this will be the participant at which the interrupt will occur. As with the catch block, this will also be the initiator participant for any subsequent activity performed in the block. If more than one participant is specified, then each of these participants will need to be synchronized in their decision to escape from the try block.

The following example shows how internal decisions within the Buyer can be used to escape from the repetition of receiving quotes from the Seller, and result in either accept or cancel quote messages being sent to the Seller.

The following variation repetitively gets a quote from the Supplier until the Buyer decides to escape from the normal block by raising a Quit type that is caught at the Buyer and used to send a CancelQuote message to the Seller.

The raise construct is used in conjunction with the global escape catch block, to enable a normal flow to terminate and jump to the appropriate catch block.

As shown in the previous section on global escape, the raise can be used to escape from a normal flow of activities into a catch block.