We have certain leave types that require a mandatory attachment before they can be approved by the manager. The workflow is kicked off when the user clicks send and checks whether an attachment for that leave type is required. If an attachment is required then the workflow does not continue. The leave request sits in the requestor's universal worklist and only once it is actioned (an attachment is added) does it appear in the manager's universal worklist.
The problem I have is that if the manager wants to approve a different leave type that does not require an attachment that the employee has sent through, then when he goes through the approval process he can see and approve those leave types for that employee that have not had an attachment loaded. In other words, if I send through a leave request to my manager that requires an attachment it should not appear in my manager's universal worklist. It should appear in my worklist stating that I need to add an attachment before it can be approved. At this stage it also does not appear in my manager's universal worklist. So far this is all working correctly. The problem is when I send another leave request that does not require an attachment and my manager clicks on this request in his universal worklist to approve it, my other request (that should not appear in my manager's worklist) now appears and my manager can approve both - so he has now approved the leave request that requires me to add an attachment.
Is there a BADI that can limit what shows in my manager's approval worklist thus avoiding showing the leave type that does not have an attachment. Or is there a better way of handling this?