Sending and Receiving Messages with EAI MSMQ Transport

The following procedure describes how to set up your system to send a message to an external system using the EAI MSMQ Transport and receive a synchronous message back from the external system by the EAI MSMQ Transport.

To send a literal to MSMQ and receive a response

  1. Access the Windows Computer Management tool by choosing the Start menu, Programs, Administrative Tools, and then Computer Management.

  2. Set up an MSMQ queue to receive messages from the Siebel application, and give the queue an easily identified name, such as fromsiebel.

  3. Set up another queue to send messages to the Siebel application, and give the queue an easily identified name, such as tosiebel.

  4. Set up a workflow in Siebel Tools to send a message out and receive a message back in response using EAI MSMQ Transport. The workflow should contain the following steps, as shown in the following image:

    1. EAI Siebel Adapter (Query)

    2. EAI XML Converter (PropSet to XML)

    3. EAI MSMQ Transport (Send Receive)

    4. XML Converter (XML to PropSet)

    5. Siebel Adapter (Upsert)

    This image is described in the surrounding text.
    Note: For details on the Business Process Designer, see Siebel Business Process Framework: Workflow Guide.
  5. Create the following process properties:

    Name Data Type In/Out

    Test Message

    Hierarchy

    In/Out

    Test XML

    Binary

    In/Out

    Error Code

    String

    In/Out

    Error Message

    String

    In/Out

    Object Id

    String

    In/Out

    Siebel Operation Object Id

    String

    In/Out

  6. Set up the first step of the workflow after Start to use EAI Siebel Adapter with the Query method to query the information from the Siebel Database using the following input and output arguments:

    Input Argument Type Value Property Name Property Data Type

    OutputIntObjectName

    Literal

    Sample Employee

    Not applicable

    Not applicable

    PrimaryRowId

    Process Property

    Not applicable

    Object Id

    String

    Property Name Type Output Argument

    Test Message

    Output Argument

    SiebelMessage

  7. Set up the second step to use the EAI XML Converter business service with the IntObjHierToXMLDoc method to convert the data extracted from the Siebel Database to XML format, using the following input and output arguments:

    Input Argument Type Property Name Property Data Type

    SiebelMessage

    Process Property

    Test Message

    Hierarchy

    Property Name Type Output Argument

    Test XML

    Output Argument

    <Value>

  8. Set up the third step of the workflow, after Start, to use the EAI MSMQ Transport business service with the SendReceive method to receive the incoming XML message, using the following input and output arguments:

    Input Argument Type Value Property Name Property Data Type

    <Value>

    Process Property

    Not applicable

    Test XML

    Binary

    MsmqPhysicalQueueName

    Literal

    fromsiebel

    Not applicable

    Not applicable

    MsmqQueueMachineName

    Literal

    SiebelServer1

    Computer name where the Siebel MSMQ Transport is running.

    Not applicable

    Not applicable

    MsmqRespQueueMachineName

    Literal

    SiebelServer2

    Not applicable

    Not applicable

    MsmqRespQueueName

    Literal

    tosiebel

    Not applicable

    Not applicable

    Property Name Type Output Argument

    Test XML

    Output Argument

    <Value>

  9. Set up the fourth step to use the EAI XML Converter business service with the XMLDocToIntObjHier method to convert the XML message to a Siebel Message using the following input and output arguments:

    Input Argument Type Property Name Property Data Type

    <Value>

    Process Property

    Test XML

    Binary

    Property Name Type Output Argument

    Test Message

    Output Argument

    SiebelMessage

  10. Set up the last step to use the EAI Siebel Adapter with the Upsert method to update the Siebel Database, using the following input argument:

    Input Argument Type Property Name Property Data Type

    SiebelMessage

    Process Property

    Test Message

    Hierarchy

  11. Save the workflow and run a test using the Workflow Simulator.

    The output property set must have a message in the Value field. Additionally, the EndOfData argument in the property set must be set to True.

    Note: To test this scenario adequately, you must have a partner application that can accept the message and return a response. The correlation ID of the response message must be set to the message ID of the message originally sent by the Siebel application.