Author |
Message
|
kash3338 |
Posted: Wed Sep 07, 2011 10:07 pm Post subject: Setting the transactionality |
|
|
Shaman
Joined: 08 Feb 2009 Posts: 709 Location: Chennai, India
|
Hi,
I have a requirement wherein I need to get a flat file from a FTP location and the file would contain multiple records. I need to send each record as a XML to a Publish node.
Now the requirement is that, even if one record fails in between, I need to send the rest and log the error for the failed record in a Queue. How do I implement this solution? |
|
Back to top |
|
 |
zpat |
Posted: Wed Sep 07, 2011 11:19 pm Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Seems straightfoward use of fileinputnode (record mode) and a MQoutput node for the failures.
Using a MQoutput node does not mean that the flow has to terminate at that point - it can continue on the other side of it.
What would cause a record to "fail"? |
|
Back to top |
|
 |
kash3338 |
Posted: Wed Sep 07, 2011 11:36 pm Post subject: |
|
|
Shaman
Joined: 08 Feb 2009 Posts: 709 Location: Chennai, India
|
While mapping each record to XML, we do some validation and throw exception on some cases.
But what is Record Mode in File Input Node? I just get the complete file and using the message set cardinality, split the messages and map to XML. Where do I connect to get the failed messages? |
|
Back to top |
|
 |
zpat |
Posted: Thu Sep 08, 2011 12:32 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Look at record and element tab property in fileinput.
You should process it record by record. THis is the nature of WMB.
WMB is not a container for a program to start, process all data and stop.
It handles transactions atomically (or should do), record by record or message by message. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Sep 08, 2011 4:03 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
kash3338 wrote: |
I just get the complete file and using the message set cardinality, split the messages and map to XML. |
Why? Why not have the node do this for you as my worthy associate points out? You're paying all this money for WMB, why write code yourself?
If you want to continue processing even if one record fails validation, there can't be any affinity between records. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|