cancel
Showing results for 
Search instead for 
Did you mean: 

How to delete duplicate work items in workflow

Former Member
0 Kudos

Hi All,

I have developed a workflow for reservation. It has 4 approvers. The workflow is working OK,only one issue arises.I created an event that triggers when reservation is created.If lets say Approver1 approves the work item it goes to Approver 2. and then to Approver 3 ..till the last Approver.

In case any user wants to edit the reservation lets say by increasing quantity or adding new item ,the workflow re-triggers again and the approval process starts afresh from the beginning with Approver 1.

I am now having duplicate work items,from the previous and the new workflow.Is there a way to delete/block  the previous item when the workflow re-triggers so that I can have only the new work item?

Regards

Jack

0 Kudos

Hi Jack,

can you please send me in details how you maintained the approval notification one after the other:
"I created an event that triggers when reservation is created.If lets say Approver1 approves the work item it goes to Approver 2. and then to Approver 3 ..till the last Approver."

I don´t know how to give the next approval the notification to release the "in my case" the contract.

Thank you

Accepted Solutions (1)

Accepted Solutions (1)

josef_graf
Explorer
0 Kudos

Hey Jack,

you can use the event, that triggers the (new) workflow to cancel the old workflow.

In the Workflow Builder Select "Goto->Basic Data". Then choose Tab "Version-Dependent" and "Events".

Here you can enter the Event just like you used it to start your workflow. Choose Receiver Type "Cancel Workflow". When the event is risen, the currently running WF and all subsequent Workitems are cancelled.

Regards

Joe

Former Member
0 Kudos

Thanks Josef Graf it is working

Answers (1)

Answers (1)

JonathanM
Contributor
0 Kudos

Hi,

You can try to use the function module "SWW_WI_DELETE" to delete the workitem but then it would be lost. You can also cancel it via "SWW_WI_ADMIN_CANCEL".

This should be done from the call to your new workflow/workitem.

For this you'll need to find back the workitem ID of the open workflow...

Best regards,

Jonathan