2

We've got a new Server Infrastructure, on which we created a new Windows Server 2016 running SP 2013 and migrated our databases from the old SP 2013 server to the new.

In the process, we have a SP 2013 Workflow that failed to work, so I've exported it from the old server. Then in the SPD 2013 (on the new server), I've removed the old WF and imported it again through Visio, then published without problems. Because this is a SP 2013 WF, we have a Workflow Manager (v1.0) running on both the old and the new server.

However, there is still a 'Deleted association' running on the list, which is the deleted version of the workflow. In the database of the WF manager, I can see 2 active Workflows: enter image description here The first one, created on 06/12/2017 is the old version, the 'Deleted association', which I've found by querying the database for the instance ID that this deleted association gives in the URL when trying to see the details. The details page gives the error:

enter image description here

I’ve tried running some Powershell commands on the list to see the WorkflowAssociations and listing the workflows from the Workflow Manager to find this old one, but I can’t find it anywhere.

The problem is, this 'Deleted association' runs after the current WF, so it overrrides all the fields the current WF updates.

How can I remove this 'Deleted association'?

2
  • Did you find a solution? I have the same issue...
    – AymKdn
    Commented Mar 1, 2018 at 14:48
  • 1
    Sadly I don’t, our service partner that installed our new version said it should Not give any problems and I’m going to remake The workflow in my own framework in a standalone angular application Commented Mar 1, 2018 at 19:03

1 Answer 1

0

you can try to remove ALL associated workflow in your list and associate the new workflow again , you can try the below power-shell script

    $SPSite = Get-SPSite "http://siteurl" 
    $Web = $SPSite.OpenWeb();
    $SPList  =$Web.Lists["MyList"];
    $workflowAssociations = $SPList.WorkflowAssociations;
    if($workflowAssociations  -ne $null)
    {

       foreach($wf in $workflowAssociations)
       {
          $SPList.RemoveWorkflowAssociation($wf);
          $SPList.Update();
       }
    }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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