Sending and Receiving JMS Messages
The following procedure describes how to set up the Siebel application to send a message to an external system using the EAI JMS Transport and receive a corresponding reply from the external system.
To send and receive messages with the JMS Transport
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.
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.
Give the queue an easy-to-identify name, such as toSiebel.
Create a message in the queue.
Note: To test this scenario adequately, you must have a partner application that can place a valid message for the Siebel application into the queue.Set up a workflow in Siebel Tools to send a message out and receive a message back in response using the EAI JMS Transport. The workflow should contain the following steps, as shown in the following image:
Siebel Order (Query by ID)
EAI XML Converter (IntObjHierToXMLDoc)
EAI JMS Transport (SendReceive)
EAI XML Converter (XMLDocToIntObjHier)
Siebel Order (Synchronize)
Note: For details on the Business Process Designer, see Siebel Business Process Framework: Workflow Guide.Create the following process properties:
Name Data Type In/Out Default String Comments OrderXML
Binary
In
Not applicable
Not applicable
JMSConnectionFactory
String
In
examples.jms. ConnectionFactory
JNDI name of the JMS connection factory
JMSReceiveQueue
String
In
examples.jms.toSiebel
JNDI name of the queue
JMSSendQueue
String
In
examples.jms.fromSiebel
JNDI name of the queue
JMSReceiveTimeout
String
In
180000
Not applicable
Order Message
Integration Object
In
Not applicable
Not applicable
Set up the first step of the workflow to use the Siebel Order ASI with the QueryById method to query the information from the Siebel database using the following input and output arguments:
Input Argument Type Property Name PrimaryRowId
Process Property
Object Id
Property Name Type Output Argument Order Message
Output Argument
SiebelMessage
Set up the second step of the workflow to use the EAI XML Converter with the IntObjHierToXMLDoc method to convert the data extracted from the Siebel database to XML using the following input and output arguments:
Input Argument Type Value Property Name GenerateProcessingInstructions
Literal
False
Not applicable
SiebelMessage
Process Property
Not applicable
Order Message
Property Name Type Output Argument OrderXML
Output Argument
<Value>
Set up the third step of the workflow, after Start, to use the EAI JMS Transport with the SendReceive method using the following input and output arguments:
Input Argument Type Property Name <Value>
Process Property
OrderXML
ConnectionFactory
Process Property
JMSConnectionFactory
ReceiveQueue
Process Property
JMSReceiveQueue
ReceiveTimeout
Process Property
JMSReceiveTimeout
SendQueue
Process Property
JMSSendQueue
Property Name Type Output Argument OrderXML
Output Argument
<Value>
Set up the fourth step to use the EAI XML Converter with the XMLDocToIntObjHier method to convert the XML message to an Integration Object using the following input and output arguments:
Input Argument Type Property Name <Value>
Process Property
OrderXML
Property Name Type Output Argument Order Message
Output Argument
SiebelMessage
Set up the last step to use the Siebel Order ASI with the Synchronize message to update the Siebel database using the following input and output arguments:
Input Argument Type Property Name SiebelMessage
Process Property
Order Message
Property Name Type Output Argument Order Message
Output Argument
SiebelMessage
Save and deploy the workflow.
It is recommended that the Workflow Simulator be used for testing purposes.
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.