ActiveVOS Designer User’s Guide

Scope

The scope activity provides a context for a subset of activities. It can contain fault, event, and compensation handling for activities nested within it and can also have a set of defined variables and a correlation set.

A scope can encompass a logical unit of work, making it manageable to execute, and then, if need be, reverse an activity. For example, if a customer cancels a paid travel reservation, the money must be returned and the reservation must be canceled without affecting other reservations. By enclosing activities in a scope, you can create the structure and conditions in which to manage activities as a unit.

Each scope has a primary activity, which can be a complex structured activity.

Required and optional properties for Scope

Required Properties

Optional Properties

Isolated. Refer to Setting Isolated to “Yes” in a Scope

Name. See Selecting Activity Labels

Join Condition. See Creating a Join Condition for an Incoming Link

Suppress Join Failure. See Process Properties

Comment. See Adding Comments to a Process

Documentation. See Adding Documentation to a Process

Setting Visual Properties and Using Your Own Library of Images

Execution State. See Viewing the Execution State of an Activity or Link

Extension Attributes and Elements. See Declaring Extension Elements and Attributes.

To build a scope:

  1. From the Container palette, drag a Scope activity to the Process Editor canvas.
  2. In the Properties view, set Isolated to Yes or No.
  3. On the Process Editor canvas, right-mouse click the scope activity to add rules and conditions, including:
  4. From the Activity palette, drag activities to the scope container, and select activity properties.
  5. To view all the activities in the scope, right-mouse click on the scope container and select the Show options, as desired. The asterisk indicates an activity is contained.

The following illustration shows a sample scope activity with all handlers displayed.

Scope activity with fault, event, and compensation handlers displayed

Note: You can save an activity, or group of activities to the Custom palette for re-use. Because a scope can be complex, it is a good candidate for re-use. For more information, see Creating a Custom Activity.

XML Syntax

<scope isolated=”yes|no”? exitOnStandardFault="yes|no"?
  standard-attributes> 
    standard-elements
    <variables>?
     ...
    </variables>
    <partnerLinks>?
     ...
    </partnerLinks>
    <correlationSets>?
     ...
    </correlationSets>
    <messageExchanges>?
     ...
    </messageExchanges>
    <faultHandlers>?
    ...
    </faultHandlers>
    <compensationHandler>?
    ...
    </compensationHandler>
    <eventHandlers>?
    ...
    </eventHandlers>
    <terminationHandler>?
     ...
    </terminationHandler>
  activity
</scope>

Example

<scope isolated=”no”>
    <faultHandler>
     <reply>...</reply>
    </faultHandler>
    <flow>
      <invoke partnerLink=”Seller” portType=”Sell:Purchasing”
        operation=”SyncPurchase”
        inputVariable=”sendPO”
        outputVariable=”getResponse”/>
      <invoke partnerLink=”Shipper” portType=”Ship:Orders”
        operation=”OrderShipment”
        inputVariable=”sendShipOrder”
        outputVariable=”shipAck”/>
    </flow>
</scope>

See also: