Approvals request processing

A component that has an action that potentially needs to be reviewed using Approvals sends an MQ message containing some details about the approval request to Approvals. When the message is received, the Approvals rules engine is used to determine which reviews are configured for this action. If reviews are configured, the Approvals engine stores the request details and required reviews in the database. After the appropriate reviewers have used the approvals page to complete all of the required reviews, Approvals sends an MQ message to the component that indicates whether its approval request was approved or rejected. Figure 1 shows an example of the message queues used by Transaction Server and TCR to communicate with Approvals.

Figure 1. Approvals queues

When an approval request requires one or more reviews, the engine creates database records corresponding to each review required. All of the records for the first review level are initially placed in the pending state. The records for later review levels are initially placed in the prior pending state. Figure 2 shows how the states change as approval requests are reviewed by eligible users.

Figure 2. Approvals review states
The approvals page shows users which approval requests they are able to approve or decline. A user can work with an approval request when:
  • the status column of the approvals page indicates that the request is pending
  • the review eligible column on the approvals page indicates that the user is eligible to review the request

When an eligible user approves an approval request, the corresponding record changes from the pending state to the approved state. If the review was also the last one for its review level, any reviews for the next level change from the prior pending state to the pending state. If the review was the last one for the entire approval request, the requesting component is notified that the approval request is approved.

When an eligible user rejects an approval request, the corresponding record changes from the pending state to the rejected state. Any outstanding reviews for this request that are in the pending or prior pending states are changed to the prior rejected state. The requesting component is notified that the approval request is rejected.

Normally, a requester automatically receives the decisions made for their approval requests. If, for some reason, the original requester does not receive the decision, an eligible user may use the resend action to re-notify the requester of the decision that was made for the approval request.