![]() |
![]() |
|
|
Sending and Receiving Business Messages
The following sections describe how to send and receive business messages in a collaborative workflow:
Defining the Workflow to Send Business Messages
After you create a business message in the WebLogic Integration Studio by using the Compose Business Message or Manipulate Business Message action, you send the business message using the Send Business Message action. This section explains how to define a Send Business Message action in a collaborative workflow so it sends a business message to a trading partner.
To define a Send Business Message action:
Figure 5-1 Add Action Dialog Box
Figure 5-2 Add Action Dialog Box with Integration Actions
Which portion of the Send Business Message dialog box is displayed depends on the protocol with which the workflow template was configured. The following sections explain how to specify the contents of this dialog box for each of the protocols supported in the B2B integration plug-in.
Sending Business Messages Using the XOCP 1.1 Protocol
When you select the Send Business Message action in the Actions dialog box for a workflow template configured with the XOCP 1.1 protocol, the following dialog box is displayed.
Figure 5-3 Send Business Message Dialog Box for XOCP Messages
The Send Business Message dialog box displays the following tabs:
Complete the following fields in the Send Business Message dialog box.
Table 5-1 Fields in the Send Business Message Dialog Box
Assigning Message Token Information to Workflow Variables
When a business message is sent by the B2B messaging service, a message token is returned as a Java object at the programming level. The message token provides information about the message, such as the message ID, conversation ID, send success/failure, the delivery status, and the number of recipient destinations after final selection (router and filter evaluations) by the B2B engine. Applications call the getVariable method to get access to this variable.
This variable can be defined as an output variable that gets processed after the workflow ends. A message token is represented by the com.bea.b2b.protocol.messaging.MessageToken class, which is described in the BEA WebLogic Integration Javadoc.
You can configure collaborative workflows to get access to the message token by assigning the token and its associated information to workflow variables. At run time, values are assigned to the workflow instance variables after the Send Business Message action has completed.
To assign a message token and related information to workflow variables:
Figure 5-4 Token Tab
Note: The available options in this dialog box depend on the selected Quality of Service settings, as described in Defining the Quality of Service for XOCP Message Delivery in the Workflow Template.
Table 5-2 Fields in the Token Tab
If the business message was sent using the synchronous send delivery option, then the message token cannot be used to wait for acknowledgments. If it is used for this purpose, the method returns immediately.
Defining the Quality of Service for Message Delivery for a Send Business Message Action
The Quality of Service (QoS) is a set of attributes that are defined for reliable business message publishing that uses the XOCP protocol. In the Studio, you can define the QoS at the following levels:
To define QoS at the Send Business Message level:
Note: The definitions specified here apply to this Send Message action only, not to all send actions within this conversation.
Sending Business Messages Using the RosettaNet 2.0 Protocol
When you select the Send Business Message action in the Actions dialog box for a workflow template configured with the RosettaNet 2.0 protocol, the following dialog box is displayed.
Figure 5-6 Send Business Message Dialog Box for RosettaNet 2.0 Messages
Complete the following fields in the Send Business Message dialog box.
Table 5-3 Buttons and Fields in the Send Business Message Dialog Box
For more information about sending RosettaNet 2.0 messages, see Implementing RosettaNet for B2B Integration. Sending Business Messages Using the RosettaNet 1.1 Protocol When you select the Send Business Message action in the Actions dialog box for a workflow template configured with the RosettaNet 1.1 protocol, the following dialog box is displayed. Figure 5-7 Send Business Message Dialog Box for RosettaNet 1.1 Messages
Complete the following fields in the Send Business Message dialog box.
Table 5-4 Buttons and Fields in the Send Business Message Dialog Box
For more information about RosettaNet 1.1 messages, including a few examples, see Implementing RosettaNet for B2B Integration.
Defining the Workflow to Receive Business Messages
A workflow can receive a business message in the following circumstances:
The following sections describe procedures for setting up your workflow to receive business messages for each of the protocols supported in the B2B integration plug-in.
Defining Business Message Receive Events
If a workflow waits to receive a business message, such as a reply to a request or a subsequent (not an initial) request, you must define a Business Message Receive event. This event is triggered at run time when the appropriate business message is received in the conversation.
To define a Business Message Receive event:
Figure 5-8 Event Properties Dialog Box
The display of the Event Properties dialog box is refreshed. Which contents are displayed depends upon the protocol with which the workflow template has been configured. The following sections explain how to define the Receive Business Event for each of the protocols supported by the B2B integration plug-in.
Defining a Business Message Receive Event for the XOCP 1.1 Protocol
If the workflow template is configured with the XOCP 1.1 protocol, when you select the Conversation event type, the following Event Properties dialog box is refreshed with the following contents.
Figure 5-9 Event Properties Dialog Box for Defining a Receive XOCP Message Event
To configure a Business Message Receive event for an XOCP message, select values for the following fields in the Event Properties dialog box.
Table 5-5 Fields in the Event Properties Dialog Box
At run time, when the business message is received, the event is triggered and the target variable is set to the business message that was just received. If a router variable is specified, it contains an XPath expression that can be used to reply to the sender. For more information, see Defining the Workflow to Send Business Messages. Defining a Business Message Receive Event for the RosettaNet 2.0 Protocol If the workflow template is configured with the RosettaNet 2.0 protocol, the display of the Event Properties dialog box is refreshed with the following contents when you choose the Conversation event type. Figure 5-10 Event Properties Dialog Box for Defining a Receive RosettaNet 2.0 Message Event
To configure a Business Message Receive event for a RosettaNet 2.0 message, select values for the following fields in the Event Properties dialog box.
Table 5-6 Fields in the Event Properties Dialog Box
At run time, when the business message is received, the event is triggered and the target variables are set to the business message that was just received. For more information about defining a business message receive event for workflow templates configured with the RosettaNet 2.0 protocol, including examples, see Implementing RosettaNet for B2B Integration. Defining a Business Message Receive Event for the RosettaNet 1.1 Protocol If the workflow template is configured with the RosettaNet 1.1 protocol, when you select the Conversation event type, the display of the Event Properties dialog box is refreshed with the following contents. Figure 5-11 Event Properties Dialog Box for Defining a Receive RosettaNet 1.1 Message Event
To configure a Business Message Receive event for a RosettaNet 1.1 message, select the name of a target workflow variable of type XML in which to store the RosettaNet 1.1 XML business document content. At run time, when the business message is received, the event is triggered and the target variables are set to the business message that was just received. For more information about defining a business message receive event for workflow templates configured with the RosettaNet 1.1 protocol, including examples, see Implementing RosettaNet for B2B Integration.
![]() |
![]() |
![]() |
|
Copyright © 2001 BEA Systems, Inc. All rights reserved.
|