I have a job which is creating single PDF’s per record and then doing a folder listing on the output folder to apply a certificate as per the below:
However when it runs on workflow with a large number of records it appears to be going to the folder capture before it’s actually output everything. Does workflow not wait to move onto the next item\step when you do a create output like this? How can I get around this? I could put a wait\sleep command in but how long do I set this for? The volumes greatly differ from each run on this job.
When I need a full batch to be dealt with before I initiate further procesing of the resulting output, I start my process with a dummy input, branch out and perform the folder capture of the source files inside that branch. the process itself can be triggered with a trigger file or on a schedule, depending on your business case.
This ensures everything has been captured and processed inside that branch before moving on to the next phase, while automatically moving to the next phase without my intervention or further triggering.
I hope this makes sense.