I have a process which uses a state machine and within the Initialise state collects PDF reports from a site and adds those files, along with a number of excel files in the same directory, to an orchestrator queue, and then in the Process state I either simply print, or print to PDF then print, respectively.
I would then like to attach all the PDFs (direct PDFs and the excel files which were PDFs) to one email, and I have a component for doing this which should work fine, but I was wondering if it would be advisable to invoke this in a new “State” or if it could be included in the Process or End Process States?
I feel if in Process it will send individual emails for each report as it iterates through, but I think I read it could be included here, so would appreciate some advice please. If in a new state, where in the flow would this go? Between “Get Transaction Data” and “End Process”, or would it simply be best to be invoked in “End Process”?
Many thanks in advance,