Condition on Terminating event for a user only
I have a Terminating Events ( ZApprove/ZReject) in one of the asynchronous task and have this in a loop for 3 level approval.
The approver can programatically run the SAP_WAPI_EVENT_CREATE to give his decision externally thorugh the frontend by triggering the Z events
Then the workitem is moved to the second approver and so on.
Problem is , How can I put some additional condition on the terminating event so that it should check whether the user has the workitem before triggering the termaniating event.
Why I want to do is because when the same user triggers the event twice then this actually completes the second workitem created in the loop in addition to the first workitem.
Ex) First approver triggers the event twice by mistake
Terminating event just looks for the object key to complete the workitem.
Hope I was clear.