I've searched and searched and not quite found what I appear to be experiencing.
I have a process that accepts documents in a batch we have a main try/catch at the start of the process. The process examines each document and uses a process route shape to call 1 of 4 database destinations. Each process for the database operation does some mapping and then calls a sub process containing just the database connector with a try/catch around it set to all errors and to retry.
Main Process - Try/Catch - Process Route - Sub Process - Sub Process - Try/Catch - DB Call
Our database calls return a sucess/failure status code which is used to then return down a failure or sucess path from the process route.
After the process route in the main process the Sucess path continues to additional processing and the Failure path runs an exception shape with the 'Stop a single docment' checked.
Lets say we have a batch of 100 documents, and we route 50 to database 1 and 50 to database 2. All 50 documents to database 1 are sucessful and continue to process as normal. Only 47 documents to database 2 are sucessful and they continue to process as normal. The 3 that failed return down the Failure path and then hit the Exception shape.
The catch in the main process is run. HOWEVER, rather than the 3 documents I expect it is all 50 that went to the the database 2 call.
I can see that only the 3 documents in error make it to the exception shape on the Failure path, but when I look at the catch block I have all 50 documents that where routed to the database 2 call.
Process route and process calls do not have 'Abort if process fails' enabled and I have tried both document errors and all errors on the try/catch in the main process to no effect.
Is this the 'expected' behaviour when I raise a single document exception?
Currently I have a flow control set to run documents individually to get around this but that causes the process to be VERY VERY slow and is not a perminant solution.