|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Availability of LocalEnvironment |
« View previous topic :: View next topic » |
Author |
Message
|
kash3338 |
Posted: Fri Jan 25, 2013 2:09 am Post subject: Availability of LocalEnvironment |
|
|
Shaman
Joined: 08 Feb 2009 Posts: 709 Location: Chennai, India
|
Hi,
In my Message flow I have 3 Compute Nodes, I have the 'Destination Mode' set as follows,
Compute1 - LocalEnvironment And Message
Compute2 - Message
Compute3 - Message
Now, When I set a Variable in LocalEnvironment in Compute1, ideally as per the documentation, it should be available to me only till Compute2, but I am seeing it thorugout the Message Flow.
But when I set some other value in a new Variable in the LocalEnvironment tree in Compute2 and change the Destination Mode to 'LocalEnvironment And Message', the variable set in Compute1 goes away and only the variable set in Compute2 is now available through the flow (irrespective of the fact that the compute nodes down the lane has the Destination Mode set to 'Message').
The documentation on LocalEnvironment variable says this,
Quote: |
If you want the local environment tree to be included in the output message that is propagated by the Compute node, you must set the Compute node property Compute mode to a value that includes the local environment (for example, All). If you do not, the local environment tree is not copied to the output message. |
Is this the normal behaviour, then why does the doc say to set the compute mode to include the localenvironment if that is required down the flow? |
|
Back to top |
|
 |
Vitor |
Posted: Fri Jan 25, 2013 3:45 am Post subject: Re: Availability of LocalEnvironment |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
I'm confused.
You say:
kash3338 wrote: |
when I set some other value in a new Variable in the LocalEnvironment tree in Compute2 and change the Destination Mode to 'LocalEnvironment And Message', |
and then say
kash3338 wrote: |
(irrespective of the fact that the compute nodes down the lane has the Destination Mode set to 'Message'). |
If you've just changed the mode of Compute2 to "LocalEnvironment and Message", how are you surprised it's available downsteam?
As to why LocalEnvironment from Compute1 is not available downstream, what code do you have to propagate it? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
kash3338 |
Posted: Fri Jan 25, 2013 4:19 am Post subject: Re: Availability of LocalEnvironment |
|
|
Shaman
Joined: 08 Feb 2009 Posts: 709 Location: Chennai, India
|
Vitor wrote: |
I'm confused. |
Sorry for that. Find below two scenario's,
Scenario-1:
I have 3 Compute nodes (Compute1, Compute2 and Compute3 in the same order in the flow). The Compute Node property for then is as below,
Compute1 - LocalEnvironment And Message
Compute2 - Message
Compute3 - Message
When I set a Variable in LocalEnvironment in Compute1, I am able to see it thorugout the Message Flow (till the end of the message flow).
But the documentation says it will be available only if the Destination mode is set to 'LocalEnvironment And Message', but in my case Compute2 and Compute3 have the comput mode just set to Message.
Scenario-2:
I have 3 Compute nodes (Compute1, Compute2 and Compute3 in the same order in the flow). The Compute Node property for then is as below,
Compute1 - LocalEnvironment And Message
Compute2 - LocalEnvironment And Message
Compute3 - Message
When I set a Variable in LocalEnvironment in Compute1, I am able to see it in Compute2 (as expected). In Compute2 I set two more variables in LocalEnvironment which I am able to see thorugout the Message Flow (till the end of the message flow), but the Variable that was set in Compute1 is not seen after Compute2.
My doubt is, as per the documentation, only if the Compute Mode is set to 'LocalEnvironment And Message' in each Compute node, the LocalEnvironment should be propagated. But that does'nt happen here. The behaviour seems to be a bit confusing.
Hope this clarifies. |
|
Back to top |
|
 |
mgk |
Posted: Fri Jan 25, 2013 4:32 am Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
It looks like to docs could be improved in this case. What's happening is that each Compute Node always create a new LocalEnvrionment tree when you enter the node (the OutputLocalEnvrionment tree) which you can choose to use if you wish. What the ComputeMode property controls is which trees are propagated when the message is send on down the flow. Message means "Send the new OutputRoot tree along with the original InputLocalEnvironment tree and original InputExceptionList tree." The LocalEnvironment and Message option means "Send the new OutputRoot and new OutputLocalEnvrionment trees along with the original InputExceptionList". The 'All' option means "Send all the new Output* trees and none of the Input* trees" etc and it is similar for the other options. What the output trees contain is upto you. So if you copy InputLocalEnvrionment to OutputLocalEnvrionment add a new element in the output Tree but only Propagate the Input tree then you will not see your changes. Likewise, if you do not copy the Input Tree across but only propagate the OutputTree then you will only see values you added to the tree in the node (if any). There is no automatic copying from one tree to another, you fill in the trees in the node and use the Compute Mode to choose which are propagated.
I hope this helps a little...
Kind 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 |
|
 |
kash3338 |
Posted: Fri Jan 25, 2013 4:47 am Post subject: |
|
|
Shaman
Joined: 08 Feb 2009 Posts: 709 Location: Chennai, India
|
mgk wrote: |
What the ComputeMode property controls is which trees are propagated when the message is send on down the flow. Message means "Send the new OutputRoot tree along with the original InputLocalEnvironment tree and original InputExceptionList tree." The LocalEnvironment and Message option means "Send the new OutputRoot and new OutputLocalEnvrionment trees along with the original InputExceptionList". The 'All' option means "Send all the new Output* trees and none of the Input* trees" etc and it is similar for the other options. What the output trees contain is upto you. So if you copy InputLocalEnvrionment to OutputLocalEnvrionment add a new element in the output Tree but only Propagate the Input tree then you will not see your changes. Likewise, if you do not copy the Input Tree across but only propagate the OutputTree then you will only see values you added to the tree in the node (if any). There is no automatic copying from one tree to another, you fill in the trees in the node and use the Compute Mode to choose which are propagated. |
Thanks a lot mgk. This clearly explains the understanding of how this works. The doc is somewhat misleading in this case.
mgk wrote: |
It looks like to docs could be improved in this case. |
 |
|
Back to top |
|
 |
Vitor |
Posted: Fri Jan 25, 2013 6:40 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
kash3338 wrote: |
mgk wrote: |
It looks like to docs could be improved in this case. |
 |
Can we rely on you to push the Feeback button on that InfoCenter article and reference this link? I know I'm going to be doing that, and more feedback means quicker changes...... _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
kash3338 |
Posted: Fri Jan 25, 2013 10:02 am Post subject: |
|
|
Shaman
Joined: 08 Feb 2009 Posts: 709 Location: Chennai, India
|
Vitor wrote: |
Can we rely on you to push the Feeback button on that InfoCenter article and reference this link? I know I'm going to be doing that, and more feedback means quicker changes...... |
Done!!!  |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|