BPEL message relevance

Source: Internet
Author: User

Message relevance is a BPEL4WS mechanism that allows a process to participate in stateful sessions. Message relevance can be used for multiple purposes. For example, it can be used to match regular customers or known customers to long-running business processes.When a message arrives for a Web Service implemented by BPEL, the message must be sent to an appropriate place-either to a new instance of the process or to an existing instance..The problem to solve in message relevance is to determine which conversation a message belongs.In BPEL, this task refersLocate/instantiate an instance.

In many distributed object systems, one of the aspects involved in routing a message is to check the explicit messageInstance idThe latter identifies the destination. Although the routing process is very similar, the BPEL instance is not identified by an explicit instance field, but by one or more key fields in the exchanged message. For example, in the order processing system, the order number can be used to identify a specific instance of the process.In terms of BPEL, these sets of data fields used to identify the process instance are called related sets.

Each BPEL correlation set has a name associated with it, which consists of some attributes defined by WSDL. AttributeIt is defined in the WSDL document as a typed data element with a name. Its value is extracted from the instance of the WSDL message by applying a message-specific XPath expression.In the WSDL, usePropertyaliasDefine every such ing. Because these mappings are message-specificAttributeThere can be multiple associatedPropertyalias. For example, a WSDL document may state attributes.NameIt also corresponds to the WSDL messageLoginmsgInUsernameParts and WSDL messagesOrdermsgInLastnameParts.By using both properties and propertyalias, The BPEL creators can reference a single logical segment in the information in the same way, even if the segment may appear in different forms in a group of messages.
To use the relevant set, the BPEL creator can define the relevant set by enumerating the attributes of the set, and thenReceive,Reply,InvokeOrPickActivity references this set. These definitions and references are used to determine the information fragments that interest the BPEL runtime, and these fragments are checked at different stages of the execution process.Each instance of a process is instantiated as a related set defined by the process. Each instantiation (process) is initialized exactly once during the execution of the Process instance.And is used only when comparing incoming and outgoing messages. If you try to reinitialize a correlation set or use an uninitialized correlation set,Bpws: correlationviolation. Extract the values of the correlation set referenced by the activity. For initialization or comparison, each attribute application that makes up the referenced correlation set is involved.Processalias(This processalias corresponds to the specific WSDL message being checked ).

BecauseReceiveAndPickActivities provide entry points for entering the process. Therefore, related sets often appear in these activities to support routing of messages to instances.If a correlation set appears inReceiveOrPickActivity, andInitiationWhen the attribute is set to "yes ",ReceiveOrPickWhen an active message arrives, the activity extracts the values of each attribute of the relevant set from the incoming message, then, compare the extracted value with the value stored in all instances of the process for the same correlation set, and route the message to an instance with a matching value.Similarly,ReplyAndInvokeThe related sets in the activity (these two types of activities are used to process outbound operations) are often used to verify that the data contained in the outgoing message is consistent with the data contained in the specified related set instance. For example, if a correlation set appears inReplyActivity, andInitiationIf the attribute is set to "yes", the activity extracts the attribute values that constitute the relevant set from the outgoing message, and compare these values with the stored values of the instantiated related sets for the instance. If the values in the messages corresponding to the related set are different from those in the related set of the instance,Bpws: correlationviolation. In all the activities that can appear in the related set,InitiationAttribute is used to tell the runtime to initialize the relevant set by using the values contained in the message entered into the current activity. InInvokeThe related set that appears during the activity has another attribute.Pattern, Which specifiesInvokeThe relevant set to be applied during the activity execution.PatternThe property can be set to "in", indicating that the related set will be applied to the response of the call, or the value can be "out ", indicates that the related set is applied at the start of the call, or the value is "both". This naturally means that the related set must be applied in both stages.

Multiple related sets can appear in a single activity, some of which are initialized and used for comparison. The current BPEL specification does not define the semantics of locating an instance based on multiple related sets.

 

From: http://blog.csdn.net/lggeor/archive/2007/11/05/1867005.aspx

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.