Show how <pick/>, where a process instance execution can be specified based on a particular received event. The received event can be <onMessage/> or <onAlarm/>. Additionally user have to define a correlation set and refer it in each event in-order to determine the correct execution path.
refer TestPickOneWay.zip
<correlationSets><correlationSetname="CorrelationByDeck"properties="srvns:deck"/></correlationSets>This property is defined at PickService.wsdl as follows.
<vprop:propertyname="deck"type="xsd:token"/><vprop:propertyAliasmessageType="tns:dealDeckRequest"part="parameters"propertyName="tns:deck"><vprop:query>tns:Deck</vprop:query></vprop:propertyAlias>
Here the property points to a particular message element which is called <Deck/>
in the dealDeckRequest message type.
eg -
<dealDeck><Deck></Deck></dealDeck>
dealDeckRequest is received, an instance of
correlation set will be created based on the value of the element <Deck/>.
dealDeckRequest
message is received a process instance is
created due tocreateInstance="yes". As well a correlation set instance
is also
created due toinitiate="yes".
<receiveoperation="dealDeck"partnerLink="IncomingLink"variable="deckRequest"createInstance="yes"><correlations><correlationinitiate="yes"set="CorrelationByDeck"/></correlations></receive>
<onMessageoperation="pickSpade"partnerLink="IncomingLink"variable="spadeRequest"><correlations><correlationinitiate="no"set="CorrelationByDeck"/></correlations><sequence><assign><copy><from><literal><pickSpadeResponsexmlns="http://www.stark.com/PickService"><Deck/></pickSpadeResponse></literal></from><tovariable="spadeResponse"part="parameters"/></copy><copy><from>bpel:getVariableProperty("spadeRequest", "srvns:deck")</from><to>$spadeResponse.parameters/srvns:Deck</to></copy></assign><replyoperation="pickSpade"partnerLink="IncomingLink"variable="spadeResponse"/></sequence></onMessage>