|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Help - ESQL List |
« View previous topic :: View next topic » |
Author |
Message
|
hegde16 |
Posted: Mon Feb 17, 2014 9:10 am Post subject: Help - ESQL List |
|
|
Newbie
Joined: 07 Feb 2014 Posts: 2
|
Hello
I have a requirement to store list of elements for eg , 100, 120 ,130 etc in a list and check if this list has data based on input message,Can someone expalin me how to achieve the same in ESQL wihout using array as data is hardcoded values.
thanks! |
|
Back to top |
|
 |
Gralgrathor |
Posted: Mon Feb 17, 2014 2:03 pm Post subject: |
|
|
Master
Joined: 23 Jul 2009 Posts: 297
|
Not sure I understand.
Are you saying that you have a pre-determined list of values, and that you want to check each new incoming message against that list?
If so, then there's this to consider:
- If this concerns business logic, it's usually better to put such logic outside the broker.
- Such pre-determined lists are not usually as invariable as people want them to be. So you would want to store them in such a way that they can be updated without redeploying the flow. A database would be ideal.
- If a database is not an option, then you might consider some file based scenario, in which the file can be periodically read into a shared variable without restarting the flow. |
|
Back to top |
|
 |
Esa |
Posted: Mon Feb 17, 2014 11:07 pm Post subject: |
|
|
 Grand Master
Joined: 22 May 2008 Posts: 1387 Location: Finland
|
Have you checked if you could use ESQL LIST? |
|
Back to top |
|
 |
mqsiuser |
Posted: Tue Feb 18, 2014 1:17 am Post subject: |
|
|
 Yatiri
Joined: 15 Apr 2008 Posts: 637 Location: Germany
|
Just use a tree (to store a list) and in any doubt, just use the Environment
Works for me
So "use a tree" ... means a *tree data structure*: InputRoot, OutputRoot, LocalEnvironment, Environment, SHARED ROW (is there anything else?).
...because a TrEe Is AlSo CaPaBlE oF StOrInG LISTS.
It is "Environment.myElements" and "Environment.myElements.myElement[1]" (ofc for performant ESQL code: Dont use "[1]" (but reference(s) and "create/move (first)child")).
Use a SHARED ROW if you require the data to be there for consecutive flow invocations (msgs). Write logic that detects, if the SHARED ROW is EMPTY and fills it, by retrieving from a DB. On an EG (Execution Group) restart the SHARED ROW will reload (when the first message passes through). _________________ Just use REFERENCEs |
|
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
|
|
|
|