|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Creating the whole mrm Schema - is it possible? |
« View previous topic :: View next topic » |
Author |
Message
|
Frik |
Posted: Wed Nov 25, 2009 11:49 pm Post subject: Creating the whole mrm Schema - is it possible? |
|
|
Acolyte
Joined: 25 Nov 2009 Posts: 69
|
Hey,
I have a MRM message set.
In my flow - I want to create it all at once, where all the fields are null valued.
is there a "CREATE" statement that producing that result?
any other way to create the whole scheme at once?
Thanks in advance.
Frik |
|
Back to top |
|
 |
kimbert |
Posted: Thu Nov 26, 2009 1:16 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
So you want to create an output message which contains all elements/attributes in the message definition? I presume you want default values to be applied to everything as well ( otherwise you would have to SET every field anyway, so no code saving ).
This has been requested before, In general it is a very tricky problem because a message definition can contain choices, optional fields, fields which repeat an unknown number of times etc.
I expect your message definiton is a simple one - just a sequence of required simple fields. There is a way to get what you need - although you will burn quite a lot of CPU. Create an empty output tree and ask the CWF or TDS parser to serialize it as a fixed-length message. Because the message format is fixed-length, the writer will put in the default values for you. Then parse the fixed-length message using the CWF/TDS parser and you have a fully-populated message tree. |
|
Back to top |
|
 |
Frik |
Posted: Thu Nov 26, 2009 7:34 am Post subject: |
|
|
Acolyte
Joined: 25 Nov 2009 Posts: 69
|
kimbert wrote: |
So you want to create an output message which contains all elements/attributes in the message definition? I presume you want default values to be applied to everything as well ( otherwise you would have to SET every field anyway, so no code saving ).
This has been requested before, In general it is a very tricky problem because a message definition can contain choices, optional fields, fields which repeat an unknown number of times etc.
I expect your message definiton is a simple one - just a sequence of required simple fields. There is a way to get what you need - although you will burn quite a lot of CPU. Create an empty output tree and ask the CWF or TDS parser to serialize it as a fixed-length message. Because the message format is fixed-length, the writer will put in the default values for you. Then parse the fixed-length message using the CWF/TDS parser and you have a fully-populated message tree. |
Kimbert, thanks for your quick answer.
is it the only way? |
|
Back to top |
|
 |
kimbert |
Posted: Thu Nov 26, 2009 8:04 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
You could cache a full-populated message tree in a shared row variable, and take a new copy of it every time the flow is invoked. As it would be created once when the execution group starts, you could create it by parsing an XML message. |
|
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
|
|
|
|