Transports and Interfaces: Siebel Enterprise Application Integration > EAI MSMQ Transport > Configuring EAI MSMQ Transport for Various Send and Receive Scenarios >

Receiving Inbound Messages with MSMQ Receiver


With the Siebel application as the receiver (inbound messaging), you design a workflow that reads from the queue and converts the XML messages found there into Siebel message format. Then, the EAI Siebel Adapter updates the appropriate tables within the Siebel Database.

NOTE:  MSMQ Receiver must run on the same machine where you have defined the receiving queue.

There are two methods for receiving messages for a Siebel application:

  • Receive and Execute Service (ReceiveDispatch)
  • Receive, Execute, Send Response (ReceiveDispatchSend)

Receiving and Dispatching MSMQ Messages with MSMQ Receiver

The following procedure describes how to set up your system to receive an inbound message from MSMQ by MSMQ Receiver, then perform an action based on that message within the Siebel application.

To receive and dispatch messages using the EAI MSMQ Transport (MSMQ Receiver)

  1. Access the Windows Computer Management tool by choosing the Start menu, Programs, Administrative Tools, and then Computer Management.
  2. Set up a queue to send messages to the Siebel application.
    1. Name the queue an easily identified name, such as toSiebel.
    2. Create a message in the queue.

      NOTE:  To test this procedure adequately, you must have a partner application that can put a valid message for the Siebel application into the queue.

  3. Create a named subsystem for the MSMQ Receiver using the following lines:

    create named subsystem MyMSMQSubsys for subsystem MSMQSubsys with MsmqQueueMachineName=SiebelServer1, MsmqPhysicalQueueName=fromSiebel, MsmqRespQueueMachineName=SiebelServer2, MsmqRespQueueName=toSiebel

    create named subsystem SiebelEcho for subsystem EAITransportDataHandlingSubsys with DispatchService="Workflow Process Manager", DispatchMethod=RunProcess, DispatchWorkflowProcess="MyMSMQWorkflow"

    start task for comp MSMQRcvr with ReceiverConnectionSubsystem=MyMSMQSubsys, ReceiverDataHandlingSubsystem=SiebelEcho, ReceiverMethodName=ReceiveDispatch

    NOTE:  The DispatchService and DispatchMethod parameters are optional.

  4. In Siebel Tools, set up a workflow for receiving and dispatching a message from MSMQ as shown in the following figure:

    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 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

  7. Set up the second step to use the EAI Siebel Adapter with the Upsert method to update the Siebel Database, using the following input arguments:
    Input Argument
    Type
    Property Name
    Property Data Type

    SiebelMessage

    Process Property

    Test Message

    Hierarchy

    NOTE:  In order to test this scenario adequately, you must have a partner application that can put a valid message for the Siebel application in the queue.

  8. Save the workflow.

Receiving, Dispatching, and Sending MSMQ Messages with MSMQ Receiver

The following procedure shows you how to set up your system to receive an inbound message from MSMQ by MSMQ Receiver, perform an action within a Siebel application based on that message, and then send a synchronous response back to the external system.

To receive, dispatch, and send messages using the EAI MSMQ Transport (MSMQ Receiver)

  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.

    Give the queue an easily identified name, such as fromSiebel.

  3. Set up another queue to send messages to the Siebel application.
    1. Name the queue an easily identified name, such as toSiebel.
    2. Create a message in the queue.

      NOTE:  To test this procedure adequately, you must have a partner application that can put a valid message for the Siebel application into the queue.

  4. Create a named subsystem for the MSMQ Receiver using the following lines:

    create named subsystem MyMSMQSubsys for subsystem MSMQSubsys with MsmqQueueMachineName=SiebelServer1, MsmqPhysicalQueueName=fromSiebel, MsmqRespQueueMachineName=SiebelServer2, MsmqRespQueueName=toSiebel

    create named subsystem SiebelEcho for subsystem EAITransportDataHandlingSubsys with DispatchService="Workflow Process Manager", DispatchMethod=RunProcess, DispatchWorkflowProcess="MyMSMQWorkflow"

    start task for comp MSMQRcvr with ReceiverConnectionSubsystem=MyMSMQSubsys, ReceiverDataHandlingSubsystem=SiebelEcho, ReceiverMethodName=ReceiveDispatchSend

    NOTE:  The DispatchService and DispatchMethod parameters are optional.

  5. In Siebel Tools, set up a workflow for receiving and dispatching a message from MSMQ as shown in the following figure:

    NOTE:  For details on the Business Process Designer, see Siebel Business Process Framework: Workflow Guide.

  6. Create the following process properties:
    Name
    Data Type
    In/Out
    Value

    Test Message

    Hierarchy

    In/Out

    Not applicable

    Test XML

    Binary

    In/Out

    Test Message from Siebel Server

    Error Code

    String

    In/Out

    Not applicable

    Error Message

    String

    In/Out

    Not applicable

    Object Id

    String

    In/Out

    Not applicable

    Siebel Operation Object Id

    String

    In/Out

    Not applicable

  7. Set up the first step of the workflow after Start 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

  8. Set up the second step to use the EAI Siebel Adapter with the Upsert method to update the Siebel Database, using the following input arguments:
    Input Argument
    Type
    Property Name
    Property Data Type

    SiebelMessage

    Process Property

    Test Message

    Hierarchy

    NOTE:  To test this scenario adequately, you must have a partner application that can put a valid message for the Siebel application into the queue.

  9. Save the workflow.

After running the workflow, confirm that the message is removed from the queue using the MSMQ Explorer. In this example, the Siebel Database is updated with the message in the fromSiebel queue. Also, a response message will be in the queue specified by the MSMQRespQueueName and MSMQRespQueueMachineName arguments.

Transports and Interfaces: Siebel Enterprise Application Integration Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Legal Notices.