Symptom
An employee is receiving an error message when attempting to cancel a Leave Request Workflow that has been entered by an admin user - "You cannot cancel this pending request because it was approved before your changes. Please wait until the request has been processed by the approver."
Environment
Employee Central - Time-Off
Reproducing the Issue
- Enter a Leave Request for an employee as an Admin that triggers a workflow
- Proxy as the employee and attempt to cancel the Leave Request
- Receive the following error:
"You cannot cancel this pending request because it was approved before your changes. Please wait until the request has been processed by the approver."
Cause
This is a standard validation error that can be triggered if cancellation workflow is active for the Time Type. With that validation we make sure that the employee cannot cancel an Absence bypassing the cancellation workflow. If an employee creates an Absence that goes to status Pending, the employee can cancel that Absence without a cancellation workflow. However, if the Absence was approved, the employee should not be able to cancel the absence via two-step changes.
Example:
- Absence was created and approved.
- Employee edits that absence -> The status is set to pending.
- Employee cancels the pending absence -> The status would be set to cancelled without approval workflow.
As concrete criteria for a. we check it the absence was created either by an Admin or if there was an approved workflow for that Absence.
Resolution
The employee cannot cancel the absence. The approver needs to either approve or reject the workflow.
Keywords
cancel leave request, submitted by admin, admin leave request, workflow, TIM-9881 , KBA , LOD-SF-EC-TIM , Time Off , Problem