BEA Logo BEA Collaborate Release 2.0

  BEA Home  |  Events  |  Solutions  |  Partners  |  Products  |  Services  |  Download  |  Developer Center  |  WebSUPPORT

 

   Collaborate Documentation   |   Workflows   |   Previous Topic   |   Next Topic   |   Contents   |   Index

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 WebLogic Process Integrator 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:

  1. In any dialog box where you can specify an action (such as the Task, Decision, Event, or Start Properties dialog box), click Add to display the Add Action dialog box.

    Figure 5-1 Add Action Dialog Box


     

  2. Click the Integration Actions folder to expand it.

    Figure 5-2 Add Action Dialog Box with Integration Actions


     

  3. Click the WebLogic Collaborate folder to expand it.

  4. Select Send Business Message. Then click OK to display the Send Business Message dialog box.

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 WebLogic Collaborate plug-in to the Studio.

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

Field

Description

Input Message Variable

Name of a WebLogic Process Integrator Java Object variable that contains the business message to be sent.

Router Expression Content

Contents of the Router Expression field: a trading partner name, an XPath expression, or a variable name. Router expressions might be overridden by router expressions specified in the WebLogic Collaborate repository. For more information about routers, see Advanced Configuration Tasks in Administering BEA WebLogic Collaborate.

This selection box has the following values from which to choose:

Router Expression

Router expression that is used when the message is sent.

If this field is blank, a null filter is used. For more information about router expressions, see Advanced Configuration Tasks in Administering BEA WebLogic Collaborate.

Target Role

The role in the conversation to which the message is sent. Required field.

Use Collaboration QoS

If the workflow template is configured with the XOCP protocol, this check box appears, allowing you to specify whether to use the Quality of Service defined at the template level or at this Send Business Message action level:

Notes

Optional descriptive text.


 

Assigning Message Token Information to WebLogic Process Integrator Variables

When a business message is sent by the BEA WebLogic Process Integrator 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) in WebLogic Collaborate. 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 Javadoc.

You can configure WebLogic Process Integrator workflows to get access to the message token by assigning the token and its associated information to WebLogic Process Integrator 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 WebLogic Process Integrator variables:

  1. Open the Send Business Message dialog box, as described in Defining the Workflow to Send Business Messages.

  2. In the Send Business Message dialog box, click the Token tab.

    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.

  3. Complete the following fields in the Token tab.

    Table 5-2 Fields in the Token Tab

    Field

    Description

    Token Variable

    Assigns the returned message token to a WebLogic Process Integrator Java Object variable. This object can then only be passed to a business operation for processing.

    Send Status

    Indicates whether the message was sent successfully (true for success and false for failure). Assigns the value to a WebLogic Process Integrator Boolean variable that can be accessed by the workflow or passed to a business operation.

    Number of Initial Recipients

    Number of recipients assigned by WebLogic Collaborate after the message has traversed the router. Assigns the value to a WebLogic Process Integrator Integer variable that can be accessed by the workflow or passed to a business operation.

    This field appears only if the QoS Messaging Confirmation setting is one of the following selections:

    Number of Actual Recipients

    Actual number of recipients. Assigns the value to a WebLogic Process Integrator Integer variable that can be accessed by the workflow or passed to a business operation.

    This field is shown only if the QoS Messaging Confirmation setting is "To all destinations."

    Ack Elapsed Time (ms)

    Time taken, in milliseconds, for acknowledgments to be sent by all recipients. The value in this field is assigned a WebLogic Process Integrator Long variable that can be accessed by the workflow or passed to a business operation.

    This field is shown only if the QoS Messaging Confirmation setting is "Confirm message delivery to all destinations."

    Notes

    Optional descriptive text.


     

    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 WebLogic Process Integrator, you can define the QoS at the following levels:

To define QoS at the Send Business Message level:

  1. Make sure the Use Collaboration QoS check box is unselected in the Send Business Message action dialog box.

  2. In the Send Business Message dialog box, select the QoS tab.

    The QoS tab appears.

    Figure 5-5 QoS Tab in the Send Business Message Action Dialog Box


     

  3. Complete the fields in the QoS tab as described in Table 2-3.

  4. Click OK.

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

Field

Description

Message Type

Specifies the type of RosettaNet 2.0 message to send. To send a business message, click Action.

Input Content Variable

Specifies the name of the WebLogic Process Integrator variable of type XML that contains the RosettaNet 2.0 business document content.

Input Attachment Descriptor Variable

Specifies the name of the WebLogic Process Integrator variable of type XML that contains the attachment file description to be included in the business message.

Output Status Variable

Specifies the name of the WebLogic Process Integrator variable of type Integer that will contain the message send status.

Notes

Optional descriptive text.


 

For more information about sending RosettaNet 2.0 messages, see Implementing RosettaNet for BEA WebLogic Collaborate.

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

Field

Description

Message Type

Specifies the type of RosettaNet 1.1 message to send. To send a business message, click Action.

Input Content Variable

Specifies the name of the WebLogic Process Integrator variable of type XML that contains the RosettaNet 1.1 business message content.

Output Status Variable

Specifies the name of the WebLogic Process Integrator variable of type Integer that will contain the message send status.

Notes

Optional descriptive text.


 

For more information about RosettaNet 1.1 messages, including a few examples, see Implementing RosettaNet for BEA WebLogic Collaborate.

 


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 WebLogic Collaborate plug-in to the Studio.

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:

  1. Display or add an event node as described in Working with Workflow Components in Using the BEA WebLogic Process Integrator Studio.

  2. Double-click the event shape or right-click it in the folder tree and select the Properties command to display the Event Properties dialog box.

    Figure 5-8 Event Properties Dialog Box


     

  3. In the Description field, enter a meaningful name for the Receive Business Message event.

  4. In the drop-down list labeled Type, select Collaboration event.

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 WebLogic Collaborate plug-in to the Studio.

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

Variable

Description

Event Type

Select Incoming Business Message to define the event to wait for an incoming business message. (Selecting a method of conversation termination is explained in Defining the End of Conversation Participant Workflows.)

Target Variable

Name of a target WebLogic Process Integrator variable (of type Java Object) in which to store the business message. Required field.

Router Expression

Name of a WebLogic Process Integrator variable (of type String) in which to store an XPath expression. The value represents the XPath expression used by the sender to send the message. This XPath expression can be used later, in a router expression, to publish a reply to the current message. Optional field.

Sender Name

Name of a WebLogic Process Integrator variable (of type String) in which to store the name of the Trading Partner that sent the message. If the Convert Sender's Name to XPath check box is selected, then this name is converted to an XPath expression.

XPath Conversion

If this check box is selected, the contents of the variable specified in the Sender's Name field are converted to an XPath expression suitable for use in the Send Business Message action.

If it is not selected, the Sender's Name variable is used as the actual name of the sending Trading Partner.


 

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

Variable

Description

Content Variable

Name of a target WebLogic Process Integrator variable of type XML in which to store the RosettaNet 2.0 XML business document content.

Attachment Descriptor Variable

Name of a target WebLogic Process Integrator variable of type XML in which to store the RosettaNet 2.0 message attachment 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 2.0 protocol, including examples, see Implementing RosettaNet for BEA WebLogic Collaborate.

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 WebLogic Process Integrator 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 BEA WebLogic Collaborate.

 

back to top previous page next page