Freitag, 2. August 2013

Allow multiple of Workflowsubscription on same ListItem

This applies to the new Workflow 2013 Engine:

By default Sharepoint doesn´t allow to have multiple Instances of a Workflow running on the same ListItem.

This gave me headache because I had a Workflow to start when an Item is updated. However, if the Workflow got updated again before the Workflow of the last Update ended, I was not able to start the Workflow again. Even if I canceled the former Workflow it wasn´t possible, because sometimes the cancellation process lasts some seconds and I weren´t able to start a new Workflow, even if the former was in cancelling state. In the End I had no workflow running at all.

However, there is a solution:

If you deploy the Workflow subscription by declarative XML using Visual Studio, you should have somewhere the File "WorkflowStartAssocioation" in the elements.xml of your workflow. If you attach the property:


<Property Name="ManualStartBypassesActivationLimit" Value="1" />

you should be able to start the workflow again (as long as you start the workflow manually by Hand or by Code using EventReceiver).

This works also, if create the Subscription by Code using the SubscriptionService or even update an existing Subscription. There is a Property "ManualStartBypassesActivationLimit" in the Subscription-Object which you can set to true.



Keine Kommentare:

Kommentar veröffentlichen