Another … “better” approach might be to use Auto Print, or Run the Report using the Breaking and Routing Capabilities of the system to do the emailing for you.
So instead of doing the email in the BPM, you run the report and let the report do the emailing for you automaticaly.
New plan:
finish my BPM by sending the acknowledgment to the system agent.
Setup a new async BPM that fires when SysTask.TaskStatus changes to COMPLETE.
If it’s a report I sent (aka it has some signature in the TaskNote), then I’ll build the email and add the attachment.
The only reason I don’t want to go this route is it does not support HTML (at least not in my version).
Were you able to get a working BPM that sends the Order Acknowledgement form? I am trying to automate that process, and I’m having an issue getting the report as a pdf attachment.
Yes and no.
I thought I had it working OK (I got it to work seemingly reliably) but at some point I realized it was not working every time. So I ended up disabling it and haven’t gotten back to it to figure out why it wouldn’t work reliably.
I don’t know if either of you are still looking for this, but since I was referencing @dr_dan 's post to refresh my memory I thought I would pop this in.
Your answer lies in using RunDirect, instead of SubmitToAgent. If you want it to run asynchronously, run it via a scheduled function, which you can schedule on the fly to run “Now”.
Here is the run direct example, which just so happens to be the same report
I’ll have to circle back. I don’t know why I needed to have HTML formatting. I mean, just getting a plain text email with a file attachment would be much better than getting a pretty email with no email attachment. Why wouldn’t I want to use AutoPrint I guess now that I’m thinking about it?