Trigger to loop and send incremental email based on condition
0
votes
0
answers
167
views
I have a requirement in Oracle apex to implement dynamic approval workflow in issue tracker.
I am trying to write a trigger for the same as below. I need to further modify it so that it runs sequentially.
i.e. When an issue is raised in related dept, it passes through multiple approval levels.
Trigger 1 sends email to first approver for approval.
When the approver logs in to approve, set p_it_issues.APPROVE_THIS='Y1', the next trigger sets p_it_issues.approved=1 to show it has passed first level.
The second trigger sends email notification to second approver as well. (all code mentioned below for reference).
But due to varying levels of approval this would means i will have to create more and more triggers.
Is there a way to combine this so that it would keep incrementing and sending approvals from p_it_people.approver='Approver 1'.to..'Ápprover n' based on approval_level per department? HR department has n approval levels (p_it_departments.approval_level=n , so it would only send it to the n approvers in p_it_people table with Approver column set as Approver 1 .. n respectively?
I need to make this more dynamic, so that in approve_this we have only Y and N.
And both Approvers with Approve 1 select Y in approve_This and then it would move to Approver 2
Looking forward to your help.
Asked by Velocity
(101 rep)
May 18, 2020, 04:06 AM
Last activity: May 19, 2020, 09:51 PM
Last activity: May 19, 2020, 09:51 PM