Skip to main content

All,

I have developed a new Workflow. I have two K2 servers (dev and test).

Deployment on Dev without problems through Visual Studio. Now I've done everything described in KB 188, make a deployment package, copy all files to the test server and run the "msbuild MyWorkflow.msbuild /p:Environment=Testing" (the environment exists on both servers).

First of all, it throws an exception because the SmartObjects were not deployed. So try with this command:
"msbuild MyWorkflow.msbuild /p:InfoPath_Process_And_Event_Deployment=False /p:Environment=Testing"

Now the SmartObjects deploying successfully (after running the Service Instance Synchronizer Utility from Blackmarket).
If I now run the first msbuild again, a new error comes up:

"Inconsistency detected between SmartObject and ServiceObject during loading of SmartObject definition. Property : ProductClassID not found in ServiceInstance definition"

The property "ProductClassID" is one property in my SO, but also if I "Update K2 SmartObject Service Definition" within my SharePoint Site nothing changed.

Now I cannot connect with VS to the Testserver to delete the SmartObjects. The SmartService Instance cannot be delete because there are dependants. The process can also not be deleted because it is not supported (since K2.net 2003...)

What should I do now? Is it really so difficult to deploy a process to another server?

Well, I can offer some help here I hope, given that I have gone through all the pains of deploying to a new server serveral times (wait 'till you have a staging and production environment too!).  I'm not entirely sure why you are deploying via command line, that may be the preferred method but I can tell you that I deploy to all my environments via visual studio just by changing the environment in the K2 browser.  I always deploy my smart objects first, and yes, if there are things that cannot be updated on the smartbox database you will get errors that aren't always clear.  One thing you can do to get back to square one in your test environment is to execute the K2Server.wipeall precedure which clears all processes !!! THIS IS UNSUPPORTED BY K2 !!! but has always worked ok for me.


You can also take a look in your SmartBox.SmartBoxObject table and clean the smart object definitions out of there so K2 no longer *thinks* you have those smart objects deployed.  Make sure you keep track of any changes you do in here though in case things get out of hand and you can rollback.  There is also the SmartBox.cleanUpSmartBox procedure that can often get you out of sticky situations.  Again, all of these suggestions are unsupported by K2, but they are worth a shot if you are cautious and on a relatively expendable server that you can always rebuild if things go awry (don't do this on production!).


Hope this helps, good luck!


Thanks for your answer.

In my "perfect" world, I think deploying to another server through the command line is the preferred method, because not every customer have all their servers in one network.

But ok, now I'm trying to deploy through the visual studio. I created a new SmartObject project, so that all SmartObjects can be deployed before deploying the process.

However I'm fighting with the SO deployment because in the Service Object Server (within K2 Object Browser) if I expand my SharePoint Instance node, I only see the "Users" node. If I expand this instance node for Development I see all my Lists and so on. Any ideas?

Thanks in advance,

marco


Well, I found the solution by myself right now... Damn security... Do not forget to add the K2 Service Account to the Site Collection Admins 😉

Reply