This documentation is for WSO2 Enterprise Integrator version 6.5.0 . View documentation for the latest release in the 6.x.x family and the latest release in the 7.x.x family.

All docs This doc
Skip to end of metadata
Go to start of metadata


This sample illustrates <pick/>, where a process instance execution can be specified based on a particular received event. The received event can be <onMessage/> or <onAlarm/>. Additionally, users have to define a correlation set and refer it in each event in order to determine the correct execution path.

Deploying the Sample

WSO2 BPS provides a sample, which can be deployed and executed to understand the Pick construct. Follow the instructions below to deploy and trigger the process.

1. Log in into BPS server management console and select "Processes -> Add" under the "Main" menu.

2. Upload the <EI_HOME>/samples/business-process/bpel/ directory.

3. In the "Deployed Processes" window, click the "Process ID" to access its "Process Information" window.

4. Under the "WSDL Details" widget, trigger the process using the "TryIt" link to create an instance of it.

Example Usage

Refer to when going through the following instructions.

Defining correlation set

This property is defined in the PickService.wsdl as follows.


The property points to a particular message element which is called <Deck/> in the dealDeckRequest message type. For example,


Once a message of the type dealDeckRequest is received, an instance of correlation set will be created based on the value of the element <Deck/>. In this sample, when a dealDeckRequest message is received, a process instance is created due to createInstance="yes". Also, a correlation set instance is created due to initiate="yes".


Suppose there's an incoming message for an operation defined in <onMessage>. Once the message is received to the process, it'll be verified with correlation set instance. If there's an existing process instance which is compliant with the correlation set instance, then the instance will execute the particular set of activities defined. If the incoming message's operation is "pickSpade", the partnerLink is "IncomingLink", and the incoming message is compliant with the correlation set instance of the process instance, following activities are executed.


           <from>bpel:getVariableProperty("spadeRequest", "srvns:deck")</from>

  • No labels