Question

Restart All Workflows after a K2 Version upgrade to 5.4

  • 10 January 2024
  • 4 replies
  • 36 views

Badge +1

 

After upgrading to version 5.4, there is a need to restart over 500 workflows in K2. Apart from the manual process of doing them one at a time is there any better way of doing it. Is it possible to create a tool for automating this task?


4 replies

Userlevel 5
Badge +13

It would be possible to utilize the K2 API to loop through all workflow instances and do a “GOTO Activity → Start” on each one. Would that work or does each workflow have a different idea of what “restart” means?

Userlevel 5
Badge +20

Hi @rahulchaturvedi 
Did this response help answer your question? 

Badge +1

Certainly, my goal is to execute a "GOTO Activity → Start" on every workflow instance. How can I iterate through all workflow instances, and which APIs can I use—SmartObject OData API or Workflow REST API?

Userlevel 3
Badge +10

If using Odata, you may have to create a SmartObject that surfaces the ‘GotoActivity’ method, this is located at [K2 Management service type > K2 Management service instance > Workflow > Management > ManagementService]

 

Workflow REST API does not surface this GotoActivity method.

 

Alternatively, you can use some of the K2 assemblies/dlls:

https://help.nintex.com/en-US/k2five/devref/5.4/Content/Runtime/WF-Manage/LIM.html

https://help.nintex.com/en-US/k2five/devref/5.4/Content/Runtime/WF-Manage/LIM-Manage.html

https://help.nintex.com/en-US/k2five/devref/5.4/Content/Runtime/WF-Manage/LIM-Ko.html

https://help.nintex.com/en-US/k2five/devref/5.4/Content/Runtime/WF-Manage/LIM-Client.html

 

If applicable, you can also migrate process version/gotoactivity with:

 

Reply