cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

When Approver is also the Requester the Request is Auto Approved

dbeckner
By Level 10 Champion
Level 10 Champion

Running into situation where we have a catalog item that triggers a Remedy ticket to be created at "On Approver approval" but when the requester is also the approver it gets automatically approved and does not trigger this action to fire. I've included the log below. How can we prevent the automatic approval when the approver is the requester?

 

<![LOG[RequestID: 562 Approver Count: 1]LOG]!><time="12:18:30.000+240" date="2-15-2022" component="processInstallRequest" context="" type="1" thread="4" file="Website">
<![LOG[One approver found and approver is requester or manager, Approving automatically]LOG]!><time="12:18:30.000+240" date="2-15-2022" component="processInstallRequest" context="" type="1" thread="4" file="Website">
<![LOG[First level approver is requester or manager, Approving automatically first level]LOG]!><time="12:18:30.000+240" date="2-15-2022" component="processInstallRequest" context="" type="1" thread="4" file="Website">
<![LOG[Non-Process approval count is 0, approving request]LOG]!><time="12:18:30.000+240" date="2-15-2022" component="processInstallRequest" context="" type="1" thread="4" file="Website">

 

Additionally, later on in the log it is logging out that there is no WebServiceAction to be executed (On Submit No Approval)

 

<![LOG[Started WebServiceAction execution(if any) for Event : On Submit, RequestID : 562, PackageID : 301.]LOG]!><time="12:18:30.000+240" date="2-15-2022" component="invoke" context="" type="1" thread="0" file="Website">
<![LOG[Completed WebServiceAction execution(if any) for Event : On Submit, RequestID : 562, PackageID : 301.]LOG]!><time="12:18:30.000+240" date="2-15-2022" component="invoke" context="" type="1" thread="0" file="Website">
<![LOG[Started CommandAction execution(if any) for Event : On Submit, RequestID : 562, PackageID : 301.]LOG]!><time="12:18:30.000+240" date="2-15-2022" component="invoke" context="" type="1" thread="0" file="Website">
<![LOG[Started WebServiceAction execution(if any) for Event : On Submit No Approval, RequestID : 562, PackageID : 301.]LOG]!><time="12:18:30.000+240" date="2-15-2022" component="invoke" context="" type="1" thread="0" file="Website">
<![LOG[Completed WebServiceAction execution(if any) for Event : On Submit No Approval, RequestID : 562, PackageID : 301.]LOG]!><time="12:18:30.000+240" date="2-15-2022" component="invoke" context="" type="1" thread="0" file="Website">
<![LOG[Started CommandAction execution(if any) for Event : On Submit No Approval, RequestID : 562, PackageID : 301.]LOG]!><time="12:18:30.000+240" date="2-15-2022" component="invoke" context="" type="1" thread="0" file="Website">

(1) Solution

I'm not aware of a way to prevent the auto-approval from happening; however, you can attach your custom action to the On Submit No Approval event in addition to the On Approver Approval event.  Only one of those will trigger for a given request.

Also, are you using On Approver Approval or On Request Approval?  In the case of a single approval, it shouldn't make a difference, but if you have more than one approver, it would trigger the On Approver Approval action once per approver.  The On Request Approval will only fire once per request, regardless of how many approvers you have (unless you have no approvers/auto-approval, which will skip this event).

Anything expressed here is my own view and not necessarily that of my employer, Flexera. If my reply answers a question you have raised, please click "ACCEPT AS SOLUTION".

View solution in original post

(2) Replies

I'm not aware of a way to prevent the auto-approval from happening; however, you can attach your custom action to the On Submit No Approval event in addition to the On Approver Approval event.  Only one of those will trigger for a given request.

Also, are you using On Approver Approval or On Request Approval?  In the case of a single approval, it shouldn't make a difference, but if you have more than one approver, it would trigger the On Approver Approval action once per approver.  The On Request Approval will only fire once per request, regardless of how many approvers you have (unless you have no approvers/auto-approval, which will skip this event).

Anything expressed here is my own view and not necessarily that of my employer, Flexera. If my reply answers a question you have raised, please click "ACCEPT AS SOLUTION".

@jdempsey That was perfect actually thank you. I also applied to On Submit No Approval and when approval was required it waited till it was approved to fire, but when the approver was the requestor it evaluated the event as no approval and then fired.

Appreciate you!