Using Pick as a Start Activity
Introduction
This sample demonstrates how to use a BPEL pick activity to start a process when the message exchange involves different incoming messages or multiple partner links.
In this example, two different types of messages are received over two different partner links. The process consists of the following:
- A pick activity with the "createInstance" attribute set to yes
- OnMessage handlers for each of the message types being processed
- The two types of messages that the process handles are a custom order message and a UBL order message. UBL is the Universal Business Language, a "generic XML interchange format for business documents that can be extended to meet the requirements of particular industries." UBL is published by the same organization that publishes the BPEL specification, OASIS.
- The first onMessage handler has an assign activity to create an acknowledgement response message corresponding to the received message. The response message includes data from the received message.
- Both onMessage handlers have a reply activity to send the response message back via the same partner link through which the received message arrived.
The following diagram represents the process. The onMessage handler on the left contains a sequence primary activity that contains the assign and reply activities. Note that onMessage handlers may directly contain only one activity. The onMessage handler on the right contains an implicit flow primary activity that contains the assign and reply activities. The flow activity is hidden (to save space) because ActiveBPEL Designer has added it automatically.
Deploying the Process
Running the Process
The OASIS-provided sample ublOrderMessage.xml does not comply with their schema. Therefore, you must disable validation before simulating the process in ActiveBPEL Designer or running it in the ActiveBPEL Server. This is done by un-checking the "Validate Input/Output messages against schema" option:
- For ActiveBPEL Designer, visit "Window > Preferences > ActiveBPEL > Simulation".
- For the ActiveBPEL Server, visit the administration console's "Configuration" page.
See Running the Samples.
There
are two separate services, one for the order process message and one
for the
UBL order message. For the order process message, use the service name
orderProcessPLTService and the sample data file orderMessage.xml.
For the UBL order message, use the service name ublOrderPLTService and
the
sample data file ublOrderMessage117.xml (not
ublOrderMessage.xml)
Copyright © 2004–2006 Active Endpoints, Inc. - All Rights Reserved
