Java Reference
In-Depth Information
<wsdl:part name="Confirm" element="po:purchaseResponse" />
</wsdl:message>
<!-- Correlation properties here -->
<vprop:property name="customerId" type="xs:string"/>
<vprop:property name="orderId" type="xs:string"/>
<vprop:propertyAlias propertyName="tns:customerId"
messageType="tns:sendPurchaseResponse" part="Confirm">
<vprop:query>/purchaseOrder/cust/email</vprop:query>
</vprop:propertyAlias>
As you can see from this example, properties are defined in WSDLs, notin .bpelfiles. They
take advantage of the same extensibility mechanism that allowed you to create partner links
earlier. In effect, they are simply names for data that already exist in your messages. Property
aliases associate a vprop:property and a wsdl:message part.
In the example just shown, you've identified the customerId and orderId as the correlates.
The propertyAlias is used to map the properties to fields within the message data. Aliases
use queries in the form of a query child element, whose result type must match the type
defined in the property. They tell you how to extract the property data from the message.
NOTE
The writers of the specification went out of their way to create correlation sets to avoid having to
require that every message include some sort of specific token when you want to correlate within
a BPEL process. Doing so would have undermined the loosely coupled nature of services by tying
them, however subtly, to an implementation. Basically, correlation sets allow you to define your mes-
sages however you want, and not have to include any additional out-of-band mechanism for matching
messages to process instances.
Properties can be created using XML Schema simple types, as well as derived simple types.
A derived simple type is usually a string whose content is restricted by a pattern.
Creating correlation sets
BPEL uses correlation sets to associate messages with their proper running instances. They
can be defined globally (at the process level), or within a scope. Correlations can be used on
all types of message activities: <receive> , < reply> , <onMessage> , <onEvent> , and <in-
voke> .
You may need to specify more than one correlation set. This could happen for a single partner
if the process invokes more than one operation on a port for that partner, and if they use dif-
Search WWH ::




Custom Search