|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
RESOLVING CHOICE in CWF |
« View previous topic :: View next topic » |
Author |
Message
|
rajaram |
Posted: Wed Mar 24, 2004 7:19 am Post subject: RESOLVING CHOICE in CWF |
|
|
Acolyte
Joined: 02 Jan 2004 Posts: 53
|
Hi,
I have a Input Message Set in CWF format. I have a record consisting of 5 fields. the 3rd one in the record is a compound type field where the type composition is choice and there are 2 elements under it. Both of them are having same LENGTH. One of the field is integer type and another one a string type. The fields under this choice type are not dependent on any other field. The value is decided based on the Incoming data for the compound type. If it is a string it should go into first field otherwise it should go into second field. In the Compute Node, i have added both input and output message sets to be the same. I tried to reference the field from the Input(as suggested in the manual)in ESQL, but was not able to parse. Can Any one Give me an Idea as to How my Code Should look like in the compute node to resolve the Choice Type.
Thanks in Advance... |
|
Back to top |
|
 |
EddieA |
Posted: Wed Mar 24, 2004 7:44 am Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
The choice is "resolved" when you "reference" one of the fields inside the Choice part. At that point the parser "knows" which choice to use.
Unless you have someway to know, from the fixed part of the data, what field to use, then I don't think that Choice will work.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
kimbert |
Posted: Thu Mar 25, 2004 5:07 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
...so you need to write some ESQL to sort out the correct cast.
You could change your message definition so that the choice is replaced by a single BINARY field. In your ESQL, implement whatever rules you like to resolve the BINARY field into a string or an integer. Presumably you know what the rules are. |
|
Back to top |
|
 |
rajaram |
Posted: Thu Mar 25, 2004 8:10 am Post subject: |
|
|
Acolyte
Joined: 02 Jan 2004 Posts: 53
|
Thanks Alot for your replies..Kimber, U r correct. I am able to solve the problem...What I understood is the choice type need not be based on other element in the message. We can directly cast the incoming value present in the choice type into an integer or whatever we want to. If we are able to parse succesfully against an integer, we can reference the field from the input to the output.
Thanks Again.. |
|
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
|
|
|
|