After the release of K2 1370, there have been some small updates to the K2HostServer.config file for your SmartObject Services configuration.
The basics is pretty simple, KB1370 added the ability to change binding and binding configuration on the REST and WCF endpoints separately. Because the binding configuration also defines the authentication mechanism, this means that REST endpoints could use basicHttpBinding with Basic authentication, while the WCF endpoint uses wsHttpBinding with Windows authentication. It also allows us to run either one endpoint on HTTPS while the other is not.
In my previous post on the K2 Services I showed you how to create a static endpoint, this simplifies the URL and allows you to rename or update the SMO without the endpoint changing. The configuration sections shown in those posts are now outdated and won’t work anymore. Since the KB article describing the change doesn’t have all the parameters, this post is also a note-to-self.
Read more »
Yesteday I tweeted about inline functions and how to get your Icon working properly.
Appart from all the info in Johnny’s blogpost, there are some other catches as well. Just because i keep forgetting them, here’s a mental note to myself.
It’s a normal class library
Start your project with a normal .NET class library. Make sure it’s .NET 3.5. Add references to the following files:
- SourceCode.Workflow.Functions – this one isn’t always needed.
Another thing you have to make sure is the platform type. Make sure you set it to Any CPU. Here are my Project settings:
Make sure you sign the assembly as well!
The PNG Icon itself
The icon itself is a 16x16pixel PNG file.
Something that a lot of people do wrong is add it via the resource configuration page (if you double click on Resource.resx). You do not need to do this, you can simply add the file to a folder called resources and change the properties of the file to ‘Embedded resource’.
K2 has multiple designers and for that reason requires the assembly to be placed in different locations. In general, deployment is as follows:
- K2 Server – Copy the assembly to the Host Server\bin folder of your K2 installation.
- K2 Designer for SharePoint – Copy to the GAC of the SharePoint WFE. The image should work if you copy the PNG to “12(or 14)-hive\TEMPLATE\LAYOUTS\WebDesigner\Images\Functions”
- K2 Studio/K2 designer for SharePoint – Copy the assembly to the “Bin\Functions” of the K2 installation directory.
Together with this info and Johnny’s blogpost, plus the k2 manual, you should now be able to create your perfect inline function! If you still have questions, feel free to comment!
Don’t worry, I’ve just moved a bit closed to [the] Source[Code Ltd]. I’ve worked at Capgemini and its predecessors for 5 years and it was time to do something different. Capgemini is a wonderful company with lots of opportunities. I’ve also learned a lot there and I’ll always look back at it with good feelings.
I’m now working for K2NE GmbH. K2NE is a K2 distributor run by Ruan Scott who, if you have been in contact with K2 in Europe, you’ll probably know. K2NE operates in the North of Europe, covering Scandinavia, Germany, Swiss and Austria. The opportunity I have at K2NE is a large challenge for me that I could not resist!
Unfortunately, K2 distributors are not allowed to be Insiders so I’m losing that hubris (always wanted to use that word on my blog). That doesn’t mean this blog is going to stop or won’t be updated. I’m still keeping it and I hope to bring more details/real life problem fixes on this blog, together with the new things! And I can assure you, there’s so much goodness to come!
I also want to thank K2’s insider program because it helped me keep up my knowledge and start work at K2NE so easily!