- Categories:
System functions (System Control)
SYSTEM$CAST_ MULTI_ PARTY_ APPROVAL_ VOTE¶
Casts a vote on a pending Multi-party Approval request. An approver calls this function
with a decision of APPROVE or REJECT to vote on a request. A requester can call it
with REJECT to cancel their own pending request before it is approved or expires.
Syntax¶
Arguments¶
'request_id'The unique identifier for the approval request to vote on. This value is returned in the
MPA_APPROVAL_REQUIREDerror when a protected operation is intercepted by the Multi-party Approval engine.'decision'The vote to cast. One of the following values:
APPROVERecords an approval vote for the request. When the number of approval votes reaches the rule’s required number of approvals, the request status changes to
APPROVEDand the requester can replay the original statement.REJECTRecords a rejection. A single
REJECTvote from an approver immediately terminates the request. A requester can useREJECTto cancel a request that they created.
'comment'A comment explaining the vote. This argument is required, except when a requester uses
REJECTto cancel their own request, in which case it’s optional.
Returns¶
A confirmation string indicating the vote was recorded successfully.
Access control requirements¶
No additional privileges are required to call this function. To cast an APPROVE vote or
an approver REJECT vote, you must be listed as an approver for the request’s rule. To
cancel a request, you must be the user who created it.
Usage notes¶
-
Approvers can also review and vote on requests from the Snowsight Requests & Approvals page. Casting a vote through the UI is equivalent to calling this function.
-
A single
REJECTvote terminates a request immediately, regardless of how many approvals it has already received. -
You can only cancel requests that you created. Attempting to cancel a request created by another user fails.
-
A comment is required for every vote, except when a requester uses
REJECTto cancel their own request. -
You can vote on or cancel a request at any time while it is in
PENDINGstate. To view pending requests, go to the Snowsight Requests & Approvals page.
Examples¶
Cast an approval vote on a pending request:
Reject a pending request:
Cancel a request that you created (no comment required):