A structured activity contains one or more other activities
that are arranged on one or more separate paths. Here are some tips
on how to work with these activities in the editor.
About this task
Here is a list of the structured activities that are relevant
to this topic:
- Choice activity

- This activity evaluates the conditions on two or more control
paths and follows the appropriate one. It can contain case and otherwise elements.
- Case element

- Used within a choice activity, this element is used to
create a control path and define the conditions that will cause this
path to run. When run, the process will evaluate the conditions in
each of the case elements, and follow the first one that evaluates
to true.
- Otherwise element

- Use this element within a choice activity to create a
control path that will run when none of the other cases evaluate to true. Use this element on only one of the paths within a choice
activity. When run, the process will evaluate the conditions in each
of the case elements, and should none of them evaluate to true, it
will run the activities in this path.
- Generalized flow activity

- Use this activities to nest activities on individual, customized
control paths. This activity is equivalent to the concept of split/merge:
although there are multiple paths within the activity, only the path
that evaluates to true will be followed, and the target activity will
start the moment that path has completed.
- Link

- Use the link within a Generalized flow activity to connect
nested activities and form individual control paths. The link is used
to express a synchronization dependency. In other words, it runs under
a constraint because the link creates a dependency of one activity
and the variables it uses on another activity. You can specify a transition
condition on the link in the properties area of the BPEL process editor.
- For Each activity

- The For Each activity repeatedly runs the activities that it contains
either sequentially or in parallel for a specified number of iterations.
- The related link For Each activity - a typical usage
pattern provides excellent information on getting started
with For Each activities.
- For an example of how to use an assign activity to iterate an
array in a For Each activity, see Using assign.
- Parallel activity

- Use this activity to nest other activities that will run concurrently.
A link is used to connect the activities that it contains.
This activity is equivalent to the concept of fork/join: all the paths
within the activity are run simultaneously, and the target activity
will not fire until all paths have completed.
- Link

- Use the link within a parallel activity to connect nested
activities and form individual control paths. The link is used to
express a synchronization dependency. In other words, it runs under
a constraint because the link creates a dependency of one activity
and the variables it uses on another activity. You can specify a transition
condition on the link in the properties area of the BPEL process editor.
- Scope activity

- Use this to act as a behavioral container for one or more activities
in your process.
- You can also use a scope activity for enhanced dynamic behavior,
by using an administrative human task to grant a user administrative
privileges over the running order of the activities that are nested
within the scope. Enhanced dynamic behavior is more fully supported
by using a Collaboration Scope. See related
topics for more information.
- Sequence activity

- Use this to nest a series of activities into your process that
will run sequentially.
- While loop activity

- Use this activity to repeat one or more activities as long as
specific conditions are in place. The conditions are evaluated at
the beginning of the activity. Hence the activity is skipped if the
condition is not met on entry.
- Repeat until loop activity

- Use this activity to repeat one or more activities as long as
specific conditions are in place. The conditions are evaluated at
the end of the activity. Hence the activity is performed at least
once.
To work with a structured activity, proceed as follows:
Procedure
- Choose a structured activity from palette, and drop it
to the canvas. The activity will appear with a distinct
rectangular workspace.
Note: - If this is a choice or a receive choice activity, it will contain
a default element representing a single control path.
- With the exception of the parallel and generalized flow activities,
all structured activities differentiate the activities that they contain
into separate control paths. In parallel or generalized flow activities,
you create the control path yourself with links.
- Populate the workspace with activities from the palette. If this is the first activity that you're dropping to the workspace,
it will automatically appear in the first path. If there are already
activities on the path, then a black line will appear as you hover
over the path showing where you can drop the new activity.
- To create a new path in the structured activity (only some
structured activities support multiple paths), hover over the activity's
icon until the action bar appears, and select an element from it.
- You can expand or collapse this structured activity in
either one of the two following ways:
- Click the plus (
) or minus (
) icons
as appropriate.
- Double-click the structured activity.