cancel
Showing results for 
Search instead for 
Did you mean: 

Restart workflow at parent level

Former Member
0 Kudos

Hi Experts,

I have a particular scenario in which my workflow went into error at a step. But I want to restart the workflow two steps prior to the error step. Can you please suggest what could be done as all the Tcodes I checked restarts the workflow at the current step.

The reason for this being incorrect sub workflow has been triggered. Let's say at step 2 based on container data three different sub workflows can be triggered. And  Now i want it to be restarted at that level so that correct one can be triggered.

Thanks,

Kumar

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Kumar,

Use tcode SWUS_WITH_REFERENCE to re-trigger the workflow.Give parent id in place of workflow and remove your user name and excute.

Hope this helps.

Thanks & regards,

Naresh.K

Former Member
0 Kudos

Thanks a lot everyone!! I will try these options and let you know if anythings works out for me.

Fingers crossed!!

Thanks,

Kumar

former_member185167
Active Contributor
0 Kudos

Hello,

Why did it pick the wrong sub-workflow?

I agree with Prakash - logically delete and re-start the whole workflow. Don't go fooling with workflow internals.

regards

Rick Bakker

Former Member
0 Kudos

HI,

While restarting the workflow using SWPR or SWPC you have to give top most workflow instance number (parent work item number). But it will start the workflow step which is in ERROR only and not the whole workflow. yes, you can not restart workflow from intermediate steps. Instead you can change the container values from workflow log or by using function module SWL_WI_CONTAINER_MANIPULATE .

So change your container element which will properly pick the correct subworkflow path and then restart the workflow.

Hope this helps.

Regards,

Ibrahim

I042439
Employee
Employee
0 Kudos

Hi Kumar

The steps preceeding the error step, once in status COMPLETE, cannot be restarted. The standard code specifically checks for statuses COMPLETED and CANCELLED statuses before re-starting the WIs and throws an error.

Recommended approach is what Prakash has mentioned - yes, the whole approval has to be done again.

However, here is one maveric (and not so recommended) approach which you can try (at your risk 🙂 )

Using FM SAP_WAPI_SET_WORKITEM_STATUS, reset the status of the WI to ERROR (the completed ones) and then using SWIA - restart after error..

Please note that this is not the correct way of handling things and more of an approach of desperation.

Regards,

Modak

Former Member
0 Kudos

Whether your issue will get solved by restarting the workflow ? Logically Delete the error workflow and re-trigger the workflow with same KEY using T-code SWUS(If you have template number)  or SWUE (If you have business object and events).

Cheers,

Prakash

Former Member
0 Kudos

Hi Prakash,

Thanks for the reply. However, if I re-trigger the whole workflow, wouldn't it go through the whole approval process again? What I need to know is if I can re-trigger the workflow from that particular approval loop again, not from the start...

Let me know if you have some pointers.

Thanks,

Kumar