pick Activity


The pick activity waits for one of potentially several events to occur, often including a timeout and always including receipt of an inbound message. The activity completes when any one of its immediately embedded activities completes:

  • The onMessage event processes an inbound message and is similar to a receive activity.

  • The onAlarm event waits for a passage of time or for a specific date and time.

Both those events can embed other activities.

A variation of the pick activity creates an instance of a BPEL process, but in that case, no timeout is possible and any inbound message can create an instance.

In most cases, the pick activity is not concurrent with other activities.

Listing 8.12 shows an example. A further explanation of each embedded activity follows.

Listing 8.12: pick activity

image from book
 <pick name="CustomerResponseToQuote">    <onMessage operation="requestMore"               partnerLink="ProcessQuotePL"               portType="ProcessQuotePT"               variable="furtherConsiderationReq">       <correlations>          <correlation initiate="no" set="applicantEMailAddr" />       </correlations>       <sequence name="customerWantsUnderwriterToContactPostReview">          <assign name="copyQuoteForReview">             <copy>                .                .             </copy>          </assign>          <invoke name="underwriterFollowupAndCall"                  partnerLink="UnderwriterPL"                  portType=" UnderwriterPT"                  operation="retrieveAndFollowUp"                  inputVariable="underwriterReview"/>       </sequence>    </onMessage>    <onAlarm>       <for>'PT5M'</for>       <invoke .../>    </onAlarm> </pick> 
image from book

onMessage Event

Among the attributes of the onMessage event:

  • createInstance indicates whether the activity creates a BPEL instance. Valid values are yes and no. The default is no.

  • partnerLink identifies the partner link used to connect to the service.

  • portType identifies the port type but is optional because the port type is implied by the partner link and by the role identifier myRole in that partner link.

  • operation identifies the service operation.

  • variable identifies a variable that receives the business data from the service. Specify the variable attribute only if you don't specify the fromParts element.

  • messageExchange references a message exchange.

Among the elements in the onMessage event:

  • correlations references one or more correlation sets.

  • fromParts identifies a set of message parts and related variables to receive business data. Specify the fromParts element only if you don't specify the variable attribute.

onAlarm Event

The onAlarm event requires the presence of at least one of the following elements:

  • for identifies the duration that passes before the alarm is fired. The start time for that duration is when the pick activity begins. Specify this element only if you don't specify the until element.

  • until identifies the calendar date and clock time when the alarm is triggered. Specify this element only if you don't specify the for element.




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