How to make a SharePoint 2010 Workflow call itself

In SharePoint Designer 2010 we don't have loops. So to have the workflow call itself I created another dummy workflow and used UPDATE Fieldname to switch between workflows. Is there a way to re-execute the workflow without having it to call from outside.

Thanks!

Mayank

December 22nd, 2014 7:07pm

easy answer: no.

long answer: you need TWO workflows, one with the actual logic, and another to trigger the first to restart. You also need at least two additional columns in the list, one for the "current state", and one for the "next state". When the first workflow finishes, it sets the "next state" to something that can be identified in the next run (this NEEDS to be the LAST step). The second workflow checks whether "current state = next state", and if not, updates "current state = next state". this change can then restart the first workflow.

it's basically recreating state machine... and the workflow history isn't pretty... but it technically can work (and while I would generally recommend third party products like Nintex/K2 instead, if the only choice is between this approach and visual studio workflow, I would argue that this is better)

Free Windows Admin Tool Kit Click here and download it now
December 22nd, 2014 7:26pm

Greetings Scott. Thanks for your feedback. Only yesterday I figured out that a workflow can call itself.

I created a Reminder Workflow that fires everyday at 5 AM. The workflow setting is set to "Start workflow automatically when an item is changed."

Initially, I had two Reminder Workflows. So one was there so that it can call the the second one.

I now only have ONE workflow. There are some Update Field statements that invoke the workflow. As long as the workflow sees the Update Field statement it will fire again. So now my Reminder Workflow gets fired every day at 5 AM when it hits the update statement.

Mayank

December 23rd, 2014 8:18pm

Though this has been answered, but my choice would be K2 blackpearl which is not just a workflow but a complete bpm tool.
Free Windows Admin Tool Kit Click here and download it now
April 10th, 2015 8:10am

I would agree with the above. If you dont have a choice do to budget concerns then two workflows would be your best bet. If you can get a third party application I find K2 to be very robust and can do a number of things that Nintex does not currently. The most noteworthy is the ability to run independent of SharePoint. 
April 10th, 2015 10:40am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics