On K2 five, there is a notion of versioning for workflows, forms and views. Thus it is possible in case of alteration of our wokflow, form or view, to go back to the previous version.
This article will help you understand how to change the version of a wokflow, a form and a view. In case of alteration, you will also see how to return to the previous version.
The consultation and version change of the workflow is done from the management via the Version tab.
Generally speaking, each time the workflow is deployed or updated, we have a new version of this workflow. This new version is automatically defined as the default version and all new instances of the process will use it. But it is possible to define another version of wokflow as the default version, which is often useful when the current version is altered.
The steps below will allow you to set a workflow version as the default version on K2 five.
- On the Process Details page, click on the Versions tab. The different versions of the workflow are displayed, including information such as: when the workflow was modified, who modified it, and information about the instances of the workflow for this version.
2. Select the version you want to set as the default version and click on Set as Default.
3. A confirmation message appears, click on OK
4. The new default version is bold in the list and marked with (Default).
Thus, it should be noted that when you deploy a new version of the workflow, the deployed version automatically becomes the default version, even if you have defined a different version as the default version. You will need to reset the default version of the workflow after deploying a new version to change the version again.
Versioning of forms and views
Versioning of Forms
From K2 designer, you can directly see the version of a form. Each time a Check in is performed, the form automatically switches to a new version.
Since each version of the form is saved in the database in the Form.auditLog table, a previous version is restored from the database. By following the steps below, you could easily return an earlier version of a form.
- From the K2 database, find the name and ID of your form in the table Form.Form if the form is check in et Form.Form_Design if the form is check out.
2. In Form.AuditLog table, filter the information and get the versions that relate only to what you need using the following SQL query:
The specific form can be identified using the record ID and XML fields. The XML field contains the corresponding IDs (represented by a GUID) of the form indicated in pink. Open the XML file to view the view or ID and form name as shown below.
3. Run the statement below on the Form.auditLog table of the K2HostServer SQL database, changing the ID with the corresponding record ID as shown in the image above in the ID field. Then replace the domain and user name with the correct values. The username should preferably be the person who created the form.
Versioning of views
The view steps are identical to those of the forms. Easy no 🙂 !
We are thus coming to the end of this article, I hope it has helped you.
If you have any questions, do not hesitate to leave a comment.
Reference : help.K2
See you soon at 🙂!!!!!