|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Counter problems in ESQL |
« View previous topic :: View next topic » |
Author |
Message
|
datspats |
Posted: Thu Jul 19, 2007 9:45 pm Post subject: Counter problems in ESQL |
|
|
Voyager
Joined: 12 Apr 2007 Posts: 80 Location: Mumbai
|
I have requirement in my message flow, I want to keep one variable which is time-bound, i.e. on the a daily basis first run of message flow this variable should become 01, on the second run of the message flow it should become 02......so on
On the next day again for first run of message flow it should become 01 again,
How Do i achieve this in my message flow, as ESQL doesnot maintain the the Static variable as in java?
Please help
Regards |
|
Back to top |
|
 |
elvis_gn |
Posted: Thu Jul 19, 2007 10:34 pm Post subject: Re: Counter problems in ESQL |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
Hi datspats,
datspats wrote: |
How Do i achieve this in my message flow, as ESQL does not maintain the the Static variable as in java? |
If you say that it can be done in Java, then you should use the Java compute node...though I don't know how the static variable would last when the flow thread ends, but then Java is not my cup of Java
In ESQL it's not possible, shared variable would also last the thread's lifetime...
I guess a database solution is the only decent solution...
Regards. |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Jul 20, 2007 3:38 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
It doesn't matter what mechanism you use to ensure the retention of the current value.
The only important thing is that the current value is maintained.
And then that you have the proper algorithm for ensuring that the current value is what you want it to be.
It seems like you have three requirements for this value.
1) If it is not set, then it is 1
2) If it is >= 1, then it is incremented
3) if it is no longer YESTERDAY and is now TODAY, then the value is 1 _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
dilse |
Posted: Fri Jul 20, 2007 1:55 pm Post subject: |
|
|
 Master
Joined: 24 Jun 2004 Posts: 270
|
Quote: |
You could use either database to store the date value or Broker Cache.
|
Store the date value in one of the above method. Compare to see if the current date is the same as the date that is in the table. If it is, increment the counter otherwise initialize it to 1. |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Jul 20, 2007 2:54 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
dilse wrote: |
Quote: |
You could use either database to store the date value or Broker Cache.
|
Store the date value in one of the above method. |
It doesn't matter what method is used to store the value, as long as it is persistant across flow invocations. _________________ I am *not* the model of the modern major general. |
|
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
|
|
|
|