Author |
Message
|
ein |
Posted: Wed Jan 05, 2011 4:20 am Post subject: Question on Shared Variables |
|
|
Centurion
Joined: 14 Mar 2009 Posts: 108
|
Hi Guys,
I declared Shared Variables in one of my flow. The flow fetch the values from DB and assign values to those shared variables.
My another flow need to get those shared variables , But It gets only declared values like
DECLARE flg SHARED BOOLEAN FALSE.
My First flow assign a value to flg as TRUE. But My Second flow is it receives only FALSE.
Can one suggest me how i need to read those assigned values. |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Jan 05, 2011 4:21 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
What scopes are SHARED variable valid in? What does the documentation say? |
|
Back to top |
|
 |
ein |
Posted: Wed Jan 05, 2011 4:21 am Post subject: |
|
|
Centurion
Joined: 14 Mar 2009 Posts: 108
|
The documentation says, The scope is Exe Grroup. |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Jan 05, 2011 4:23 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
It says more than that.
Among other things, it talks about a difference between Module and Schema scope.
It also should explicitly state that you can't share variables between two flows. |
|
Back to top |
|
 |
ein |
Posted: Wed Jan 05, 2011 8:27 pm Post subject: |
|
|
Centurion
Joined: 14 Mar 2009 Posts: 108
|
ok, Then ,
I have a requirement like that. How do i achive it? |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Jan 05, 2011 9:54 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
RMI to a static variable with synchronized methods residing in a single JVM... would be one way of doing it...
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Jan 06, 2011 2:48 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
fjb_saper wrote: |
RMI to a static variable with synchronized methods residing in a single JVM... would be one way of doing it... |
Oh, sure, suggest the hard way. |
|
Back to top |
|
 |
bsiggers |
Posted: Thu Jan 06, 2011 9:38 am Post subject: |
|
|
Acolyte
Joined: 09 Dec 2010 Posts: 53 Location: Vancouver, BC
|
Would suggest something simple like reading the contents of the variable from a shared file, or maybe a database table if you happen to have one.
Of course, this has many impacts and drawbacks, including synchronization, performance, etc. which may or may not be relevant depending on what you're doing. But without further information it's hard to make recommendations. |
|
Back to top |
|
 |
|