Transports and Interfaces: Siebel eBusiness Application Integration Volume III > Java Message Service Transport >

Receiving, Dispatching, and Sending JMS Messages


The procedure below describes how to set up your system to receive inbound messages from JMS, perform an action within the Siebel application based upon the message, and send a synchronous response back to the external system.

To receive, dispatch, and send messages using EAI JMS Transport

  1. Set up a JMS queue to receive messages from the Siebel application and give the queue an easy to identify name, such as fromSiebel.

    Refer to your JMS provider documentation on how to administer, monitor and define new persistent queues.

  2. Set up a JMS queue to send messages to the Siebel application.

    Refer to your JMS provider documentation on how to administer, monitor and define new persistent queues.

    1. Give 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 place a valid message for the Siebel application in the queue.

  3. From the Site Map choose Administration - Business Process > Workflow Processes.
  4. Configure and deploy a workflow process to process the incoming XML request.

    The following workflow process receives the incoming XML document and converts it to an integration object, executes a query using Siebel Order application service, and converts the response to an XML document as shown in the following figure:

    Click for full size image
  5. Create the following process properties in the Process Properties applet:
    Name
    Data Type
    In/Out
    Default String
    Comments

    <Value>

    Binary

    In/Out

    <Value>

    Order Integration Object

    Order Message

    Hierarchy

    In/Out

     

    XML representation of the integration object

  6. Set up the first step of the workflow process, after Start, to use the EAI XML Converter with the XMLDocToIntObjHier method.

    This step will convert the incoming XML document to an integration object representation using the following input and output arguments:

    Input Argument
    Type
    Value
    Property Name

    <Value>

    Process Property

     

    <Value>

    Property Name
    Type
    Value
    Output Argument

    Order Message

    Output Argument

     

    SiebelMessage

  7. Set up the second step to use the Siebel Order ASI with the QueryByExample method.

    This step will query the Order business object based upon the provided XML document using the following input and output arguments:

    Input Argument
    Type
    Value
    Property Name

    SiebelMessage

    Process Property

     

    Order Message

    Property Name
    Type
    Value
    Output Argument

    Order Message

    Output Argument

     

    SiebelMessage

  8. Set up the third step to use the EAI XML Converter with the IntObjHierToXMLDoc method.

    This step will convert the integration object to a well-formed XML document using the following input and output arguments:

    Input Argument
    Type
    Value
    Property Name

    SiebelMessage

    Process Property

     

    Order Message

    Property Name
    Type
    Value
    Output Argument

    <Value>

    Output Argument

     

    <Value>

  9. Save and deploy the workflow process.

    Refer to the Siebel Business Process Designer Administration Guide for details on deploying workflow processes.

  10. Define a JMS Connection subsystem using SrvrMgr (command line utility) or the Server Administration screen.

    NOTE:  The Siebel Server needs to be restarted in order for the new subsystem to be available.

    Following is an example using SrvrMgr.

    NOTE:  ConnectionFactory, ReceiveQueue and SendQueue require JNDI names, which will vary depending upon the JMS provider and your implementation.

    create named subsystem JMSToFromSiebel for subsystem JMSSubsys with ConnectionFactory="jndiName.ConnectionFactory",
    ReceiveQueue="jndiName.toSiebel ",
    SendQueue="jndiName.fromSiebel",
    ReceiveTimeout=3000

  11. Define a data handling subsystem to dispatch the message from the toSiebel queue to the workflow process defined as previously defined (JMS Query Order).

    NOTE:  The Siebel Server needs to be restarted in order for the data handling subsystem to be available.

    create named subsystem QueryOrder for subsystem EAITransportDataHandlingSubsys with DispatchWorkflowProcess="JMS Query Order"

  12. After restarting the Siebel Server, start a new JMS Receiver from the SrvrMgr command line.

    Following is an example that instructs the receiver to use the JMSToFromSiebel connection subsystem defined in Step 10, the QueryOrder data handling subsystem defined in Step 11, and instructs the receiver to use the ReceiveDispatchSend method of the EAI JMS Transport.

    start task for comp JMSReceiver with

    ReceiverConnectionSubsystem= JMSToFromSiebel,

    ReceiverDataHandlingSubsystem=QueryOrder,

    ReceiverMethodName=ReceiveDispatchSend

  13. Place a message resembling the following on the toSiebel queue.

    NOTE:  A third-party product such as Hermes (available from Sourceforge.net) is required in order to place a message on a queue. In the following sample document, the Siebel Order ASI will query for all orders associated with the Hibbings Manufacturing account.

    <?xml version="1.0" encoding="UTF-16"?>

    <SiebelMessage IntObjectName="Order Interface">

    <ListOfOrderInterface>

    <Orders>

       <Account>Hibbings Manufacturing</Account>

    </Orders>

    </ListOfOrderInterface>

    </SiebelMessage>

Transports and Interfaces: Siebel eBusiness Application Integration Volume III