none
Can you use a workflow to terminate another workflow RRS feed

  • Question

  • I want to know if I can terminate a workflow using a different SPD workflow?

    I have a custom list with several workflows running on it. These workflows assign task using the "Collect Data" or "To Do" action. There are a few instances where a list item needs to be deleted/removed from the custom list, before all the running workflows have completed and there could active (uncompleted) associated tasks.

    If I just delete the item there will be orphaned tasks. Currently I go into each list item's Workflow page and terminate all running workflows manually. I would like to setup a workflow that could terminate all workflows (which will auto clean-up all associated tasks), and then delete the item from the list.

    I haven't been able to confirm or figure out if I can properly terminate a SPD workflow using another workflow.


    Stunpals - Disclaimer: This posting is provided "AS IS" with no warranties.

    Wednesday, June 19, 2013 11:02 PM

Answers

  • I don't think you can have one workflow clean up unfinished tasks either as a SharePoint Designer workflow cannot work in a state machine.

    You could put a ton of logic into it, effectively a try-catch for each step, but you might go insane doing that - I know I did.


    Joe

    • Marked as answer by Emir Liu Thursday, June 27, 2013 2:36 AM
    Monday, June 24, 2013 6:58 PM
  • In SPD, there's no method to terminate another workflow.

    Planet Technologies || SharePoint Task Force

    • Marked as answer by Emir Liu Thursday, June 27, 2013 2:36 AM
    Thursday, June 20, 2013 2:29 AM

All replies

  • In SPD, there's no method to terminate another workflow.

    Planet Technologies || SharePoint Task Force

    • Marked as answer by Emir Liu Thursday, June 27, 2013 2:36 AM
    Thursday, June 20, 2013 2:29 AM
  • Thanks Roland for the clarification.

    I guess my next question is, can a SPD workflow perform a terminate on itself? I know I can write a parallel to monitor and Stop the workflow but I trying to find a way for all associated tasks to be cleaned up/removed as well.

    Or is the only way to do this via Visual Studio?


    Stunpals - Disclaimer: This posting is provided "AS IS" with no warranties.

    Monday, June 24, 2013 6:14 PM
  • I don't think you can have one workflow clean up unfinished tasks either as a SharePoint Designer workflow cannot work in a state machine.

    You could put a ton of logic into it, effectively a try-catch for each step, but you might go insane doing that - I know I did.


    Joe

    • Marked as answer by Emir Liu Thursday, June 27, 2013 2:36 AM
    Monday, June 24, 2013 6:58 PM