Skip to main content

Is there a way to export the process definition in a plain text (XML, JSON, etc) file so we can check it into a SCM system and do "diffs" between versions to see what changes were made?

 

I reached out to K2 Support but there is no out-of-the-box way to do this, checking to see if someone in the community has implemented it.

 

Thanks

Hi VA1


 


You can try the following:


Using K2 Management go to the Workflow you want to export.


On the Versions tab, select a Version and click the Download Button


This will give you a self extracting zip file.  - [workflowname].exe


Extract the files and open the [workflowname].kprx  in notepad. - This will be the workflow XML


You might have to fix the formatting to make it easier to read.


 


Just keep in mind that a K2 Five Workflow cannot be edited/deployed outside of K2 Designer. The download option is more for Legacy workflows that can still be edited in K2 Studio/Visual Studio.


 


*Edit: Fixed incorrect info :)


Cheers,


T


Yes, we have tried this but the problem is that the KPRX XML has a ton of noise with GUIDs, positional differences and such so when we compare 2 versions side by side, it makes it very difficult to determine what the real differences are as a result of our code/logic changes.

 

https://en.wikipedia.org/wiki/Business_Process_Model_and_Notation 

 

Surprisingly, none of the BPM engines, including K2, appear to support the BPM notation to represent the business process, separate from the technical implementation details. Besides the obvious benefit of making the process definitions portable across workflow platforms (clearly no vendor has any incentive to support this and make it easy to switch!), it would also help a lot with migrating our processes from K2 (4.7) For Visual Studio into the new K2 5.1 designer. Currently, we are facing the daunting task of re-writing all our 4.7 processes from scratch in 5.1.


Hi VA1,

I'm not sure if this will help, but there are steps in this KB that cover how to export the process definition as JSON:

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

You can use a JSON viewer like the one linked in the KB to format the text, which might make it easier to compare difference between processes.

Reply