Known Issue: Deploying an updated workflow does not remove previously deployed SharePoint event receivers

  • 16 February 2021
  • 0 replies
  • 7 views

Badge +6
 

Known Issue: Deploying an updated workflow does not remove previously deployed SharePoint event receivers

KB003246

PRODUCT
K2 Cloud
K2 Five

 

Issue

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.

 

 

Recreation steps

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.
Image

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.
Image

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.
Image

Workaround

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.

  1. From the SharePoint artefacts list, select and edit the workflow.
    Image
  2. Select the Start step and click Edit to access the Start Events configuration wizard.
    Image
  3. 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.
    Image
  4. The When an item was updated SharePoint event receiver now starts the workflow.
    Image
  5. Click File and Deploy to deploy the changes to your workflow on the target environment.
    Image

 


0 replies

Be the first to reply!

Reply