Compensation Handlers
Within BPEL processes, Compensation refers to the ability to undo or roll back
activities that have occurred within a particular scope of a running process. A scope
in a BPEL process is analogous to a block of Java code that starts with a '{' and ends
with a '}'. Typically a scope within a BPEL process represents a particular piece
of functionality that is being performed. Within the NetBeans BPEL designer, the
scope of blocks of code is represented by a solid rectangle drawn around a block of
activities. A Compensation Handler is a BPEL code construct that is executed when
a scope is terminated unexpectedly and any processing that has been performed
during that scope needs to be undone.
NetBeans does not provide any provision for graphical editing of Compensation
Handlers within the BPEL designer. To add a Compensation Handler to a BPEL
process, we need to switch to the Source view and manually enter the XML for the
Compensation Handler. Right-clicking on a scope within the BPEL designer and
choosing Goto Source will open the Source view at the beginning of the selected
scope. To add a compensation handler, we need to add an XML element for the
compensation handler
Chapter 9
[ 197 ]
Termination Handlers
A termination handler is in many respects similar to a compensation handler.
Pages:
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180