Skip to Content
author's profile photo Former Member
Former Member

Restart workflow at parent level

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 03, 2014 at 04:01 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 02, 2014 at 05:16 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

  • Posted on Jan 03, 2014 at 03:42 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 03, 2014 at 05:15 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.