Java Reference
In-Depth Information
The <sequence> activity
The <sequence> activity is just a wrapper that defines a collection of activities that should be
executed sequentially.
The <receive> activity
The <receive> activity is really the port of entry for a process. It represents the first item in
a process that will be invoked when a message arrives. Essentially, processes wait for a mes-
sage to arrive that matches the definition in the <receive> activity, which is complete once
the message arrives. The <receive> activity captures the incoming message in a variable (in
this case, “myVar”) so that it is available for the remainder of the process, does a few other
things, and exits.
NOTE
Just as it can be helpful to think of a WSDL portType as a Java interface, you can think of a BPEL
<receive> activity like a main method in Java; it's the first thing that happens when a process is
invoked.
Here is the Hello World <receive> activity again:
<receive
name="start"
partnerLink="helloPartnerLink"
portType="test:HelloPortType"
operation="hello"
variable="myVar"
createInstance="yes"/>
The createInstance attribute indicates whether a new instance should be dedicated to the
execution of this process. The <receive> activity is known as a “start” activity because it is
capable of receiving messages and marks the beginning of a process. There is one other start
activity, <pick> , which waits for a message to arrive that corresponds to one within a set of
possible messages, and then executes the activity associated with it.
The <assign> activity
Now that the incoming message has been captured, the next activity is almost always an
<assign> , as is the case in this example. Assignment consists of copying variable data. It can
also be used to create new data based on expressions.
Search WWH ::




Custom Search