Workflow runs twice
I came across an issue with a Visual Studio declarative workflow running twice on a library and I have configured the workflow to run on change event.
Initially I thought there might be an issue with VS workflow, and then I have created a SharePoint designer workflow but the issue remains same. I was clueless. I have one more workflow, that is also running on change for another library and there were no issues with that. Then I tried to compare both libraries and found that versioning is enabled on problematic library and no versioning enabled for other library. If I disable versioning, the workflow runs only once. That's strange. I am completely clueless what's happening internally. What my guess is that the workflow running on item check-in event and item updated event. After doing lot of research, finally I found a workaround that worked very well for me.
At the end of the workflow I have paused the workflow for 1 minute. Surprisingly, it has resolved my problem.
Initially I thought there might be an issue with VS workflow, and then I have created a SharePoint designer workflow but the issue remains same. I was clueless. I have one more workflow, that is also running on change for another library and there were no issues with that. Then I tried to compare both libraries and found that versioning is enabled on problematic library and no versioning enabled for other library. If I disable versioning, the workflow runs only once. That's strange. I am completely clueless what's happening internally. What my guess is that the workflow running on item check-in event and item updated event. After doing lot of research, finally I found a workaround that worked very well for me.
At the end of the workflow I have paused the workflow for 1 minute. Surprisingly, it has resolved my problem.
Comments
Post a Comment