Author |
Message
|
goffinf |
Posted: Sat Jan 17, 2009 5:54 am Post subject: Getting the name of a sub-flow |
|
|
Chevalier
Joined: 05 Nov 2005 Posts: 401
|
Back in 2005, the following comment was made on a topic with a similar question to this one :-
Quote: |
There is no magic accessor for getting the name of the flow that a specific subflow is called from.
There is also no way, that I know of, to get or set node-level properties on an included subflow. It would be nice if the Input and Output nodes had configurable parameters that would get populated somewhere automatically. But, as far as I know, they don't. |
I have a situation where it would be really useful to know the name of a flow that is calling another. This 'shared' flow can be called by various sub-flows and depending on which one it configures itself differently. I can ask that the calling sub-flow name is set onto the global environment before calling the shared flow, or passed in as part of the message, but I would prefer it if this information was available without the designer of the calling flow having to remember to do that (and possibly clean up afterwards).
As the earlier commentator mentioned, it would be nice if an Input or Output node published that info but I can't see anything in the docs that suggest it does. Can anyone think of an alternative ?
Thanks
Fraser. |
|
Back to top |
|
 |
j.f.sorge |
Posted: Tue Jan 20, 2009 3:33 am Post subject: |
|
|
Master
Joined: 27 Feb 2008 Posts: 218
|
To get the name of the current flow just use
Code: |
SQL.MessageFlowLabel |
_________________ IBM Certified Solution Designer - WebSphere MQ V6.0
IBM Certified Solution Developer - WebSphere Message Broker V6.0
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
missing_link |
Posted: Tue Jan 20, 2009 6:45 am Post subject: |
|
|
 Acolyte
Joined: 08 Jan 2004 Posts: 60
|
there is a section in the docs titled 'Broker properties that are accessible from ESQL and Java' which lists...well lists them all really!
ash. |
|
Back to top |
|
 |
goffinf |
Posted: Wed Jan 21, 2009 8:24 am Post subject: |
|
|
Chevalier
Joined: 05 Nov 2005 Posts: 401
|
j.f.sorge wrote: |
To get the name of the current flow just use
Code: |
SQL.MessageFlowLabel |
|
Thanks. I hadn't realised that these were available, when did that happen ?
How do you use the node level properties from ESQL. Are they only avaiable in a Trace node since that provides context ?
Anyway, whilst SQL.MessageFlowLabel gives the name of the run-time flow, what I wanted was the name of the specific sub-flow. I appreciate that these are really design-time artefacts that turn into one big flow when compiled and deployed, but thats what I need.
Regards
Fraser. |
|
Back to top |
|
 |
goffinf |
Posted: Wed Jan 21, 2009 8:29 am Post subject: |
|
|
Chevalier
Joined: 05 Nov 2005 Posts: 401
|
Quote: |
How do you use the node level properties from ESQL. Are they only avaiable in a Trace node since that provides context ? |
Sorry that was a bit dumb, it could also apply to Compute, Filter and Database
Fraser |
|
Back to top |
|
 |
j.f.sorge |
Posted: Thu Jan 22, 2009 1:35 am Post subject: |
|
|
Master
Joined: 27 Feb 2008 Posts: 218
|
goffinf wrote: |
I appreciate that these are really design-time artefacts that turn into one big flow when compiled and deployed, but thats what I need. |
Probably you can set a constant (with the SubFlow name in it) in your SubFlow and get the value of it?! _________________ IBM Certified Solution Designer - WebSphere MQ V6.0
IBM Certified Solution Developer - WebSphere Message Broker V6.0
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
|