Understanding sequential invocation
Within the <process>
element, a BPEL process will usually have the top-level <sequence>
element. Within the sequence, the process will first wait for the incoming message to start the process. This wait is usually modeled with the <receive>
construct. It could also be modeled with the <pick>
activity, if we expect more than one incoming message. We will explain the <pick>
activity in Chapter 10, Events and Event Handlers.
Then, the process will invoke the related services using the <invoke>
construct. Such invocations can be done sequentially or in parallel. If we want to make them sequential, we simply write an <invoke>
activity for each invocation, and the services will be invoked in that order. Finally, the process will return a response using <reply>
. This is shown in the following code excerpt:
<process ...> ... <sequence> <!-- Wait for the incoming request to start the process...