Scopes
Scopes provide a way to divide a complex business process into hierarchically organized parts scopes. Scopes provide behavioral contexts for activities. In other words, scopes address the problem that we identified in the previous section and allow us to define different fault handlers for different activities (or sets of activities gathered under a common structured activity, such as<sequence>
or<flow>)
. In addition to fault handlers, scopes also provide a way to declare variables and partner links that are visible only within the scope. Scopes also allow us to define local correlation sets, compensation handlers, event handlers, termination handler, and message exchanges. We will discuss these topics later in this chapter.
The following code excerpt shows how scopes are defined in BPEL. We can specify<partnerLinks>, <messageExchanges>, <variables>, <correlationSets>, <faultHandlers>, <compensationHandler>, <terminationHandler>...