Skip to main content

So I've been testing out some things trying to see how versioning might work (especially in the context of Forms Services).  I created a first version of my form and deployed it.  I then took that form and copied it, modified it, updated my workflow to use it and then deployed it.  That all works great, although I'm not 100% certain that's the right way to do it.  Finally, I tested making minor changes to the second version.  I noticed that it updates all processes that use that version of the template, but the deployment also creates a new version of the process.  At that point, I'm okay with all instances of that version of the template being updated, but since I didn't update the workflow, I'm not so sure I like the fact that it creates a new version of the workflow.  Is there any way around this?  Should I care?

Ok - let me see if I can answer this correctly.  Now you will need to have a little bit of an understanding of how InfoPath handles its versioning.  From what I remember InfoPath will try to always work with old versions of the XML.  So lets say you have version 1 with fields (A, B, C).  Then you have version 2 with fields (A, B, C, D).  If the user were to open version 1 xml with the latest InfoPath Form Template (version 2), field D would be disabled in this case.


When you integrate an InfoPath form into your K2 process, it copies the schema of that InfoPath form into the K2 Process definition.  The InfoPath schema in the K2 process will not change for prior deployed versions of the process.  So you deploy version 1 of a process with InfoPath version 1.  Then users start a few process instances.  Then the developer modifies K2 and InfoPath to be version 2 and deploy it.  The version 1 process instances currently running will still use the definition in defined in version 1 InfoPath, not in 2.  This is done to ensure lots of things - like what if a field is removed from the K2 form?  If that were done and this sort of versioning was not implemented you would get null reference errors when xpath queries are made on the XML to get data.


Creating versioning for a workflow is extremely important because remember you are building state machines.  Understanding versioning within K2 as well with external entities is extremely important and should be planned.


Reply