Defining Approval Process Done rules
Approval Process Done rules define the actions taken when the approval process is done. The approval process is considered done when an approval request is approved and passes a Completion rule, or if it is Rejected, Cancelled, or ends with an approval error.
Approval Process Done rules are often used to change the state of the approval request. For example, you use one Approval Process Done rule to change the state of the approval request to Approved and another Approval Process Done rule to change the state of the approval request to Rejected.
When an approver marks an approval request as either Approved or Rejected, the sets this status in the AP:Signature record for that approver. When the conditions are met to approve the request, as determined by the process definition or a Completion rule, the sets the status in the AP:Detail record for the request. To change the status in the approval request form, you use an Approval Process Done rule. This also applies to approval requests that are cancelled or that end in an error.
To define an Approval Process Done rule
- Follow the procedure in Creating-a-rule to complete the basic information about the rule.
- Select Approval Process Done from the Rule Type list.
- Select one or more rule conditions from among the radio buttons: Approved, Rejected, Cancelled, or Error.
The rule executes when the AP:Detail record is put into the selected state.
- Click the Set Fields tab.
- Select a value from the Set Field Type list. See Defining-actions-for-a-rule.
- In the Field Data area, enter the appropriate Field Name and Value to change the status of the approval request.
- Click Save to save the rule.
Example of an Approval Process Done rule
The following figure illustrates an example Approval Process Done rule from the Lunch Scheduler sample application. This Approval Process Done rule is activated when the AP:Detail record is marked Approved during the Completion check. In this rule, the Set Fields action sets the hidden Approval Workspace field on the AP-Sample:Lunch Scheduler request form to Cost approved. In this case, the value set is used by the chained processes in the application. A later action results in marking the request approved overall. See Chaining-approval-processes.
Example of an Approval Process Done rule
