3

In SharePoint 2013, I have developed a custom ribbon action that is associated to a Content Type, which is in turn also associated to a workflow. The exact same URL is built up under the ribbon action as would have been triggering from the workflow ribbon action. I gather List (GUID), ID, ItemGuid, and TemplateID. For Template ID (which is really WorkflowAssociationID), I use the REST API, such as:

/_api/web/lists('6bcf19e6-ae0c-40c1-994a-dbaf0a3f7ce2')/items(57)?$select=Id,GUID,ContentTypeId,ContentType/Name,ContentType/WorkflowAssociations/Id,ContentType/WorkflowAssociations/Name&$expand=ContentType,ContentType/WorkflowAssociations

...to get this by its Name. It's name being "My Workflow", not "My Workflow (Previous Version:26/05/2016 1:43:56 PM)".

The problem I'm facing is when the workflow runs, it is running a previous version of the workflow, such as "My Workflow (Previous Version:26/05/2016 1:43:56 PM)", when I would have expected it to run "My Workflow", which is the latest version.

If I happen to do this twice, which would mean I visit the /Sites/mySite/_layouts/15/Workflow.aspx?ID=20&List={6BCF19E6-AE0C-40C1-994A-DBAF0A3F7CE2}&Source=blah ..page, then it will pick up the correct workflow and runs it. Without me visiting this page before it does not know which is the latest version of the workflow.

Has anyone experienced this?

Cheers.

  • I have experienced that with two separate customers. Both have a migrated environment and it seems to be related to nintex workflows that are migrated from earlier versions. I googled the problems and found some separate temporary solutions, but I ended up just removing the "previous version" workflows. Quick and dirty! But, I'd say that this doesn't have to do with you developing a custom ribbon. – Jenny Fergéus Jun 1 '16 at 9:04
  • I had the similar problem few months back, unfortunately, I had to resolve the issue by deleting the previous versions of workflow. – Vikas Sharma Jun 22 '16 at 10:47
0

Is there an existing instance of that workflow running, which you need to terminate first? If so, terminate all running instances.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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