This article was created in response to a support issue logged with K2. The content may include typographical errors and may be revised at any time without notice. This article is not considered official documentation for K2 software and is provided "as is" with no warranties.
This article shows you how to revert the design back to one of the previously deployed versions of the workflow.
Before You Begin
In this scenario:
You have a workflow that you deployed a few times and due to requirements changing or another issue, you want to revert the design back to one of the previously deployed versions.
It's also important to know how versioning works:
In the above example, 3 is the latest deployed version and 1 is the minor version currently in saved state and not yet deployed. Should you deploy this current Designtime copy, the version will increase to 18.104.22.168
There will be 2 separate workflows in the category:
- Deployed version (Runtime ready Version)
- DesignTime version (Current design time copy containing the changes from last deployed version)
In this article we have deployed the workflow and are currently on Version 3, but we want to revert the Runtime and Designtime version back to Version 1.
Steps to change runtime version
1) Navigate to K2 Management > WorkFlow Server > Workflow > YOUR WORKFLOW
2) In Process Details open the Versions Tab and set Version 1 as Default:
Now all new instances will run against Version 1.
Steps to change Designtime Version
The following steps are a workaround that allows you to roll back the design time version of your workflow to a specific deployed version. Comprehensive version management features for all K2 artifacts are on the horizon to make this process much more seamless in the future.
1. Set the desired version as default. Refer to the first section above.
2. Delete all previous versions, up to the desired one you want to continue designing from. In this sample I deleted all except the Default:
3. Navigate to K2 Designer and note the designer version is still 22.214.171.124:
4. Use the Delete button to delete the workflow:
5. Note that the Workflow disappears from the tree and then re-populates with the only version available, Version 1. The icon also changes:
6. Click on Edit and you will see version 1 of the workflow in designer to continue development.