pub.file.getFile
To convert file to Object
pub.flatFile.convertToValues
To parse the files
Some times if the files is not in accordance with the Flat File struture/Schema, the flow Service is just processing. I mean it should ideally it should exit the service with some kind of error message.
As Pauly said use the Try/Catch Sequences,here is the snippet,
Sequence(Exit on SUCCESS)
—>Sequence(Exit on FAILURE)–Try
-------pub.file.getFile
-------pub.flatFile.convertToValues
------->Mapping steps…
---->Sequence(Exit on DONE)–Catch
------>pub.flow:getLastError(this output holds all the error dump)
------->Nofify the Errors(using pub.client:smtp)
------->Exit the flow (Failure)
So any kind of Invalid Schema,null pointer exceptions the errors will be caught in the DONE sequence.
If you are setting iterate=true in the pub.flatFile.convertToValues, and then check on the ffIterator value is “null” in the pipeline, then you have to Exit the loop and move the process further.