none
How to Stop a Running SharePoint Designer 2010 Workflow If a Defined Key Element Changes

    Question

  • Hello, I'm using the SPD 2010 workflow engine in a SP 2013 site. I have used SPD workflows for years, but never found out how/if one can "stop" a running workflow based on a material change to the triggering list item.

    Example: I have a payroll entry due date Calendar (list), and it runs a workflow that generates a reminder email at the end of each pay cycle, then terminates. However, sometimes HR will change when they want the payroll to be entered, and hence the Calendar item has a new date (often earlier). However, as my WF has "pause until" the old due date, and that hasn't happened, I can't get a revised entry date to CANCEL the prior workflow and RESTART it. It won't do anything until that "pause until" has expired....too little too late.

    My workaround is simply to manually "stop the workflow" on that item, then edit the date, which then restarts it and it reminds at the appropriate date. I could keep doing this forever, but would love NOT to if you catch my drift. I'd like HR to update the entry, and leave me out of it (they don't use SPD....yet).

    I have researched stopping/starting workflows, but so far can't find anyone who has posted this problem and/or a solution.

    ~Timothy

    P.S. Even more fun is when HR wants to change the email. I have to stop ALL workflows, adjust the email details, then restart for each item, since SP will always use the old WF email on running items. I don't expect to ever get out of that workaround. At least we only have 24 due dates/emails--can't imagine what hundred or thousands of entries would do to my sanity.

    Thursday, April 20, 2017 8:34 PM

Answers

  • After I understand your business cases I would want to give a thought if that works for you.

    1# Issue with pause dates

    Instead pause until date can we loop every day and check your payroll date matches and send notification.

    2# Issue with emails

    Instead of hard coding emails in workflow maintain a SharePoint list for your email configurations and pull the To address, CC address, subject and body from that list and use these variables in your workflow mail template.

    Let me know if I am understanding wrong or need additional help on this.

    Thursday, April 20, 2017 10:39 PM

All replies

  • After I understand your business cases I would want to give a thought if that works for you.

    1# Issue with pause dates

    Instead pause until date can we loop every day and check your payroll date matches and send notification.

    2# Issue with emails

    Instead of hard coding emails in workflow maintain a SharePoint list for your email configurations and pull the To address, CC address, subject and body from that list and use these variables in your workflow mail template.

    Let me know if I am understanding wrong or need additional help on this.

    Thursday, April 20, 2017 10:39 PM
  • Hi Timothy- you can't. It must be done manually and there is no workaround.

    cameron rautmann

    Friday, April 21, 2017 1:45 PM
  • Thanks, Konjeti, the loop idea sounds plausible (I'll need to investigate how, and I think it's easier on SPD 2013 workflows, which we don't have configured).

    As for the email details, I'll investigate this option as well.

    I certainly know that my current "pause until" has design limitations which the above should avoid.


    Timothy F SharePoint Site Administrator

    Friday, April 21, 2017 4:17 PM