Transports and Interfaces: Siebel Enterprise Application Integration > EAI MSMQ Transport > Configuring EAI MSMQ Transport for Various Send and Receive Scenarios >
Sending Outbound Messages with EAI MSMQ Transport
With the Siebel application as the sender (outbound messaging), you design a workflow that queries for a record (such as a contact) and then converts that record to an XML document. The XML document is then sent to an MSMQ queue. Because MSMQ imposes a limit of four megabytes on the size of the messages it can handle, the EAI MSMQ Transport separates outbound Siebel messages larger than four megabytes into smaller messages acceptable to MSMQ. The message is then reassembled after it has left MSMQ and arrived at your partner's system. There are two methods for sending messages from a Siebel application to MSMQ:
- Send
- Send and Receive Response (SendReceive)
Sending 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. To send messages from a Siebel application to MSMQ
- Access the Windows Computer Management tool by choosing the Start menu, Programs, Administrative Tools, and then Computer Management.
- Set up an MSMQ queue to receive messages from the Siebel application. Give the queue an easily identified name, such as fromsiebel, as shown in the following illustration.
- Set the queue to be Transactional.
NOTE: This flag allows Siebel Business Applications to group a number of Send or Receive messages. This is critical when large data sets are being used because it allows a commit or a rollback to be executed without failure.
- In Siebel Tools, set up a workflow for sending a message to MSMQ. Define the flow as shown in the following figure:
NOTE: For details on the Business Process Designer, see Siebel Business Process Framework: Workflow Guide.
- Create the following process properties:
|
|
|
|
Employee Message |
Hierarchy |
In/Out |
Not applicable |
Employee XML |
Binary |
In/Out |
Not applicable |
Error Code |
String |
In/Out |
Not applicable |
Error Message |
String |
In/Out |
Not applicable |
Object Id |
String |
In/Out |
Row Id of an Employee record |
Siebel Operation Object Id |
String |
In/Out |
Not applicable |
- Set up the first step of the workflow, after Start, to use the EAI Siebel Adapter business service with the Query method to query the information from the Siebel database using the following input and output arguments:
|
|
|
|
OutputIntObjectName |
Literal |
Sample Employee |
Not applicable |
PrimaryRowId |
Process Property |
Not applicable |
Object Id |
|
|
|
Employee Message |
Output Argument |
SiebelMessage |
- Set up the second step to use the EAI XML Converter business service with the PropSetToXML method to convert the data extracted from the Siebel Database to XML format using the following input and output arguments:
|
|
|
SiebelMessage |
Process Property |
Employee Message |
|
|
|
Employee XML |
Output Argument |
<Value> |
- Set up the third step to use EAI MSMQ Transport with the Send method to send the information to the external system, using the following input arguments:
|
|
|
|
<Value> |
Process Property |
Not applicable |
Employee XML |
MsmqPhysicalQueueName |
Literal |
private$\FromSiebel |
Not applicable |
MsmqQueueMachineName |
Literal |
SiebelServer Computer name where the Siebel MSMQ Transport is running. |
Not applicable |
- Save the workflow and run it from the Workflow Simulator.
Confirm that a message was sent to the queue using the MSMQ Explorer. In this example, if the simulation is successful, then a message is in the fromSiebel queue and contains an XML file with employee information.
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
- Access the Windows Computer Management tool by choosing the Start menu, Programs, Administrative Tools, and then Computer Management.
- Set up an MSMQ queue to receive messages from the Siebel application, and give the queue an easily identified name, such as fromsiebel.
- Set up another queue to send messages to the Siebel application, and give the queue an easily identified name, such as tosiebel.
- In Siebel Tools, set up a workflow for sending a message out and receiving a message in response using EAI MSMQ Transport. Define the flow as shown in the following figure:
NOTE: For details on the Business Process Designer, see Siebel Business Process Framework: Workflow Guide.
- Create the following process properties:
|
|
|
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 |
- 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:
|
|
|
|
|
OutputIntObjectName |
Literal |
Sample Employee |
Not applicable |
Not applicable |
PrimaryRowId |
Process Property |
Not applicable |
Object Id |
String |
|
|
|
Test Message |
Output Argument |
SiebelMessage |
- 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:
|
|
|
|
SiebelMessage |
Process Property |
Test Message |
Hierarchy |
|
|
|
Test XML |
Output Argument |
<Value> |
- 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:
|
|
|
|
|
<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 |
|
|
|
Test XML |
Output Argument |
<Value> |
- 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:
|
|
|
|
<Value> |
Process Property |
Test XML |
Binary |
|
|
|
Test Message |
Output Argument |
SiebelMessage |
- 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:
|
|
|
|
SiebelMessage |
Process Property |
Test Message |
Hierarchy |
- 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.
|