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 » Accessing node properties from ESQL

Post new topic  Reply to topic
 Accessing node properties from ESQL « View previous topic :: View next topic » 
Author Message
pawel_janowski
PostPosted: Thu Sep 09, 2010 2:40 am    Post subject: Accessing node properties from ESQL Reply with quote

Apprentice

Joined: 13 Dec 2006
Posts: 38

Hello!
Is it possible to get the Queue Name defined as a Output Node property from the ESQL Code f Compute Node within the same message flow?
Or maybe it is possible to get the value of the property promoted to subflow?

Any ideas.

Regars.

Pawel
_________________
Pawel Janowski
Back to top
View user's profile Send private message
smdavies99
PostPosted: Thu Sep 09, 2010 4:25 am    Post subject: Re: Accessing node properties from ESQL Reply with quote

Jedi Council

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

pawel_janowski wrote:

Is it possible to get the Queue Name defined as a Output Node property from the ESQL Code f Compute Node within the same message flow?
Or maybe it is possible to get the value of the property promoted to subflow?


Yes to both.

For the ESQL Solution, it uses the OutputLocalEnvironment folder.
This is how you implement distribution lists.
The info about how to setup the data is in the docs/infocentre.

Search for
Populating Destination in the local environment tree
_________________
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
pawel_janowski
PostPosted: Thu Sep 09, 2010 4:38 am    Post subject: Re: Accessing node properties from ESQL Reply with quote

Apprentice

Joined: 13 Dec 2006
Posts: 38

Yes to both.

For the ESQL Solution, it uses the OutputLocalEnvironment folder.
This is how you implement distribution lists.
The info about how to setup the data is in the docs/infocentre.

Search for
Populating Destination in the local environment tree[/quote]

Yes, I know I can setup the destination queue from the ESQL and I frequently use this. But I'm interested in the name (of a queue) which was defined as the Output Node property durring the phase of development. I don't want to change it - I want to know what the queue it is.

Regards,

Pawel
_________________
Pawel Janowski
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Sep 09, 2010 4:42 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Do you want to know what it is BEFORE you invoke the node, or AFTER?
Back to top
View user's profile Send private message
pawel_janowski
PostPosted: Thu Sep 09, 2010 5:01 am    Post subject: Reply with quote

Apprentice

Joined: 13 Dec 2006
Posts: 38

mqjeff wrote:
Do you want to know what it is BEFORE you invoke the node, or AFTER?


Well, truly - I promote the property 'Queue Name' of the Output Node to the subflow and set the desired value at the subflow level. Inside of this subflow I'd like to find out what is the actual value of that promoted property. I think that the actual value should be visible (somehow) inside of this subflow (as it is set BEFORE).

Regards,

Pawel
_________________
Pawel Janowski
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Sep 09, 2010 5:11 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

The MQOutput node will populate WrittenDestination after it is invoked.

Regardless of whether or not it is promoted, there is no mechanism in ESQL to inquire about properties of even the Compute node executing the code, much less some random node that hasn't even been invoked yet.

That doesn't mean you can't solve your difficulty and achieve what you want using an EXTERNAL variable. This is left as an exercise.

You need to consider carefully what you are trying to do - the purpose to which you intend to put this information. If it is anything other than creating an application level log of what queue is being used, then you're probably misusing queue names. If it is an application level log of what queue is being used, then WrittenDestination is sufficient and probably a better choice.
Back to top
View user's profile Send private message
pawel_janowski
PostPosted: Thu Sep 09, 2010 6:40 am    Post subject: Reply with quote

Apprentice

Joined: 13 Dec 2006
Posts: 38

mqjeff wrote:
The MQOutput node will populate WrittenDestination after it is invoked.

Regardless of whether or not it is promoted, there is no mechanism in ESQL to inquire about properties of even the Compute node executing the code, much less some random node that hasn't even been invoked yet.

That doesn't mean you can't solve your difficulty and achieve what you want using an EXTERNAL variable. This is left as an exercise.

You need to consider carefully what you are trying to do - the purpose to which you intend to put this information. If it is anything other than creating an application level log of what queue is being used, then you're probably misusing queue names. If it is an application level log of what queue is being used, then WrittenDestination is sufficient and probably a better choice.


Of course I need this value just for some logging purposes. So the best solution seems to be implementing an user exit.

Thanks.

Pawel
_________________
Pawel Janowski
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Sep 09, 2010 6:41 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

pawel_janowski wrote:
So the best solution seems to be implementing an user exit.


Yikes......
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Sep 09, 2010 7:20 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

pawel_janowski wrote:
So the best solution seems to be implementing an user exit.


Vitor wrote:
Yikes......



If you are positive that you need to log an event "I am about to write to Queue X", then again an ESQL EXTERNAL variable that is tied to a USER DEFINED PROPERTY is the best choice.

If you merely need to log an event "I have written to Queue X" then putting a compute node after MQOutput and using WrittenDestination is the best choice.
Back to top
View user's profile Send private message
llaros
PostPosted: Wed Jul 13, 2011 5:35 am    Post subject: Reply with quote

Apprentice

Joined: 22 Jan 2008
Posts: 37

InputRoot.MQMD.SourceQueue
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Jul 13, 2011 5:45 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

llaros wrote:
InputRoot.MQMD.SourceQueue


a) This thread is nearly a year old so the OP's probably found a way to meet the requirement, or given up.

b) That's all very well on input, but the OP was asking about the name of the queue the MQOutput node was going to use.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
WGerstma
PostPosted: Mon Jul 18, 2011 10:59 am    Post subject: Reply with quote

Acolyte

Joined: 18 Jul 2011
Posts: 55

I think, this mission cannot be accomplished. However I see a proper workaround.

Create a Userdefined Property to be accessed in your ESQL via the EXTERNAL KeyWord. Than promote your userdefined property along with the Queuename property of the Output Node to a single property on flow level.

This ensures, you always have the proper queuename accessible in your ESQL.

What I am wondering: If you need this just for logging purposes, why not doing this after the OutputNode and just get the Queuename from the WrittenDestination?
Back to top
View user's profile Send private message
cutejigs
PostPosted: Mon Oct 01, 2012 5:19 pm    Post subject: Reply with quote

Novice

Joined: 20 Jan 2010
Posts: 20

hi WGerstma,

came across this thread because I am facing the same challenge in my subflow, setting the LocalEnvironment.TimeoutRequest before sending the message to Timeout Control node. I have promoted the Timeout Control node property unique identifier to access it in my ESQL.

"Create a Userdefined Property to be accessed in your ESQL via the EXTERNAL KeyWord. Than promote your userdefined property along with the Queuename property of the Output Node to a single property on flow level. "

on this solution, is it possible to use a single property to be shared by both UDP and Node property? can you give instruction on how to do this?

thanks!

jigs
Back to top
View user's profile Send private message
dragonMastar
PostPosted: Thu May 21, 2015 3:10 am    Post subject: Reply with quote

Newbie

Joined: 27 Apr 2015
Posts: 9

Quote:

For the ESQL Solution, it uses the OutputLocalEnvironment folder.
This is how you implement distribution lists.
The info about how to setup the data is in the docs/infocentre.

Search for
Populating Destination in the local environment tree


we are supposed to read "Destination list " in both the quotes right?
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 » Accessing node properties from ESQL
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.