Workflow loop email only works on first loop (172 Views)
Reply
Advisor
Paul Hess 281
Posts: 14
Registered: ‎01-31-2008
Message 1 of 7 (172 Views)
Accepted Solution

Workflow loop email only works on first loop

I have created a workflow loop to send email of [REQ.MOST_RECENT_USER_NOTE_TEXT] to the request creator and request requestor. Since I cannot actually send out real emails from the DEV environment, I have to use the Notification History Report to see what WOULD have been sent out.

The first pass through the loop generates the email record which shows up on the report, however, each succeeding pass through the loop fails to generate a new entry on the report.

A strange side effect however, is that when the token for the addressee is changed before passing through the loop, the report adds the new addressee to the list of the people who would have received the report, but it's still all on the orginal line of the first pass through the loop. The date/time of the line remains that of the original email.

The loop consists of 2 execution steps: 1) to send the email, and 2) to force a change on one of the ootb fields (hidden) so that an entry appears in the NOTES section to record when the email was sent.

ITG 5.5 PL19.

Thanks for any suggestions on how to solve or work around this issue.
Please use plain text.
Trusted Contributor
Tim Brandish
Posts: 58
Registered: ‎12-07-2007
Message 2 of 7 (172 Views)

Re: Workflow loop email only works on first loop

I would check the knta_notif_txn_parents, knta_notif_txn_details and knta_notif_txn_recipients. I'd bet that a new details and recipients record is getting created under the same parent and the report is just combining everything under one parent.
Please use plain text.
Advisor
Paul Hess 281
Posts: 14
Registered: ‎01-31-2008
Message 3 of 7 (172 Views)

Re: Workflow loop email only works on first loop

So, then, Tim.
When I move this to production, will I be sending out multiple emails (per each loop through)? I just need some confirmation.
Please use plain text.
Trusted Contributor
Tim Brandish
Posts: 58
Registered: ‎12-07-2007
Message 4 of 7 (172 Views)

Re: Workflow loop email only works on first loop

after re-reading your question, I realized that I had this same problem in the past. I had to add an execution step in the loop that called a perl script that would sleep for 5 seconds after every notification. It sounds crazy, but it worked.
Please use plain text.
Advisor
Paul Hess 281
Posts: 14
Registered: ‎01-31-2008
Message 5 of 7 (172 Views)

Re: Workflow loop email only works on first loop

Your suggestion sounds logical: I haven't been impressed with the speed of Demand Management processes. However, not being a Perl jockey myself, could you attach the script that you used to create the delay?

Many thanks,
Please use plain text.
Trusted Contributor
Tim Brandish
Posts: 58
Registered: ‎12-07-2007
Message 6 of 7 (172 Views)

Re: Workflow loop email only works on first loop

put this in your execution step to call the script:

ksc_local_exec /opt/Kintana/bin/sleep.pl 5
Please use plain text.
Advisor
Paul Hess 281
Posts: 14
Registered: ‎01-31-2008
Message 7 of 7 (172 Views)

Re: Workflow loop email only works on first loop

Thanks for the help, Tim.
Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation