During the second stage of applying evidence changes, the evidence controller checks if any of the pending evidence changes require approval from the case supervisor. To make this determination, the evidence controller performs the following steps:
- The evidence controller checks if manual approvals are already outstanding for the evidence by checking if the approval status is submitted. The evidence controller will not add this evidence to the list of pending updates since it still requires approval; however, the evidence will not be sent for manual approval a second time since the case supervisor has already been informed.
- The evidence controller checks if the evidence was previously rejected. If so, the evidence controller submits the evidence for approval.
- The evidence controller checks if the evidence was previously approved. If so, the evidence does not require approval and is thus added to the list of pending updates (ready for the next steps required to apply evidence changes).
- The evidence controller checks if the evidence was previously automatically approved. If so, the evidence will not require manual approval again, so the evidence controller adds it to the list of pending updates.
- For all other evidence, the evidence controller calls the Check for Evidence Approval API which reads the evidence approval checks table and determines if the evidence should be manually approved. Evidence that requires approval is submitted for approval; evidence not requiring approval is added to the list of pending updates.
To set an evidence's approval status to submitted, the evidence controller does the following:
- The evidence controller creates an approval request record and an evidence descriptor approval request record with the current approval request indicator set to true.
- The evidence controller updates any previous evidence descriptor approval request records for the same evidence descriptor record by setting the current approval request indicator to false.
- The evidence controller updates the evidence descriptor record by setting the approval request indicator to true and the approval status to submitted.
- The evidence controller adds an entry to the evidence change history to acknowledge that the evidence has been submitted for approval.
- The evidence controller enacts the evidence approval workflow (see Submit Evidence for Approval Workflow).