Designer > Planning Your BPEL Process > Message Exchange Declaration

Message Exchange Declaration

Use the Message Exchange Declaration dialog to add, edit, or remove message exchange declarations for the process as a whole or for the current scope.
A message exchange value binds a synchronous receive with its reply. A message exchange value makes an explicit match between a receive and a reply, eliminating any ambiguity among concurrent execution of synchronous receives with the same partner link, port type and operation.
A message exchange is a process or scope property that you can select as an attribute of a receive, onMessage, or onEvent and their matching replies. Declare the message exchange value in this dialog. Then select the value, as needed, in the appropriate receive/reply pairs, onEvent/reply pairs, or onMessage/reply pairs.
When to Use This Declaration
The process and the child scope for a parallel forEach activity implicitly declare a default message exchange value. If a receive or a reply activity does not have a message exchange value explicitly declared on it, it has the default value that is provided by either the process or the parallel forEach's scope, depending on where the receive or reply is nested. You can still use explicit message exchange values on receives, replies, and onMessages within a parallel forEach.
The message exchange value can also be useful in multiple receive/reply, onEvent/reply or onMessage/reply pairs in a flow that have the same partner link, port type, and operation. By adding a message exchange value to the pairs, you can avoid receiving the bpel:conflictingRequest fault.
A process is required to reply to any synchronous message exchanges (receives or onMessage) it receives during execution. If there isn't one, the process faults has a bpel:missingReply fault. Each scope that declares a message exchange value tracks its active message exchanges to ensure that a reply executes prior to the scope completing.
When you add a new message exchange value, the default name is MessageExchange_1. You can edit this value, if desired.
If a message exchange declared in an inner scope has the same value as one declared an outer scope, or in the process, the inner scope's declaration overrides the outer scope's or process' declaration. Receives, onEvents, onMessages, and replies in different scopes can be matched only by using the outermost scope's message exchange declaration.