SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Does anyone have an idea how to stop custom approval workflow from running when a list item's ModerationInformation.Status is changed? I have a custom approval workflow that I wrote using Visual Studio. It is associated with a list and is triggered when any item in this list is changed. My problem is that when workflow fails (for whatever reason) and user with administrator rights then manually approves the change (not through the workflow), workflow is started again. Can someone suggest a way to stop it from doing so? Or am I doing something wrong?

share|improve this question
up vote 0 down vote accepted

Get the approval status early in the execution (during onworkflowactivated), the workflow only need to be executed fully if the target item Approval Status is still pending. Then right below the onworkflowactivated activity drag drop an if-else activity to check the Approval Status value. If it still pending then execute the rest of the workflow and if it is not pending, terminate the workflow. You can refer here for more details. Hope this helps

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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