After editing your workflow start rule to use a different SharePoint event receiver and then deploying a package of the solution to your target environment, you notice the change did not update as expected. Instead of overwriting the start rule with the updated SharePoint event receiver, both SharePoint event receivers show in the configured start rule. Deploying an updated workflow does not remove the previously configured SharePoint event receiver from the workflow Start Event.
In this scenario, you integrate a SharePoint list (called Supplier Details) with K2 for SharePoint to start a workflow when you add an item to the list. This adds the When an item was added SharePoint event receiver to the workflow Start Events section on the Start step.
You create a package of the solution on your source environment, and deploy it to your target environment.
At a later stage, you change the way the workflow should start and edit the workflow on your source environment. It should start when you update an item on the Supplier Details list. You edit the Start Events on the workflow Start step and select the An item was updated SharePoint event receiver.
You create a package of the updated solution on your source environment, and deploy it to your target environment.
On the target environment, you notice that both the SharePoint event receivers show as the workflow start event. This means the workflow starts when you update or add an item to the list, but in the updated workflow you want the workflow to start when you update a list item, not when you add one.
To work around this issue, you need to edit the workflow in the target environment and manually remove the unwanted SharePoint event receiver from the Start Events on the workflow Start step. After removing the event, you need to redeploy the workflow.
- From the SharePoint artefacts list, select and edit the workflow.
- Select the Start step and click Edit to access the Start Events configuration wizard.
- On the Start Workflow from a List/Library screen of the wizard, uncheck the An item was added check box. Click Next and Save and Finish to complete the wizard.
- The When an item was updated SharePoint event receiver now starts the workflow.
- Click File and Deploy to deploy the changes to your workflow on the target environment.