Configure automatic status change for approvals
Approval objects can be configured to change status automatically according to the percentage of approvers who accept or reject the document.
In triggerswebplatform.xml, the trigger
EvaluateApprovalTrigger
defines the conditions in which the
approval object changes status automatically from its original status,
open
, to a final status, approved
or
rejected
.
In the trigger code, the parameter validation
is set to a number
from 0 to 1. This number corresponds to the percentage of approvers who must approve
the document in order for the status of the approval to change to
approved
. If this condition is not met, the status of the
approval changes automatically to rejected
. For example, if
validation
is set to 0.75, 75 percent of approvers must approve
the document for the approval to move to approved
; if less than 75
percent approve the document, the approval moves to rejected
.
It is not necessary for all assigned approvers to complete the approval in order to enable the automatic status change.
The trigger can be commented out in order to disable the automatic status change of approval objects.