0

I'm trying to setup an approval workflow for new and edited items in Document Library.

I created an approval workflow that is set to start when a new item is created and when an item is edited. The workflow updates the approval status on completion.

Now when I create a new item or edit an existing item the workflow kicks off as expected. However when I approve the workflow the workflow completes and then starts a new workflow. It would seem that updating the approval status is causing the workflow to activate again.

Is there any workaround to stop this looping?

2
  • You set which users approve the item? Commented Jul 14, 2015 at 19:37
  • It is still in the development process, so I am approving it as I am site owner. Commented Jul 14, 2015 at 19:40

1 Answer 1

0

This is the default behavior for SharePoint workflows because of the synchronous events which will be triggering in the back end. so as a workaround you need to have an conditional check on some hidden fields such as "flags" so it doesn't interrupt your actual requirement though it triggers another workflow event.

say : if you set the flag to 1 on completion. keep the initial condition to start the workflow only when the flag is 0 along with other conditions. this would resolve your problem.

1
  • Could you please elaborate on this? And if we are updating the flag value, won't it consider as a change? Because on completion of the workflow, I am updating the drop-down column value (that has the workflow status) which is instantiating the workflow again. Commented Jul 14, 2015 at 21:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.