Author |
Message
|
siri2083 |
Posted: Tue May 04, 2010 12:14 am Post subject: Building CWF MRM Message |
|
|
Apprentice
Joined: 16 Apr 2009 Posts: 39
|
Hi,
We are using WMB6.1. the message design looks like below strcuture.
MqInputnode----> compute node 1 ---->compute node 2-----> subflow----> retunback to main flow----> end
here in the compute node1 we are generating an CWF message using it message set. and in the compute node 2, we will be concatenating all the elements of MRM message and inserting as record in the db2 database table.
as we are using CWF format message, suppose the length of a particular field is 100 characters as per the MDF. but in the input we have just received 10 length.
then it should pad 90 characters at the end.
these 90 characters were not padded to the output element even when we specified the properties in MDF.
Please help.
Note: when i replaced compute node 2 with an MqOutput node, these characters are getting padded and output root is generated successfully.
 |
|
Back to top |
|
 |
kimbert |
Posted: Tue May 04, 2010 12:37 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
in the compute node 2, we will be concatenating all the elements of MRM message and inserting as record in the db2 database table. |
How are you doing this 'concatenation'? It sounds as if the DB column is holding an alternative format for the incoming message, in which case you should probably be using a TDS or CWF message set to write that format.
Quote: |
these 90 characters were not padded to the output element even when we specified the properties in MDF. |
I assume you mean that the DB vaue contains the un-padded version of the field. That is not surprising - the message tree contains the logical form of the data, and it sounds as if you are constructing the DB value from the *logical* values in the mesage tree.
Quote: |
Note: when i replaced compute node 2 with an MqOutput node, these characters are getting padded and output root is generated successfully. |
That's not surprising. The MQOutput node is constructing the output message using the MRM parser. The MRM parser is applying the *physical format* settings to the *logical* value, and padding it out to 100 characters.
Please describe the differences between the DB record and the incoming message. |
|
Back to top |
|
 |
siri2083 |
Posted: Tue May 04, 2010 12:56 am Post subject: |
|
|
Apprentice
Joined: 16 Apr 2009 Posts: 39
|
Hi kimbert,
Thank you for your quick response.
The input message format is xmlnsc and the db column type is Varchar.
we are transforming the xmlnsc in to CWF format for validation and then by concatenating all CWF values as a single character and inserting into the DB2.
there is no MQOutput node in our flow.
 |
|
Back to top |
|
 |
kimbert |
Posted: Tue May 04, 2010 1:12 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Important question: which version of message broker are you using?
Quote: |
we are transforming the xmlnsc in to CWF format for validation |
What do you mean by 'validation'?
Quote: |
and then by concatenating all CWF values as a single character and inserting into the DB2 |
How are you doing the concatenation? Using ESQL? Using Java? Using a message set? |
|
Back to top |
|
 |
siri2083 |
Posted: Tue May 04, 2010 1:45 am Post subject: |
|
|
Apprentice
Joined: 16 Apr 2009 Posts: 39
|
Hi Kimbert,
1. I am using WMB6.1 version.
2. In the compute node , i have se CWF message set properties(Message set ID, Message Type, message format) in the properties of this compute node under validations tab, below properties are set
Validate = Content and value
Failure action = Exceptionlist
3.i have used esql for concatenation. in esql , i have declared a character variable, then i concatenated all the elements of the CWF values and assigned to above declared character variable.  |
|
Back to top |
|
 |
mqjeff |
Posted: Tue May 04, 2010 2:04 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
siri2083 wrote: |
3.i have used esql for concatenation. in esql , i have declared a character variable, then i concatenated all the elements of the CWF values and assigned to above declared character variable.  |
You are not working with a CWF message when you do this.
You are working with a Logical Tree that describes the CONTENTS of a CWF message.
Don't use ||, use ASBITSTREAM. |
|
Back to top |
|
 |
kimbert |
Posted: Tue May 04, 2010 3:58 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
2. In the compute node , i have se CWF message set properties(Message set ID, Message Type, message format) in the properties of this compute node under validations tab, below properties are set |
Have you tested it? Do 'bad' messages get rejected by this validation technique?
Like mqjeff says, use ASBITSTREAM. |
|
Back to top |
|
 |
|