Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have to unarchive files where names are issued from a database.
For that I use : TDBInput (PostgreSQL) --(row)--> TFlowToIterate --(iterate)--> TFileUnarchive
It works but sometime, I have a Zip file which is not a real archive file and I get the corresponding message in the console. I want to have it in the log file too (I configured logs in Project properties) so I connect tFileUnarchive to a tWarn with an Run if connector ; my condition is ((String)globalMap.get("tFileUnarchive_1_ERROR_MESSAGE"))!=""
With that the component tWarn is always run even if the archive file is a correct file.
What is my mistake, please ?
@Moe ,
Instead of Run If connector can you try connecting to tWarn using OnComponentError. Also 'Die On Error' on Unarchive component has to be enabled for it to work.
Now if that is not possible for you, you may have to split it into a child job and do the unarchive part in a child job and enable die on error on tFileUnarchive but leave 'Die on Child error' unchecked in tRunJob that calls this child job. In this case even if the child job fails because of unarchive error, the parent job would continue executing for the next record in DB.
Let me know if neither of the solution work
@Moe ,
Instead of Run If connector can you try connecting to tWarn using OnComponentError. Also 'Die On Error' on Unarchive component has to be enabled for it to work.
Now if that is not possible for you, you may have to split it into a child job and do the unarchive part in a child job and enable die on error on tFileUnarchive but leave 'Die on Child error' unchecked in tRunJob that calls this child job. In this case even if the child job fails because of unarchive error, the parent job would continue executing for the next record in DB.
Let me know if neither of the solution work
Hello,
The first solution doesn't work because it stops all the job.
The second one is working; however (it's not really an issue) in the log file, I get two lines for a error :
- A line for the Java exception
- A line with my own message generated by the tWarn component
Ideally, I only would the message from the tWarn component.
Anyway, many thanks for your help.
Jeff