Let's now have a more detailed look into what we did and try to understand what a BPEL process is. A BPEL process is basically a piece of source code with the .bpel
extension, which is executed on a process server. BPEL uses the XML vocabulary to write the code. So far, we have used the visual editor to compose the BPEL process. However, we can switch to the source code view.
A BPEL process consists of steps. Each step is called an activity. BPEL supports basic and structured activities. Basic activities represent basic constructs and are used for common tasks listed, as follows:
<invoke>
<receive>
(receiving a request)<reply>
<assign>
<throw>
and <rethrow>
<wait>
<exit>
We can then combine these and other basic activities and define complex flows that specify exactly the steps of a business process. To combine basic activities, BPEL supports several structured activities. The most important are as follows:
<sequence>
) for defining a set of activities that will be invoked in an ordered sequence<flow>
) for defining a set of activities that will be invoked in parallel<if>
) for implementing branches<while>
, <repeatUntil>
, <forEach>
) for defining loops<pick>
Each BPEL process will also define partner links using <partnerLinks>
. Partner links are other services that use the BPEL process or are used by the BPEL process. A BPEL process also declares variables using <variables>
.