Switch the Workflow version for running workflows

  • 27 November 2019
  • 7 replies
  • 63 views

Hello,

 

I want to "move" several running workflows to the "latest" version. I was searching for it and found these tools:

https://community.k2.com/t5/General-K2-Utilities/K2-Management-Shell

 

but the cmdlet "Get-K2ProcessInstance" for getting the process instances gives me an authorization error:


K2 Management Shell Error: 'ClientException: 28018 K2:DOMAINUSER does not have permissions to open the process
at SourceCode.Workflow.Client.InternalConnection.Call(ArchiveX ar, MessageType msgtype)
at SourceCode.Workflow.Client.Connection.OpenProcessInstance(Int32 ID)
at K2ManagementShell.GetK2ProcessInstance.ProcessRecord()'

 

What authority am I missing?

In fact none of our Users can do this. Even the K2 Admin and Service Users... strange, isn't it?

 

How can it be done (easy and safe???)

 

regards,

Johann


7 replies

Badge +9

Hi JSC


 


Navigate to the attached link below that contains similar issue and see how they manage to resolved this identical issue.


https://help.k2.com/support-services/kbt131899


 


https://help.k2.com/kb001954


 


https://community.k2.com/t5/K2-blackpearl-Articles/Permission-Error-28018/ta-p/78758?device-view=desktop


 


https://community.k2.com/t5/Archived-Articles/Error-28018-user-does-not-have-permissions-to-open-the-process/ta-p/84227


 


https://community.k2.com/t5/K2-blackpearl-Articles/Event-ID-64007/ta-p/81462


 


https://community.k2.com/t5/K2-blackpearl-Articles/Does-not-have-permissions-to-open-the-process-error/ta-p/78711


 


Regards


Elvis

Thanks for your links but all or at least most of them refer to a K2 Version below 5.3 and we are running 5.3 with FP7 so I assume that these problems should not apply for us, should they?
Only the last links seems to be possible but there is no detailed description for the solution...
How can I found out if there are orphaned processes or if there are wron URLs for the group providers?
regards,
Johann
Please notice also: I want to know a possibility to "move" a running process instace from Workflow version 4 to version 5 (or similar)...
Badge +7

Moving Existing Instances Into New Workflow Version:

 

https://community.k2.com/t5/K2-Blackpearl-Forum-Posts/Moving-Existing-Instances-Into-New-Workflow-Version/td-p/97196

Hi  @JSC ;


 


I recomment you to dive in this external doc perhaps you would get helped(http://flowfactory.fr/blog/en/2019/09/17/versioning-on-k2-five/) on steps to version the workflow.


 


Addtionally:-https://community.k2.com/t5/K2-Five/how-to-go-back-to-the-previous-workflow-version-in-designer/td-p/103674


 


There's also K2 official demo for which I believe it will be helpful(https://help.k2.com/displaycontent.aspx?id=6244)


 


I hope your query got addressed and solved!


 


Kind Regards;


Widson.

2 needs that Workflow versions und Forms and Views Versions are kept...

 

We have a problem where the forms and Views are updated but the running workflow remains the same version. Now a rule in a form wants to fill a field on a workflow during a task commitment but it cannot do this because the field is not there in this version of the workflow...

 

I tried to move the running workflow to the latest version but it somehow failed and the process instance stopped... :-(

 

Now I changed the form to make a workaround...

 

What is the recommended way? If a process is changed and the forms and views have to change too - there is no good way to deploy it into the productive system...

The only chance is to end all running workflows and then deploy it. But for some processes it is nor really possible (worldwide usage and every time at least 50 running processes - literally no time slot where all processes are done...)

Badge +9

HI JSC


 


Considerations when setting the default version of a workflow


Keep in mind the following items when setting a default version:



  • Existing workflow instances are not affected when you change the default version of a workflow, only new instances of the workflow started after the applied change are affected.

  • When you deploy a new version of the workflow, the deployed version automatically becomes the default version, even if you set a different version as the default . You may need to reset the default version of the workflow after deploying a new version, depending on your intention.

  • K2 does not automatically switch active instances of the process to the latest version


  • Since SmartObjects and SmartForms always use the latest deployed version, modifying the default version of a workflow could cause errors and unexpected behavior if there are newer versions of SmartObjects, views, and forms referenced by the workflow. Since it is unpredictable how you are using SmartObjects, views, and forms in your workflows, it is impossible to provide specific guidance other than to be aware of this potential impact when setting a default version. Where possible, K2 recommends you allow existing instances of the workflow to complete before making changes to the default version of a workflow, especially when they also require updates to the SmartObjects, views, or forms used in the workflow.




Ref: https://help.k2.com/onlinehelp/K2Cloud/UserGuide/Update_10/default.htm#K2-Management-Site/Workflow_Server/Versions.htm#Setting


 


Regards


Elvis

Reply