K2's 4.5 Release - Inline Functions

Last October I had the privilege to visit the K2 Insiders conference. We all got to see a preview of K2’s new 4.5 release. Now (finally!) a targeted beta is available for selected partners, customers and insiders. This blog post will focus on Inline functions, a new feature of the 4.5 release which will be available for K2 blackpoint 4.5 and K2 blackpearl 4.5. The new release also features improvements to the designers, as you can read in Jey’s blogpost.

Why are inline functions so important?

To explain why inline functions are so important for K2, it is needed to provide some background. Way back before the South African development team started working on K2 blackpearl, a vision was created on how to design processes from a business perspective. The current K2 architecture has a lot of features that can be mapped to that vision. An example of this is SmartObjects. The vision shows that (enterprise) data should not be included/part of the process and should be referred from within the process. SmartObjects do just that, making live a lot easier when working with the K2 platform.

Another big part of the vision is to allow you to design processes without the need to write code. A lot of processes can be implemented without code, but I’ve had lots of occasions where I still needed to write small pieces of code. Within the new K2 designer for SharePoint and K2 studio, you’re unable to write code and you’re stuck going back to Visual Studio. This isn’t how K2’s vision was created and so a solution was needed to reduce the use of code and allow you to call (simple) functions.

What are inline functions?

Every wizard within K2 uses input fields where you can drag and drop items from the Object Browser to the input fields. Inline functions allow you to call simple functions inside those input fields. The functions are categorized in groups, so all the Date and Time functions are together and all the Text manipulation functions are together. A complete list of inline functions will be listed in the product documentation which will also be up on the knowledge base site. For now, you can check this blog post.

So, why is this so good?  Well, as stated in the previous paragraph, this will allow you to do more with the designers that do not support the use of code.

How do they work?

This youtube video will hopefully explain how you use inline functions while designing a process.

From a technical perspective, inline functions are executed within the workflow server.

[UPDATE] I forgot to share the video for the public, it should be better now :-)

But, the function I need isn’t there!

Ok, K2 can’t provide you with every function thinkable on the planet, but they always provide you with ways to extend the K2 platform. This is also the case with inline function! In the end, it all comes down to a simple .NET assembly with some class and method attributes. The developer reference will have an article/how-to on this.


I hope this blog post makes you understand how valuable inline functions can be when designing a process. For myself, it’s another way of doing things and allows me to create processes more easy and (in a lot of occasions) without code!