Rollback on Processing error

One Star

Rollback on Processing error

I would like to know how I can rollback and stop the job on any type of processing error. I am using an "existing" connection for all db operations. My job looks like this,

PreJob == > Oracle Connection
fileInput -> map => oracleoutput
||
|| On component Ok
||
fileInput -> map ==> Oracle Output

PostJob ==> Oracle Commit

I want to rollback for any exception, be it a db exception or a processing exception like file not found, map error and likewise.
Thanks
One Star

Re: Rollback on Processing error

For errors on components or subjobs, I would use the onComponentError and onSubJobError links on the components to a tOracleRollBack component.
For tMap inner join errors, I would link the inner join rejects to a file, and then check at the end of the job the size of that file. If it is > 0, I would roll back, if not, I would commit.
Can you post a more specific scenario?
One Star

Re: Rollback on Processing error

Does it mean OnComponentError should be attached for each component in context. The errors I am talking can be runtime errors like type conversion, file not found, NullPointer and likewise and it can happen on any component. Consider a complex job with several components, having OnComponentError on each of those would be not viable.
I am looking for some global way of detecting any exceptions/errors and perform a rollback.
One Star

Re: Rollback on Processing error

Then you should use the OnSubjobError link to detect whenever a runtime error happens on any component on the sub job.