Skip to Content
Author's profile photo Mithun Shetty

Cancelling a Work item / User Decision Step based on an Event Using “Wait for Event Step”

Prerequisites: Basic Knowledge on Workflow

Summary: In this scenario we use a workflow step when an inbound delivery is created . The workflow is routed to a Buyer who can approve or reject the request.

If the Workflow is approved a PGR is created .

We encountered a case where the PGR could also be done manually before the Workflow approval.In such cases the User Decision Step which was waiting for buyer to approve should be cancelled.

Process:

Create a fork with one branch having the User Decision Step and its subsequent steps.

/wp-content/uploads/2014/04/1_432702.png

In the other branch

Create “Wait for Event “Step with the Event which should be caught by the Object. In this scenario we are capturing the Event when a PGR is done for a Inbound Delivery.

/wp-content/uploads/2014/04/2_432703.png

We use a process control step once the event is triggered and the Workitem in the user’s inbox gets cancelled and will not show up in the inbox/UWL.

/wp-content/uploads/2014/04/3_432713.png

The Workflow Template is as shown below:

/wp-content/uploads/2014/04/4_432714.png

Testing the Process:

Create a inbound delivery which will trigger a approval to the Buyer. The Workitem can be seen in the Buyer’s inbox.

Goto Transaction VL32N and Press Post Goods Reciept to create a Goods Movement.

Check the Buyer’s inbox after fews seconds . The Approval Workitem would have disappeared from the Inbox / UWL.

Assigned Tags

      3 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Hi,

      In one of our workflow we have various users who have to make a decision. In case a user leaves the company or any other reason the users decision has to be deleted or its work item has to be cancelled but not the Workflow ?

      Possible way to do that ?

      Thanks.

      Author's profile photo Former Member
      Former Member

      i guess use deadline monitoring concept of the task associated.

      Author's profile photo Mithun Shetty
      Mithun Shetty
      Blog Post Author

      Hello Linda,

      In any case there has to be some event which has to triggered to cancel a workitem.

      Check if you can capture Termination Event ( User Leaving the Company as an Event ) then it may be possible to handle such scenario.

      Decisions based on Position will be effective in such case as all the workflows automatically gets transferred to the new user when he takes the position.