Start Activities


In a BPEL process, the first activity (other than flow, scope, or sequence) must be a start activity, which is an activity that can create an instance of the BPEL process. A start activity must be able to receive a message and must have a createInstance attribute that is set to yes. Two kinds of start activities are available:

  • a receive activity

  • a pick activity that contains only onMessage events

A flow activity causes concurrent processing, so a start activity embedded in that activity isn't necessarily the first to run. Two rules apply. First, every activity that may run first in the process must be a start activity. The following outline isn't valid because in the second receive activity, the createInstance attribute is set to no by default, and that activity can be issued before the BPEL engine creates the process instance.

 <!- Not Valid! -> <process>    <flow>       <receive createInstance="yes"/>       <receive/>    </flow> </process> 

Second, if multiple start activities are in a flow activity and any of them reference correlation sets, these activities must reference at least one correlation set in common; also, the initiate attribute for each of the common correlations must be set to join, as in the following outline.

 <process>   <correlationSets>     <correlationSet name="invoiceSet"       properties="invoiceNumber countryCode">     </correlationSet>   </correlationSets>   <flow>     <receive createInstance="yes">       <correlations>         <correlation set="invoiceSet" initiate="join"/>       </correlations>     </receive>     <receive createInstance="yes">       <correlations>         <correlation set="invoiceSet" initiate="join"/>       </correlations>     </receive> </flow> </process> 




SOA for the Business Developer. Concepts, BPEL, and SCA
SOA for the Business Developer: Concepts, BPEL, and SCA (Business Developers series)
ISBN: 1583470654
EAN: 2147483647
Year: 2004
Pages: 157
Authors: Ben Margolis

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net