As a part of overall project, I need to create one Message-Broker application which accepts data in XML format and produce email.
I created one message flow like below
"MQ Input - Compute - emailoutput"
Please help me what should I write in xml file to generate the above flow.
The esql file contain the below code: CREATE FUNCTION Main() RETURNS BOOLEAN BEGIN CALL CopyMessageHeaders();
-- Add recipient information to the EmailOutputHeader
SET OutputRoot.EmailOutputHeader.To = '<recipient email address>';
SET OutputRoot.EmailOutputHeader.Cc = '<recipient email address>';
SET OutputRoot.EmailOutputHeader.Bcc = '<recipient email address>';
-- Add sender information to EmailOutputHeader
SET OutputRoot.EmailOutputHeader.From = '<sender email address>';
SET OutputRoot.EmailOutputHeader."Reply-To" = '<reply email address>';
-- Add subject to EmailOutputHeader
SET OutputRoot.EmailOutputHeader.Subject = 'Replaced by ESQL compute node.';
-- Add SMTP server information to the LocalEnvironment
SET OutputLocalEnvironment.Destination.Email.SMTPServer ='<smtp.server:port>';
-- Create a new message body, which will be sent as the main text of the email.
SET OutputRoot.BLOB.BLOB = CAST('This is the new text for the body of the email.' AS BLOB CCSID 1208);
RETURN TRUE;
END;
I have absolutely no idea what xml file you're talking about. Lay out msg flow in the message broker toolkit, by adding and connecting the three nodes you specified. Then add your code to the Compute Node.