|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Shared Variable |
« View previous topic :: View next topic » |
Author |
Message
|
Lisa |
Posted: Fri Oct 19, 2007 10:50 am Post subject: Shared Variable |
|
|
Master
Joined: 07 Jun 2002 Posts: 287 Location: NJ
|
Hi All,
I'm trying to use a shared variable in a message flow and I'm having the following problem:
1. DECLARE ExceptionTableCache SHARED ROW;
2. Populate this value -
Set Environment.Variables.Error[] =
LIST{ROW(OutputRoot.XML.Exception.MsgId AS MsgId,
OutputRoot.XML.Exception.ErrorNumber AS ErrorNumber,
OutputRoot.XML.Exception.ErrorText AS ErrorText)};
3. Assign number two to one -
Set ExceptionTableCache.ErrorList =
Environment.Variables.Error;
4. I confirm that the ExceptionTableCache.ErrorList has a value by using this statement - Set Environment.Variables.ErrorCache =
ExceptionTableCache.ErrorList;
Here is my issue: If the message rolls back to the MQInput Queue,
I try to retrieve the ExceptionTableCache.ErrorList and I'm getting a NULL value in the variable. I'm using this statement -
Set Environment.Variables.ErrorCache = ExceptionTableCache.ErrorList;
Can someone help me with this issue?
Thanks, Lisa |
|
Back to top |
|
 |
pcelari |
Posted: Fri Oct 19, 2007 1:30 pm Post subject: Re: Shared Variable |
|
|
Chevalier
Joined: 31 Mar 2006 Posts: 411 Location: New York
|
Lisa wrote: |
Hi All,
1. DECLARE ExceptionTableCache SHARED ROW;
...
4. I confirm that the ExceptionTableCache.ErrorList has a value by using this statement - Set Environment.Variables.ErrorCache =
ExceptionTableCache.ErrorList;
Here is my issue: If the message rolls back to the MQInput Queue,
I try to retrieve the ExceptionTableCache.ErrorList and I'm getting a NULL value in the variable. I'm using this statement -
Set Environment.Variables.ErrorCache = ExceptionTableCache.ErrorList;
Can someone help me with this issue?
Thanks, Lisa |
Of course you wil get NULL in case of rolling back, as ExceptionTableCache.ErrorList gets rolled back to what it was at input node, which is non-existent - before you even declared it.
You should instead check Environment.Variables.ErrorCache, which hold the state information of your msgflow at the farthest end downstream.
good luck. _________________ pcelari
-----------------------------------------
- a master of always being a newbie |
|
Back to top |
|
 |
Lisa |
Posted: Fri Oct 19, 2007 4:56 pm Post subject: Shared Variable |
|
|
Master
Joined: 07 Jun 2002 Posts: 287 Location: NJ
|
Thanks for the reply Pcelari, but ExceptionTableCache.ErrorList
has been declared as a Shared Variable, therefore, the values should remain in memory for the life of the message flow.
Therefore, when the message rolls back to the MQInput Queue,
Environment.Variables.ErrorCache will be blank, but I'm trying to
set the tree with this statement (Set Environment.Variables.ErrorCache = ExceptionTableCache.ErrorList;). As mentioned before, ExceptionTableCache.ErrorList appears to be NULL.
Thanks for any help that you can give.
Lisa |
|
Back to top |
|
 |
fjb_saper |
Posted: Sat Oct 20, 2007 1:38 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
This may well have to do with the change of variable scope as you hit errors and depends on where in the flow and how you trap them...
What are you doing with the exception tree?
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Lisa |
Posted: Sat Oct 20, 2007 9:23 pm Post subject: Shared Variable |
|
|
Master
Joined: 07 Jun 2002 Posts: 287 Location: NJ
|
Hi,
I extract the error from the exception tree and store it here:
Set Environment.Variables.Error[] =
LIST{ROW(OutputRoot.XML.Exception.MsgId AS MsgId,
OutputRoot.XML.Exception.ErrorNumber AS ErrorNumber,
OutputRoot.XML.Exception.ErrorText AS ErrorText)};
Lisa |
|
Back to top |
|
 |
fjb_saper |
Posted: Sat Oct 20, 2007 9:35 pm Post subject: Re: Shared Variable |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Lisa wrote: |
Hi,
I extract the error from the exception tree and store it here:
Set Environment.Variables.Error[] =
LIST{ROW(OutputRoot.XML.Exception.MsgId AS MsgId,
OutputRoot.XML.Exception.ErrorNumber AS ErrorNumber,
OutputRoot.XML.Exception.ErrorText AS ErrorText)};
Lisa |
I still think you might be hitting some kind of scope problem. How do you fare if you put the information directly to the shared variable?  _________________ MQ & Broker admin |
|
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
|
|
|
|