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

Receiving Inbound Messages with EAI MSMQ Transport


With the Siebel application as the receiver (inbound messaging), you design a workflow process 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:  EAI MSMQ Transport must run on the same machine where you have defined the receiving queue.

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

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

Receiving Messages from MSMQ

The following procedure describes how to set up your system to receive inbound messages from MSMQ.

To receive messages from MSMQ

  1. Access the Windows Computer Management tool by choosing Start > Programs > Administrative Tools > Computer Management.
  2. Set up a queue to send messages to the Siebel application.
    1. Name the queue an easy-to-identify name, such as tosiebel.
    2. Create a message in the queue.

      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.

  3. From the Site Map choose Administration - Business Process > Workflow Processes.
  4. Set up a workflow for receiving a message from MSMQ as shown in the following figure:
    Click for full size image

    NOTE:  For details on Business Process Designer, see Siebel Business Process Designer Administration Guide.

  5. Create the following process properties in the Process Property applet:
    Name
    Data Type
    In/Out
    Value

    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 process after Start to use the EAI MSMQ Transport with the Receive method. This step receives the incoming XML message, using the following input and output arguments:
    Input Arguments
    Type
    Value
    Property Name
    Property Data Type

    MsmqPhysicalQueueName

    Literal

    tosiebel

    -

    -

    MsmqQueueMachineName

    Literal

    Siebel2001

    Machine name where the Siebel MSMQ Transport is running.

    -

    -

    Property Name
    Type
    Value
    Output Argument

    Test XML

    Output Argument

    -

    Message Text

  7. Set up the second step to use the XML Converter with the XMLToPropSet method to convert the XML message to a Siebel property set, using the following input and output arguments:
    Input Arguments
    Type
    Value
    Property Name
    Property Data Type

    XML Document

    Process Property

    -

    Test XML

    Binary

    Property Name
    Type
    Value
    Output Argument

    Test Message

    Output Argument

    -

    Siebel Message

  8. Set up the third object to use the EAI Siebel Adapter with the Insert or Update method to update the Siebel Database, using the following input arguments:
    Input Arguments
    Type
    Value
    Property Name
    Property Data Type

    Siebel Message

    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.

  9. Save the workflow process and run a test using the Workflow Process Simulator.

    Confirm that the message is removed from the queue using the MSMQ Explorer. In this example, if the message on the fromSiebel is valid, the Siebel Database should be updated with the message in the fromSiebel queue.

Receiving a Message from MSMQ and Acting On It

This procedure describes how to set up your system to receive an inbound message from MSMQ and perform an action based on that message within the Siebel application.

To receive and execute messages using EAI MSMQ Transport

  1. Access the Windows Computer Management tool by choosing Start > Programs > Administrative Tools > Computer Management.
  2. Set up a queue to send messages to the Siebel application.
    1. Name the queue an easy-to-identify name, such as toSiebel.
    2. Create a message in the queue.

      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.

  3. From the Site Map choose Administration - Business Process > Workflow Processes.
  4. Set up a workflow process for receiving and dispatching a message from MSMQ as shown in the following figure:

    NOTE:  For details on Business Process Designer, see Siebel Business Process Designer Administration Guide.

  5. Create the following process properties in the Process Property applet:
    Name
    Data Type
    In/Out
    Value

    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 process after Start to use the EAI MSMQ Transport with the ReceiveDispatch method. This step receives the incoming XML message, using the following input and output arguments:
    Input Arguments
    Type
    Value
    Property Name
    Property Data Type

    MsmqPhysicalQueueName

    Literal

    tosiebel

    -

    -

    MsmqQueueMachineName

    Literal

    Siebel2001

    Machine name where the Siebel MSMQ Transport is running.

    -

    -

    DispatchService

    Literal

    Workflow Utilities

    -

    -

    DispatchMethod

    Literal

    Echo

    -

    -

    Property Name
    Type
    Value
    Output Argument

    Test XML

    Output Argument

    -

    Message Text

  7. Set up the second step to use the XML Converter with the XMLToPropSet method to convert the XML message to a Siebel property set using the following input and output arguments:
    Input Arguments
    Type
    Value
    Property Name
    Property Data Type

    XML Document

    Process Property

    -

    Test XML

    Binary

    Property Name
    Type
    Value
    Output Argument

    Test Message

    Output Argument

    -

    Siebel Message

  8. Set up the third object to use the EAI Siebel Adapter with the Insert or Update method to update the Siebel Database, using the following input arguments:
    Input Arguments
    Type
    Value
    Property Name
    Property Data Type

    Siebel Message

    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.

  9. Save the workflow process and run a test using the Workflow Process Simulator.

    The contents of the output property set depend on the business service and method specified in the DispatchService and DispatchMethod arguments. Also, the Output Arguments applet should automatically populate and EndOfData should be set to True.

Receiving, Dispatching, and Sending MSMQ Messages

The following procedure shows you how to set up your system to receive an inbound message from MSMQ, 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 EAI MSMQ Transport

  1. Access the Windows Computer Management tool by choosing Start > Programs > Administrative Tools > Computer Management.
  2. Set up an MSMQ queue to receive messages from the Siebel application.

    Give the queue an easy-to-identify name, such as fromSiebel.

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

      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.

  4. From the Site Map choose Administration - Business Process > Workflow Processes.
  5. Set up a workflow process for receiving and dispatching a message from MSMQ as shown in the following figure:

    NOTE:  For details on Business Process Designer, see Siebel Business Process Designer Administration Guide.

  6. Create the following process properties in the Process Property applet:
    Name
    Data Type
    In/Out
    Value

    Test Message

    Hierarchy

    In/Out

    -

    Test XML

    Binary

    In/Out

    Test Message from Siebel

    Error Code

    String

    In/Out

    -

    Error Message

    String

    In/Out

    -

    Object Id

    String

    In/Out

    -

    Siebel Operation Object Id

    String

    In/Out

    -

  7. Set up the first step of the workflow process after Start to use EAI MSMQ Transport with the ReceiveDispatchSend method to receive the incoming XML message, using the following input and output arguments:
    Input Arguments
    Type
    Value
    Property Name
    Property Data Type

    MsmqPhysicalQueueName

    Literal

    tosiebel

    -

    -

    MsmqQueueMachineName

    Literal

    Siebel2001

    Machine name where the Siebel MSMQ Transport is running.

    -

    -

    MsmqResponseMachineName

    Literal

    Siebel2001A

    Name of the machine where the queue receiving messages from Siebel application is located.

    -

    -

    MsmqRespQueueName

    Literal

    fromsiebel

    -

    -

    DispatchService

    Literal

    Workflow Utilities

    -

    -

    DispatchMethod

    Literal

    DispatchReceiveMethod

    -

    -

    Property Name
    Type
    Value
    Output Argument

    Test XML

    Output Argument

    -

    Message Text

    NOTE:  For illustration purposes, Workflow Utilities Echo method is used as dispatch service method. This could be changed to any dispatch service method as per your business requirements.

  8. Set up the second step to use the XML Converter with the XMLToPropSet method to convert the XML message to a Siebel property set using the following input and output arguments:
    Input Arguments
    Type
    Value
    Property Name
    Property Data Type

    XML Document

    Process Property

    -

    Test XML

    Binary

    Property Name
    Type
    Value
    Output Argument

    Test Message

    Output Argument

    -

    Siebel Message

  9. Set up the third object to use the EAI Siebel Adapter with the Insert or Update method to update the Siebel Database, using the following input arguments:
    Input Arguments
    Type
    Value
    Property Name
    Property Data Type

    Siebel Message

    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.

  10. Save the workflow process and run a test using the Workflow Process Simulator.

    The contents of the output property set depends on the business service and method specified in the DispatchService and DispatchMethod arguments. Confirm that the message is removed from the queue using the MSMQ Explorer. In this example, the Siebel Database should be 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 eBusiness Application Integration Volume III