Skip to Content

How to complete sub workflow within main workflow or event?

Hi guys,

I have a workflow with a fork which has three lines. two lines are normal however the third one is calls a sub workflow. My condition is that complete all three and proceed or one container ie URGENT = X then proceed.

The issue is that when container URGENT = X the workflow still waits on the line for the sub workflow. This is because the sub-workflow is not completed but in this case i want to complete it automatically so that i can proceed.

How can I do this? I have tried to raise an event but its now working, is there any other way? may be i am raising the event in the wrong way, whats the correct way of raising an even to complete a sub workflow?

Your help will be greatly appreciated.

Thanks,

Andy

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    Posted on Dec 10, 2014 at 09:40 AM

    Andy Smith wrote:

    I have tried to raise an event but its now working,

    I would focus on this issue.

    If you want to control parallel processes where one thing (read event) can end all of those processes then you have to use create event steps and wait for event steps.

    For the above you create a 1:2 fork in one branch you wait for an event and in the other you put your X:Y fork. This is the best and most flexible way of modeling business process with SAP Workflow.

    If, as you say, it is not working then find out why and fix it.

    Kind regards, Rob Dielemans

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 09, 2014 at 09:55 PM

    There should be an option to add a condition to end the fork (below the 3 out of 3 in the ending of the fork), have you used this option and the sub-workflow is not logically deleted?

    You can also try a process control (if one of the branches sets the urgent option) to terminate the sub-workflow, but I think that the condition should work by itself.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Dimtri Svenssson

      Hi Andy,

      You can achieve this by these ways.

      1. Event : You can raise a event on URGENT = X , and put the same in TERMINATION conidition of your subworkflow. Go to header data of subworkflow , you will find there "Start Event" and "terminate events"

      2. YOu can use process control and choose there "Terminate current workitem/node" exactly when URGENT = X happend.

      Please try and let us know if it solved your problem.

      Thanks

      Rakesh

  • author's profile photo Former Member
    Former Member
    Posted on Dec 10, 2014 at 03:00 AM

    Hi,

    You could put another fork before the current one with 3 branches. Move the current fork into the other branch of the new fork. Now you should have one empty branch and one with the current fork. Now put your condition to the empty branch (=wait for condition type of step). Once the condition gets fulfilled, the workflow should continue (given that you have set the necessary branched to '01' for the new fork).

    If you have a way to create an event, you could replace the wait for condition step with wait for event step. I personally prefer events.

    One thing: Do you have all the necessary background jobs running for workflow. Check this from SWU3. There is a job that checks the conditions for every 3 minutes or so, and if it this job is not running, no condition checks will work (even my solution will not work - it might even be that your current solution is correct, but due to the missing background job it is not working).

    Regards,

    Karri

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 10, 2014 at 07:28 AM

    You mention that you raised the event but its not working.. Any luck checking the event trace. What are your findings there ?

    Who is responding to the event .. if no one is receiving your event then certainly there must be some glitch in the way you are handling that event in your sub workflow.

    I might try setting the sub workflow to obsolete when the event occurs.

    Also just as a reminder : you need to commit after raising event. Hope you are doing that. 😭

    --

    Linkin

    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.