Chapter 17 Working with WS-BPEL 2.0


Scope activity

The scope activity is used to define a nested activity with its own associated variables, correlationSets, faultHandlers, compensationHandler, terminationHandler, and <eventHandlers (onAlarm and OnMessage).

WS-BPEL does not allow the definition of <partnerLinks> under a scope activity. It includes a new element named <messageExchanges> that can be shared by receive, reply and invoke activities.

BPEL scope activity defines a sub-process element that includes context variables and one default fault handler. It includes optionally one handler per fault, one compensation handler, and several event handlers (onAlarm or onMessage). These handlers are also activities executed when the corresponding event happens.

Syntax:

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

Mapping

You design a scope activity using a composite process. You define the complex activity as a black box. To display atomic activities, you must explicitly open the sub-diagram of the composite process. The different kinds of exits will be specified on the flow outgoing from the composite process: the flow with a <<Fault>> stereotype targets the fault handler activity. The flow with a <<Timer>> stereotype targets the timeout handler activity. The flow with a <<Compensation>> stereotype targets the compensation handler activity.

Extended attributes

The following extended attributes apply to the scope activity and are available from its property sheet:

Name Internal code Description
Exit on standard fault exitOnStandardFault If the value of the exitOnStandardFault attribute on a scope is set to "yes", then the process must exit immediately
Isolated Isolated When the isolated attribute is set to "yes", the scope provides concurrency control in governing access to shared variables. Such a scope is called a serializable scope. Serializable scopes must not be nested. A scope marked with isolated="yes" must be a leaf scope.

 


Copyright (C) 2007. Sybase Inc. All rights reserved.