How to generate email notifications based on waiting for approval time in workflow?

Todd O
Tera Guru

I want to create a basic workflow that follows this pattern...

1. User submits CR.

2. CR qualifies to enter workflow process. (I have no problems so far through this step)

3. Workflow process sends email to manager group asking for approval. (this steps seems straight forward as well although I cannot test true emails on my dev instance! ugh )

4. If manager does NOT respond in 2 business hours, workflow sends reminder email to manager group. (this is where I start having trouble)

4. If manager does NOT respond in 6 business hours, workflow sends reminder email to directory group. (more trouble here...)

5. Once manager approves/rejects, no more notifications occur and workflow continues on subsequent paths. (I'm in big trouble already)

The trouble I'm having is how to correctly set this up in the workflow designer.   I've tried a few things but none of them seem to make sense.

For example, I tried this: Begin-->Notification Activity (to send email)-->Wait for Condition (include custom script that says either 2 hours passed or Approval has been changed to Rejected/Approved).   This is where I'm getting tripped up. Do I create a script within the Wait Condition or is there an out of the box solution that is a better fit for this? Is there an example available that is similar to what I'm trying to do?

Also, is there an easy way to calculate "business hours" based on the submission time of the CR? Thank you very much in advance for any assistance.

Todd

1 ACCEPTED SOLUTION

conmic
Mega Guru

I was also thinking about a scheduled script that queries the "sys_approval" table for records matching your conditions. This may however complicate maintenance of the process if not properly documented.



As you're conditions are simple and straight forward I think you can integrate it on the workflow by simply checking the field that contains the state of the approval on your record. Something like this:


ApprovalNotification_Capture.PNG


View solution in original post

9 REPLIES 9

Approval reminder assistance



refer this article,it could be useful


Yes, investigate the sys_trigger table.   You can, on the creation of an approval, insert a sys_trigger based on that record and when it will run.   All you have to do is specify the event that gets fired, and it will fire when the timer runs down on the approval.   Just do a GlideRecord insert into the table and have it fire when you want it.   On approval, you can have a BR that cancels the trigger.


conmic
Mega Guru

I was also thinking about a scheduled script that queries the "sys_approval" table for records matching your conditions. This may however complicate maintenance of the process if not properly documented.



As you're conditions are simple and straight forward I think you can integrate it on the workflow by simply checking the field that contains the state of the approval on your record. Something like this:


ApprovalNotification_Capture.PNG


Michel,


Great suggestion!   I have the scheduled job working but you're right, it's clunky and I had to create JavaScript to see if I'm in a particular schedule and use that to determine whether to send follows ups. The workflow has this out of the box but I just didn't realize I could go in 2 different directions for the same source (e.g. begin box).



So, I have 2 separate paths now flowing through my workflow. I guess I don't see a problem with that.   I'll give this a try and come back to mark this as correct answer shortly. Thank you!!!!!


Todd


Hello Tod,



You can even go further if it works: You could built this into a dedicated workflow on the task table and call it as Sub-Workflow on any workflow extending it. Like that you can have the same notification process for multiple different workflows as long as it's somehow connected to the task table.



Kind regards,


Michel