Skip to Content
0

Restart workflow when approver edits the shopping cart

Mar 01, 2017 at 02:52 PM

219

avatar image

Hello Guys,

Request your suggestions with below requirement:

Requirement: N-Level approval process in place for Shopping Cart. If a approver edits the shopping cart which is assigned to him for approval, then approval process should start from the first person in the approval process.

Current Solution: Implemented BADI /SAPSRM/BD_WF_PROCESS_RESTART and write code in Validate_Restart menthod. If document is changed then set ev_restart = 'X'.

Issue with the approach: Workflow is getting restarted and it is going to first approver but the previous approval workflow is not completed. Suppose if first approver edits and save SC, then he need to approve it twice to complete the workitem.


Request you to provide a solution so that on workflow restart previous worflow instance should get completed.

Regards,

Nitish

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Pavan Bhamidipati Mar 30, 2017 at 08:42 AM
0

Hi Nitish,

The reason behind why the approve has to approve twice to complete the flow is because whenever we restart the workflow there is always a new instance i.e new work item ID. My Idea would be to make sure to cancel the old work item when approver edits the SC since in the badi already you have implemented Restart logic this idea makes the old workitem disappear from the users inbox and the new workitem again appears in the approvers inbox.

Thanks,Pavan

Show 1 Share
10 |10000 characters needed characters left characters exceeded

I agree one of the possible solution is to cancel the existing work item. But doesn't it should automatically happen when a new workflow instance is restarted inside the BADI ? or through some config for workflow restart... why shouls one wants a dangling workitem when he is restarting the workflow ?

0
Pavan Bhamidipati Apr 26, 2017 at 07:24 AM
0

Hi

But doesn't it should automatically happen when a new workflow instance is restarted inside the BADI ? or through some config for workflow restart... why shouls one wants a dangling workitem when he is restarting the workflow 

The Answer is simple they are two different workitems , they are not dependent on each other, the workflow instances are different.

Thanks, Pavan

Share
10 |10000 characters needed characters left characters exceeded