Symptoms
The customer had question regarding backwards compatibility.
1. Let’s take an example, if there are 100 workflow instances running and we deploy a new version of workflow with new activities and some changes then the old workflows instances will keep going on with old version workflow code, and the new instances will work with latest version (which is defaulted to). But if the client application like ASP.Net doesn't maintain any versioning. If the same ASP.Net function is called by Old version task and new version task and if there are any changes to newer version, we have to somehow identify that the task is from new version and execute the new code.
2. Since K2 creates a new version with every deployment, how can we fix a defect detected in the old version workflow that is currently going on and deploy a fix for only that version of workflow?
3. Can we migrate old version workflow instances to latest version of Workflow so that the old workflows also follow the latest version?
Diagnoses
I went to the K2 Underground and found a couple of tools to help with the issue. I provided links to the tools, as well as some documentation that will help the customer decide what to do moving forward.
Resolution
Question _ 1: I’m afraid that there is not a way out of the box to manage ASP.NET application that would correlate to the K2 process version. One suggestion is to get the process version via K2 api and inject to the asp.net form, see the community link below.
http://community.k2.com/t5/K2-blackpearl/Getting-process-version-in-asp-net-form/td-p/25319
Question _ 2: Perhaps, you can use the data injector from old community site to update the process xml for existing process instances. Please keep in mind that this tool was designed and created by the K2 community and as such is not supported by K2 Support in any way.
K2 Data Injector which can be downloaded from K2 Underground: http://old.k2underground.com/groups/k2_data_injector/default.aspx
If the defected instances are in error state, one way is to deploy a new Process version of the workflow and use the K2 for VS process management to retry the error instances, see K2 Process Management Overview
http://help.k2.com/onlinehelp/k2blackpearl/userguide/4.6.7/webframe.html_reference-st-error_repair.html
Question _ 3: You can try the process instance version migrator from community site to get around the issue.
http://community.k2.com/t5/K2-blackpearl/Process-Version-Migration-Utility/ba-p/73689
Again, please keep in that the tool was developed by our community and there are limitations with process migration you also NEED to be aware of. You can find more information in the K2 documentation here: http://help.k2.com/onlinehelp/k2blackpearl/devref/4.6.7/webframe.html_Important_Notes.html