WF Timer to check if specific approval is approved
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2023 06:26 AM
I have a workflow with 3 approvals (one after another). I need to setup a timer to wait 3 days after each so I can check if each has been approved or not. If they are not approved, I need to send a wf notification. Typically I'd key off of the Approval field on the RITM, however since these approvals are one after another the timer will still be running from the first on certain instances and cause issues. I need to setup a Timer and query the specific approval for each.
For Example: Approval 1 goes out, need a timer that waits 3 days and maybe an IF statement that says "Is Approval 1 approved?" if Yes, move to Approval 2, 3 days passes, IF statement that says "Is Approval 2 approved"? Etc.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2023 06:37 AM
In OOB we have a due date field in RITM, You can use that to set an approval due date every time when approval is requested. In workflow use the timer activity and set the due_date field in that. Use run script activity after approval activity and before timer activity to set the 3 days ahead date in the due_date field.
For example
Approval 1 activity->Run script to set the due_date for approval 1-> Timer activity wait till due_date-> Check if approval is approved/not using If condition and trigger notification using gs.eventQueue() -> Approval 2 acivity-> Run script activity to set due_date for approval 2->Timer activity will wait till due_date->Check if approval is approved/not using If condition and trigger notification using gs.eventQueue() - > Follow the Same for approval 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2023 06:56 AM
Sai - thanks for the response. Unfortunately we use that Due Date for SLAs and Reporting so we can't have it changing(we also setup a separate field to require a reason for changing it if that date changes). I thought the easiest and least complicated way to do this would be if I could just query the Approval WF Activity somehow but I may end up having to put in variables on the catalog item to key off of.