270 Using IBM WebSphere Message Broker as an ESB with WebSphere Process Server
BuildSupplier1Response Compute node
The basic properties (Figure 8-53) of the BuildSupplier1Response Compute
node define the location of the ESQL module that is used to implement the logic
of this node.
Figure 8-53 Basic properties of the BuildSupplier1Response node
Example 8-6 shows the ESQL, which changes the wire format of the message
from CWF to XML as it builds the response. The values are hard coded because
it is not the intent of this scenario to demonstrate any logic in the Supplier1
system.
Example 8-6 ESQL for the BuildSupplier1Response node
CREATE COMPUTE MODULE Supplier1_BuildSupplier1Response
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
-- First, we copy the message headers
CALL CopyMessageHeaders();
-- Next, we set the properties of the output
-- message since we convert from CWF to XML format
SET OutputRoot.Properties.MessageSet = 'PJLEJ0S002001';
SET OutputRoot.Properties.MessageType = 'FindSuppliersOperationResponse';
SET OutputRoot.Properties.MessageFormat = 'XML1';
-- Next, we create the MRM domain to store the response
CREATE LASTCHILD OF OutputRoot DOMAIN 'MRM';