Author |
Message
|
PEPERO |
Posted: Sun Mar 01, 2015 9:04 am Post subject: Stopping FileInput node processing |
|
|
Disciple
Joined: 30 May 2011 Posts: 177
|
Hi all;
How could i stop the FileInput node processing when i catch an exception processing a read record. In the current situation it walks through the catched exception path , and returns to the input node for the rest of the unread records. |
|
Back to top |
|
 |
nelson |
Posted: Sun Mar 01, 2015 6:22 pm Post subject: |
|
|
 Partisan
Joined: 02 Oct 2012 Posts: 313
|
Every record is treated as a separate flow transaction... I think you cannot decide whether to process or not the rest of the records.
The KC mention this:
Quote: |
One or more messages can be read from a single file, and each message is propagated as a separate flow transaction.
|
But... also says... this:
Quote: |
If a file is backed out, or a file is left in the mqsitransitin subdirectory because processing failed, remove the integration server UUID prefix from the file name and move it back into the input directory. Processing is automatically retried, beginning at the first record in the file. |
Your question ended in another question...:"beginning at the first record in the file" ..... not pretty sure about this behavior (never tried) ... duplicated transactions? multiple rollbacks? What does the KC mean by a flow transaction? |
|
Back to top |
|
 |
Esa |
Posted: Sun Mar 01, 2015 11:59 pm Post subject: Re: Stopping FileInput node processing |
|
|
 Grand Master
Joined: 22 May 2008 Posts: 1387 Location: Finland
|
PEPERO wrote: |
Hi all;
How could i stop the FileInput node processing when i catch an exception processing a read record. In the current situation it walks through the catched exception path , and returns to the input node for the rest of the unread records. |
By throwing an exception in the catch path, which I suppose your current flow doesn't do. |
|
Back to top |
|
 |
PEPERO |
Posted: Mon Mar 02, 2015 4:48 am Post subject: |
|
|
Disciple
Joined: 30 May 2011 Posts: 177
|
Using the Throw node causes walking again through the local failure path. Since there is no local failure path , it returns back to the failure path of the input node, again throwing an exception ... |
|
Back to top |
|
 |
wbisantosh |
Posted: Mon Mar 02, 2015 1:06 pm Post subject: |
|
|
Apprentice
Joined: 12 Nov 2012 Posts: 47
|
This may not be the better way, but, you can leave the Catch and Failure terminals unconnected which will Backout the Message and place it in 'mqsibackout' directory. So does, throwing an Exception while handling it after 'Catch' terminal as suggested by @Esa
Santosh |
|
Back to top |
|
 |
nelson |
Posted: Mon Mar 02, 2015 1:41 pm Post subject: |
|
|
 Partisan
Joined: 02 Oct 2012 Posts: 313
|
wbisantosh wrote: |
This may not be the better way, but, you can leave the Catch and Failure terminals unconnected which will Backout the Message and place it in 'mqsibackout' directory. So does, throwing an Exception while handling it after 'Catch' terminal as suggested by @Esa
Santosh |
What about the committed transactions (previous records)?  |
|
Back to top |
|
 |
wbisantosh |
Posted: Mon Mar 02, 2015 2:03 pm Post subject: |
|
|
Apprentice
Joined: 12 Nov 2012 Posts: 47
|
Are you trying to post to a File or a Queue ?
I have tried with Posting the Output to a File and when I have the 'Transaction Mode' to Yes on the FileInput Node, I am not seeing the Output file unless all the Records are processed successfully and until then the Output File stays in the 'mqsitransit' folder.
Can you tell me what your flow is?
Santosh |
|
Back to top |
|
 |
nelson |
Posted: Mon Mar 02, 2015 6:58 pm Post subject: |
|
|
 Partisan
Joined: 02 Oct 2012 Posts: 313
|
wbisantosh wrote: |
Are you trying to post to a File or a Queue ?
I have tried with Posting the Output to a File and when I have the 'Transaction Mode' to Yes on the FileInput Node, I am not seeing the Output file unless all the Records are processed successfully and until then the Output File stays in the 'mqsitransit' folder.
Can you tell me what your flow is?
Santosh |
I mean, what if I do something like a database update when each record is processed?.. Honestly, I haven't test this scenario, but I'm very curious since every record processing is taken as a transaction (that's my understanding, from the Knowledge Center information). |
|
Back to top |
|
 |
|