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 » Storing Flow Name to the XML

Post new topic  Reply to topic
 Storing Flow Name to the XML « View previous topic :: View next topic » 
Author Message
nukalas2010
PostPosted: Mon May 23, 2011 2:53 am    Post subject: Storing Flow Name to the XML Reply with quote

Master

Joined: 04 Oct 2010
Posts: 220
Location: Somewhere in the World....

Hi All,

Here I am doing the ErrorHandling.. when ever the exception occurs I want to store the Error Description and the Flow name into a Queue.

For that I had mentioned the code like below.
Code:

CREATE COMPUTE MODULE ErrorHandlingFlow_Compute
   CREATE FUNCTION Main() RETURNS BOOLEAN
   BEGIN
            
      DECLARE treeRef REFERENCE TO InputExceptionList.*[1];
      DECLARE errorList REFERENCE TO InputExceptionList.*[1];
      DECLARE FlowName CHARACTER;
      SET FlowName = errorList.Name;
      
      DECLARE errorInfo CHARACTER '';
      DECLARE errorDesc CHARacter '';
      DECLARE errorType CHARACTER;
      DECLARE nIndex INTEGER 1;
      DECLARE nInsert INTEGER 0;

      
      
      WHILE treeRef.*[<].Number IS NOT NULL DO
         MOVE treeRef LASTCHILD;
      END WHILE;
      
      WHILE errorList.Number IS NOT NULL DO
         SET errorType = FIELDNAME(errorList);
         IF errorList.Text IS NOT NULL THEN
            
            SET errorDesc = errorList.Text;
         END IF;
         
         SET nInsert = CARDINALITY(errorList.Insert[]);
         IF nInsert > 0 THEN
            WHILE nIndex <= nInsert DO
               IF errorList.Insert[nIndex].Text <> '' THEN
                  SET errorDesc = errorList.Insert[nIndex].Text;
               END IF;
               
               SET nIndex = nIndex + 1;
            END WHILE;
         END IF;
            
         set nIndex = 1;
         set errorDesc = errorDesc;
         
         MOVE errorList LASTCHILD;
      END WHILE;
         

      SET OutputRoot.XMLNSC.Message.ErrorDesc = errorDesc;
      SET OutputRoot.XMLNSC.Message.FlowName = RTRIM(FlowName);
      
      
      RETURN TRUE;
   END;


But while receving, I am getting the flow name like as below.
IF example the flow name is "ErrorHandling.msgflow".. I am getting like "ErrorHandling#FCMComposite_1_5"...

but I want only the flow name..
Is there any wrong from my side..
Back to top
View user's profile Send private message
smdavies99
PostPosted: Mon May 23, 2011 3:12 am    Post subject: Re: Storing Flow Name to the XML Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

nukalas2010 wrote:
Hi All,

"ErrorHandling#FCMComposite_1_5"...


That is the name of the Node in the flow where the error took place.

A simple LOCATE/SUBSTRING will extract it for you.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
fschofer
PostPosted: Mon May 23, 2011 3:23 am    Post subject: Reply with quote

Knight

Joined: 02 Jul 2001
Posts: 524
Location: Mainz, Germany

Hi,

you can directly determine the name of the message flow from the Broker property MessageFlowLabel.

http://publib.boulder.ibm.com/infocenter/wmbhelp/v7r0m0/topic/com.ibm.etools.mft.doc/ak04897_.htm

Regards
Frank
Back to top
View user's profile Send private message Send e-mail
nukalas2010
PostPosted: Mon May 23, 2011 4:40 am    Post subject: Re: Storing Flow Name to the XML Reply with quote

Master

Joined: 04 Oct 2010
Posts: 220
Location: Somewhere in the World....

smdavies99 wrote:
nukalas2010 wrote:
Hi All,

"ErrorHandling#FCMComposite_1_5"...


That is the name of the Node in the flow where the error took place.

A simple LOCATE/SUBSTRING will extract it for you.


Yeah I tried it by using the SUBSTRING(flowname BEFORE '#') where I am getting only the flow name...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Storing Flow Name to the XML
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.