Switch Activity in BPEL
This activity consists of an ordered
list of one or more conditional branches defined in a case branch, followed
optionally by an otherwise branch. The branches are considered in the order in
which they appear. The first branch whose condition is true is taken and
provides the activity performed for the switch.
If no branch with a condition
is taken, then the otherwise branch is taken. If the otherwise branch is not
explicitly specified, then an otherwise branch with an empty activity is assumed
to be available. The switch activity is complete when the activity of the
selected branch completes.A switch activity differs in
functionality from a flow activity.
For example, a flow activity enables a
process to gather two loan offers at the same time, but does not compare their
values. To compare and make decisions on the values of the two offers, a switch
activity is used. The first branch is executed if a defined condition (inside
the case branch) is met. If it is not met, the otherwise branch is executed.
Note: This activity is replaced by the if activity in BPEL 2.0 projects.
shows a switch activity with the following defined
branches.
Figure A-39 Switch Activity
0 comments:
Post a Comment