| Author | Message | 
		
		  | namakkal | 
			  
				|  Posted: Mon Apr 20, 2009 6:46 am    Post subject: get Name of the flow in ESQL |   |  | 
		
		  | Novice
 
 
 Joined: 06 Feb 2009Posts: 19
 
 
 | 
			  
				| Hi, how to get the flow name inside the ESQL code ?
 
 Regards
 Sathish
  |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | Vitor | 
			  
				|  Posted: Mon Apr 20, 2009 6:56 am    Post subject: Re: get Name of the flow in ESQL |   |  | 
		
		  |  Grand High Poobah
 
 
 Joined: 11 Nov 2005Posts: 26093
 Location: Texas, USA
 
 | 
			  
				| 
   
	| namakkal wrote: |  
	| how to get the flow name inside the ESQL code ? |  
 As indicated here
 
 Be aware it might not be the name you're expecting to see if you're using a sub flow.
 
 Out of interest, what's the requirement? I can see you might want queue manager or broker name to determine environment (though I personally don't agree with that) but why the flow name?
 _________________
 Honesty is the best policy.
 Insanity is the best defence.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | kash3338 | 
			  
				|  Posted: Mon Apr 20, 2009 8:59 am    Post subject: Re: get Name of the flow in ESQL |   |  | 
		
		  | Shaman
 
 
 Joined: 08 Feb 2009Posts: 709
 Location: Chennai, India
 
 | 
			  
				| 
   
	| Vitor wrote: |  
	| 
   
	| namakkal wrote: |  
	| how to get the flow name inside the ESQL code ? |  
 As indicated here
 
 Be aware it might not be the name you're expecting to see if you're using a sub flow.
 
 Out of interest, what's the requirement? I can see you might want queue manager or broker name to determine environment (though I personally don't agree with that) but why the flow name?
 |  
 Hi, Even in one of our scenario's we need to know the Flow Name. Actually in our scenario we have few interfaces where in we keep the name of the interface as flow name. Since the input structure is same for all the interfaces, we can differentiate the interfaces only based on our flow names.
 
 So can any one tell me if its possible to get the Flow Name in ESQl code?
 
 Regards,
 Kashyap.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | WMBDEV1 | 
			  
				|  Posted: Mon Apr 20, 2009 9:05 am    Post subject: |   |  | 
		
		  | Sentinel
 
 
 Joined: 05 Mar 2009Posts: 888
 Location: UK
 
 | 
			  
				| Yes it is, Vitor has told you once and even provided a link to the answer! |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | Vitor | 
			  
				|  Posted: Mon Apr 20, 2009 9:29 am    Post subject: Re: get Name of the flow in ESQL |   |  | 
		
		  |  Grand High Poobah
 
 
 Joined: 11 Nov 2005Posts: 26093
 Location: Texas, USA
 
 | 
			  
				| 
   
	| kash3338 wrote: |  
	| Since the input structure is same for all the interfaces, we can differentiate the interfaces only based on our flow names. |  
 Not strictly true, and a potentially restrictive design, but whatever works for you I suppose.
  _________________
 Honesty is the best policy.
 Insanity is the best defence.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | aspre1b | 
			  
				|  Posted: Tue Apr 21, 2009 3:47 am    Post subject: |   |  | 
		
		  |  Voyager
 
 
 Joined: 05 Jul 2007Posts: 78
 Location: Coventry, UK
 
 | 
			  
				| I've got another way to display flow names (inc versions, date checked in, etc) on a broker installed on Unix by using cvs expansion tags. This works well on v5 Broker, as I haven't found another way to find out deployed versions of esql files.
 
 Once you have cvs expansion tags working, I simply put the following procedure in each ESQL file.
 
 
 
   
	| Code: |  
	| CREATE PROCEDURE CVSExpansion() BEGIN
 
 -- ***************************************************
 -- * Displays details of CVS expansion               *
 -- ***************************************************
 
 -- This cvs information viewable at runtime by running the command:
 -- mqsireportproperties BROKERNAME -e EXECUTIONGROUPNAME -o AllMessageFlows -r | grep 'cvsExpansion='
 
 DECLARE cvsExpansion CHAR;
 SET cvsExpansion= '$RCSfile$' || '$Name$' || '$Revision$' || '$Author$' || '$Source$' || '$Date$';
 
 -- RCSfile       = filename
 -- Name       = tag file is associated with
 -- Revision    = file revision
 -- Author       = author of the most recent change to the file
 -- Source       = project directory location within CVS
 -- Date      = date of most recent change
 
 END;
 
 |  
 By running the command below, you should be able to see the versions of all esql files and confirm the overall tag release:
 
 mqsireportproperties BROKER -e executiongrp -o AllMessageFlows -r | grep 'cvsExpansion= '
 
 To get the correct version, I would always deploy from a cvs tag.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | aspre1b | 
			  
				|  Posted: Tue Apr 21, 2009 3:49 am    Post subject: |   |  | 
		
		  |  Voyager
 
 
 Joined: 05 Jul 2007Posts: 78
 Location: Coventry, UK
 
 | 
			  
				| Forgot to mention, at the very least, the esql filename is put into (expanded into) the file when you do a cvs checkout. Assuming you have the same name for your flow, you have the flow name also. |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | shashivarungupta | 
			  
				|  Posted: Tue Apr 21, 2009 4:00 am    Post subject: |   |  | 
		
		  |  Grand Master
 
 
 Joined: 24 Feb 2009Posts: 1343
 Location: Floating in space on a round rock.
 
 | 
			  
				| 
   
	| Quote: |  
	| ...to display flow names (inc versions, date checked in, etc) on a broker installed on Unix by using cvs expansion tags. ... |  
 
   
	| Quote: |  
	| ...To get the correct version, I would always deploy from a cvs tag. |  
 Being curious what is the CVS Tag ?
 Could you please shed some light on this.
 
 Thanks.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | Vitor | 
			  
				|  Posted: Tue Apr 21, 2009 4:07 am    Post subject: |   |  | 
		
		  |  Grand High Poobah
 
 
 Joined: 11 Nov 2005Posts: 26093
 Location: Texas, USA
 
 | 
			  
				| 
   
	| shashivarungupta wrote: |  
	| Being curious what is the CVS Tag ? 
 |  
 CVS = One of the source code control systems supported by the Toolkit (if "supported" is the right word in an Eclipse sense!)
 _________________
 Honesty is the best policy.
 Insanity is the best defence.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | aspre1b | 
			  
				|  Posted: Tue Apr 21, 2009 4:29 am    Post subject: |   |  | 
		
		  |  Voyager
 
 
 Joined: 05 Jul 2007Posts: 78
 Location: Coventry, UK
 
 | 
			  
				| Of course you can only do this if you use cvs as your code management system. I'm sure there must be equivalent functionality in other code managements systems like subversion. 
 To be honest, for Broker code, my experience is that most companies use cvs.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | WMBDEV1 | 
			  
				|  Posted: Tue Apr 21, 2009 4:35 am    Post subject: |   |  | 
		
		  | Sentinel
 
 
 Joined: 05 Mar 2009Posts: 888
 Location: UK
 
 | 
			  
				| 
   
	| aspre1b wrote: |  
	| I'm sure there must be equivalent functionality in other code managements systems like subversion. 
 |  
 Absolutely mate, I have done it in SVN without issue. You can also get a nice plugin for Eclipse for it!
 
 
 
   
	| Quote: |  
	| To be honest, for Broker code, my experience is that most companies use cvs. |  
 Maybe, but if starting your source control solution from scratch, i'd go with subversion if sticking to the free stuff
  |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | aspre1b | 
			  
				|  Posted: Tue Apr 21, 2009 4:37 am    Post subject: |   |  | 
		
		  |  Voyager
 
 
 Joined: 05 Jul 2007Posts: 78
 Location: Coventry, UK
 
 | 
			  
				| I agree, subversion would be my code repo of choice if I was starting from scratch. |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | mgk | 
			  
				|  Posted: Tue Apr 21, 2009 4:44 am    Post subject: |   |  | 
		
		  |  Padawan
 
 
 Joined: 31 Jul 2003Posts: 1647
 
 
 | 
			  
				| In ESQL you can use: 
 
 
   
	| Code: |  
	| DECLARE FlowName CHARACTER SQL.MessageFlowLabel; |  
 Although remember as mentioned above, sub-flows are expanded "into" their parent flows at deploy time...
 
 
 Regards,
 _________________
 MGK
 The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | namakkal | 
			  
				|  Posted: Wed Apr 22, 2009 9:47 pm    Post subject: |   |  | 
		
		  | Novice
 
 
 Joined: 06 Feb 2009Posts: 19
 
 
 | 
			  
				| 
   
	| mgk wrote: |  
	| In ESQL you can use: 
 
 
   
	| Code: |  
	| DECLARE FlowName CHARACTER SQL.MessageFlowLabel; |  
 Although remember as mentioned above, sub-flows are expanded "into" their parent flows at deploy time...
 
 
 Regards,
 |  
 thanks a lot mgk. this helped us very much
  |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | MikeOliverAZ | 
			  
				|  Posted: Sun Oct 20, 2013 3:33 pm    Post subject: Update v 8 |   |  | 
		
		  |  Apprentice
 
 
 Joined: 10 Jul 2013Posts: 47
 
 
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  |  |