ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » WMB 7.0 Email Node issue creating dynamic emails.

Post new topic  Reply to topic
 WMB 7.0 Email Node issue creating dynamic emails. « View previous topic :: View next topic » 
Author Message
achocks
PostPosted: Thu Feb 09, 2012 7:20 am    Post subject: WMB 7.0 Email Node issue creating dynamic emails. Reply with quote

Voyager

Joined: 28 Nov 2011
Posts: 82

WMB Guru's - Need your help!

I have an strange issue with the EamilOutput node.

Here is what I have in my FLOW.

A compute node ---out---> EmailOutput node . Also the out1 of compute node is connected to a OUTPUT.

The issue is , what ever I am setting dynamically in the compture node especially the BODY of the message is not coming in the email. Rather the the body I entered in the EmaiOutput node properties 'TEST' is coming. I am lost why my information is not passed to the Email out put node or overwritten to the properties..

Thanks in advance!!!



In the compute node I have the following code.



CREATE COMPUTE MODULE EMAIL_NOTIFY_FLOW_CreateEmail
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
DECLARE inputRootPtr REFERENCE TO InputRoot;
DECLARE outputRootPtr REFERENCE TO OutputRoot;
DECLARE EnvRef REFERENCE TO Environment;
DECLARE EnvVarPtr REFERENCE TO Environment.Variables;
CALL CopyMessageHeaders();


DECLARE CRLF Character CAST (X'0A0D' as CHARACTER CCSID Environment.Variables.HubControl.CodedCharSetId);
DECLARE TAB Character ' ';
DECLARE RECIPIENTS CHARACTER;

SET RECIPIENTS = 'Test@XXXX.com';



DECLARE MsgBody CHARACTER;

SET OutputRoot.EmailOutputHeader.From = 'HubAdmin@XXXXX.com';
SET OutputRoot.EmailOutputHeader.To = RECIPIENTS;
SET OutputRoot.EmailOutputHeader."Subject" = 'Error on Broker ' || SQL.BrokerName;
SET MsgBody = 'Error detected in Hub processing.'||CRLF;
SET MsgBody = MsgBody || 'Error on Broker ' || SQL.BrokerName||'.'||CRLF||CRLF;
SET MsgBody = MsgBody ||'Error Code: '||TAB||COALESCE(CAST(Environment.Variables.HubControl.ErrorCodesTable.ERROR_CODE as CHARACTER),' ')||CRLF;
SET MsgBody = MsgBody ||'Description: '||TAB||COALESCE(Environment.Variables.HubControl.ErrorCodesTable.ERROR_DESCRIPTION,' ')||'.'||CRLF||CRLF;
SET MsgBody = MsgBody || 'Hub Control Record'||CRLF;
SET MsgBody = MsgBody ||TAB|| 'Operation Name: '||TAB||TAB|| COALESCE(Environment.Variables.HubControl.operationName,' ')||CRLF;
SET MsgBody = MsgBody ||TAB||'Service Name: '||TAB||TAB|| COALESCE(Environment.Variables.HubControl.serviceName,' ')||CRLF;
SET MsgBody = MsgBody ||TAB|| 'Soap Namespace: '||TAB||TAB|| COALESCE(Environment.Variables.HubControl.soapNS,' ')||CRLF;
SET MsgBody = MsgBody ||TAB|| 'Hub Namespace: '||TAB||TAB|| COALESCE(Environment.Variables.HubControl.hubNS,' ')||CRLF;
SET MsgBody = MsgBody ||TAB|| 'Message Namespace: '||TAB|| COALESCE(Environment.Variables.HubControl.msgNS,' ')||CRLF;
SET MsgBody = MsgBody ||TAB|| 'Hub Message ID: '||TAB||TAB|| COALESCE(Environment.Variables.HubControl.HubUUID,' ')||CRLF;
SET MsgBody = MsgBody ||TAB|| 'Location : '||TAB||TAB||TAB|| COALESCE(Environment.Variables.HubControl.Location,' ')||CRLF;
SET MsgBody = MsgBody ||TAB|| 'State: '||TAB||TAB||TAB|| COALESCE(Environment.Variables.HubControl.State,' ')||CRLF;
SET MsgBody = MsgBody ||TAB|| 'Transport Name: '||TAB||TAB|| COALESCE(Environment.Variables.HubControl.TransportName,' ')||CRLF;
SET MsgBody = MsgBody ||TAB|| 'Transport Message ID: '||TAB|| COALESCE(CAST(Environment.Variables.HubControl.TransportMsgId as Character),' ')||CRLF;
SET MsgBody = MsgBody ||TAB|| 'Source System ID: '||TAB|| COALESCE(Environment.Variables.HubControl.sourceSystemId,' ')||CRLF;
SET MsgBody = MsgBody ||TAB|| 'User ID: '||TAB||TAB||TAB|| COALESCE(Environment.Variables.HubControl.userId,' ')||CRLF;
SET MsgBody = MsgBody ||TAB|| 'Message ID: '||TAB|| TAB|| COALESCE(Environment.Variables.HubControl.messageId,' ')||CRLF;
SET MsgBody = MsgBody ||TAB|| 'Error Reason Code: '||TAB|| COALESCE(Environment.Variables.HubControl.ErrorReasonCode,' ')||CRLF;

SET OutputRoot.BLOB.BLOB = CAST(MsgBody AS BLOB CCSID Environment.Variables.HubControl.CodedCharSetId);

PROPAGATE TO TERMINAL 'out' FINAMLIZE NONE;
Set OutputRoot = InputRoot;
PROPAGATE TO TERMINAL 'out1'FINALIZE NONE;
RETURN FALSE;

END;

CREATE PROCEDURE CopyMessageHeaders()
BEGIN
DECLARE I INTEGER;
DECLARE J INTEGER;
SET I = 1;
SET J = CARDINALITY(InputRoot.*[]);
WHILE I < J DO
SET OutputRoot.*[I] = InputRoot.*[I];
SET I = I + 1;
END WHILE;
END;

CREATE PROCEDURE CopyEntireMessage()
BEGIN
SET OutputRoot = InputRoot;
END;
END MODULE;
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Thu Feb 09, 2012 7:43 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

Quote:
Email message text No No The main text of the email. Use this property to provide a static main body of an email.
If you use this property, it overrides the content that is provided in the body of the message tree that is passed to the input node. If you do not specify a value for this property, the text of the email is the body of the message tree that is passed to the EmailOutput node.


http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r1m0/index.jsp?topic=%2Fcom.ibm.etools.mft.doc%2Fac37400_.htm


Is there something about this you do not understand?
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
achocks
PostPosted: Thu Feb 09, 2012 7:49 am    Post subject: Reply with quote

Voyager

Joined: 28 Nov 2011
Posts: 82

Thanks lancelotlinc! Realy appreciate your help!

So I just need to remove the 'TEST' I have in the Email Message Text..correct?

So that it is not overriding my dynamic value..correct?

Thanks.
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Thu Feb 09, 2012 7:51 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

Have you attended the WM663 class? If not, why not?
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
achocks
PostPosted: Thu Feb 09, 2012 7:55 am    Post subject: Reply with quote

Voyager

Joined: 28 Nov 2011
Posts: 82

I did attended.

But the instructor did not touch much on Email Node.
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Thu Feb 09, 2012 8:56 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

Its odd that the instructor did not follow the lesson plan.

Was this an IBM instructor ar a third party? What city was it in?

To answer your question, if you place a value in the field, it overwrites what is in the message tree. If you do not place a value in the field, the body of the email will be created from the message tree.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
achocks
PostPosted: Thu Feb 09, 2012 9:07 am    Post subject: Reply with quote

Voyager

Joined: 28 Nov 2011
Posts: 82

It was online class by IBM instructor.

Thanks for your help!

It Worked!!!
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Thu Feb 09, 2012 9:09 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

achocks wrote:
It was online class by IBM instructor.

Thanks for your help!

It Worked!!!


You might contact your IBM sales rep and get partial credit for the class since the instructor did not cover the required info.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » WMB 7.0 Email Node issue creating dynamic emails.
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.