Iterating over several subjobs.

I have my xml data split into several xml files I iterate over them and input them to my DB.So I am using tFileList?Iterate?Each of the tFileInputXML-->tXMLMap--->tMysqlSP inputs data into a different table.This worked correctly in Talend 4.2.4 inserting data into the main table first. This order is important as there are constraints between the tables.We have moved to Talend 5.1 and the job has stopped working inserting to table 3 first.I have tried using on OnSubjobOk but this also fails inputting the same files data twice to the table 2 and table 3. tMysqlConnection |OnSubjobOk | tFileList--Iterate-->tFileInputXML-->tXMLMap--->tMysqlSP(main table) | | | OnComponentOk | | | tFileInputXML-->tXMLMap--->tMysqlSP(Table 2) | | | OnComponentOk | | | tFileInputXML-->tXMLMap--->tMysqlSP(Table 3) OnSubjobOk | tMysqlCommit