It has been a while since my last K2 realted post, but it is not because there is nothing to write about, it is just a bit difficult to allocate a time slot for writing. Honestly, with K2 set of technologies you not only have “marketing” promise of BYOA but indeed you do can create your own K2-based app fast and with very gentle learning curve, but at the same time when your work is to help various people on the different points of their “gentle learning curve” with K2, then this platform can give you a ride on a quite steep learning curve 🙂 I mean there is ton of stuff to learn with array of use cases, design options and integration capabilities, sort of “fasten your belts” we going to move quickly type of scenario 🙂
One of the basic things which seems to be constant cause of confusion and support cases is related with correct uninstallation of K2 for SharePoint app from SharePoint 2013. Don’t get me wrong installation is important too, but once you installed app and started to create artifacts there are extra things to care about when you do need to uninstall your app for one or another reason. But let me elaborate on this and some related points in the following paragraphs.
First things first. SharePoint 2013 is different in terms of app development options, so K2 integration with SharePoint 2013 is also differs from what you have for SharePoint 2010. Important things there that now you have to deploy K2 for SharePoint app in your SharePoint 2013 site and all the management of K2 artifacts happens within SharePoint interface by means of pervasive K2 Application button readily available for you on ribbon:
This is your primary way of creating and deleting K2 artifacts in SharePoint 2013. Process of creating K2 artifacts in SharePoint 2013 called “appifying“: you use K2 application against SharePoint items to appify them. So here you have 3 key terms:
K2 artifacts – SharePoint 2013 based K2 SmartObjects. Appify (verb) – create SharePoint2013 SmartObject from SharePoint item (list, library etc.). And there is antonym of that, meaning that whatever you appified can be deappified.
So once you selected SharePoint 2013 item worth creating K2 SmartObject being used in K2 workflow you click on Application button and initiate appification process which looks approximately like this:
You may wonder why I dwell on such trivial things as this new terminology? Because I want you to be very clear on this specific point: Appification process do lead to creation of SmartObject which you will be able to see in Tester Tool but you SHOULD NEVER manage or delete SharePoint 2013 SmartObjects using Tester Tool, apart when you are in a mood for complex support case 🙂 Once again deleting/editing SP 2013 SI in tester tool is not supported and will furnish you with troubles you don’t want to have.
I hope that passage on terminology will help you to memorize this. Now to antonyms 🙂 Meaning why deappifying is important. As use of Tester Tool is not supported for managing SP 2013 service instance you have to deappify SharePoint items which had been exposed to K2 (read appified) before deleting such SharePoint items. If you fail to do this you will end up with such unwelcome guests as orphan SharePoint 2013 SmartObjects, which you don’t want to have in your environment. Deleting SharePoint item which had been appified? – De-appify it first! It is simple – click on that pervasive K2 Application button on a ribbon of object which you want to de-appify and delete created K2 artifacts:
Now to the topic of uninstall of K2 for SharePoint app from your SharePoint 2013 site. It should be clear by this point that it involves de-appifying off all appified items first. And knowing the way we treat documentation I will start from what not to do. Do not do this:
Now when you clear on what not to do, I can afford myself to add some details/explain why. Never do this Remove as a first step of K2 App uninstallation process unless you absolutely sure that no K2 artifacts have been created for this sate (nothing was appified) otherwise you will end up with orphan SmartObjects. Or to keep things simple never do this firs but learn correct process of removing K2 for SharePoint app which removes K2 artifacts (right order of steps is crucial here):
Step 1. Removing K2 artifacts from a SharePoint site. You can do this by means of Uninstall link under the General heading at K2 for SharePoint Settings page. To access K2 for SharePoint Settings page you either hover your mouse on K2 for SharePoint app icon and click on ellipses which appear in the top right corner of its tile, this will bring up pop out menu from which you have to click on SETTINGS (so 2 clicks involved here):
One click method to access K2 for SharePoint Settings page is to click on K2 app logo/ inside of “black square”:
From K2 for SharePoint Settings page you have to click on Uninstall link:
And as you can see from the warning you get this process will remove all K2 artifacts from the site:
Step 2. Uninstalling the K2 for SharePoint components from the K2 environment. To accomplish this you run K2 for SharePoint Setup Manager from the Start menu and select the Remove K2 for SharePoint.
Important note: I recently noticed another point which confuses everybody – this uninstall process does remove K2 artifacts from SharePoint side but it still leaves them intact on K2 side:
“Removing K2 artifacts from a SharePoint site does not remove them from the K2 server, it does however remove the remote events which allow Workflows to start.”
This is by design to leave artifacts data on K2 side so that accidental deletion not entirely ruins workflows/forms/views and SmOs depending on those artifacts. I noticed that this really confuses people to see that artifacts still in place, for example in Tester Tool.
Why I describe this process in such details is because that Remove button unhappily filtered out in UI and it is very tempting to click on it 🙂 The problem is that it won’t remove K2 artifacts and if you subsequently remove appified SharePoint items (there will be no way of deappifying them) you will end up with orhpan SmartObjects in your environment.
And of course it is documented nicely by K2 – Uninstall is described in Maintenance section of K2 for SharePoint Installation and Configuration Guide. But not all useful things filtered out as well as some dangerous UI buttons at times. So I hope these explanations may help at least someone / bring couple of little points to your attention before you run into issue/log a support case because of not doing your K2 for SharePoint app uninstall properly or because of plainly deleting appifyed SharePoint items without deappifying them first.
Of course there is more in-depth things to learn about integration between K2 and SharePoint. For example you may start from KB001707 K2 for SharePoint Component Compatibility and it is only beginning if you want to dive in into technical details, but as usual worth of investing your time before you invested heavily in building your solution without doing your homework on compatibility and supportability.