As you may, or may not be aware, the underlying code of workflows produced by K2 blackpearl have Windows Workflow Foundation (WF) at the core.
With the previous K2.NET 2003, there was a Notepad-like editor that allowed you to over-write the code generated for the event. It was compiled “on the fly” – you could just update some code (to fix an error for example) – and then “continue” the workflow.
With K2 blackpearl, there are so many event wizards, templates and other functionality “out of the box”, you will may not ever need to write any custom code. I haven’t had to as yet – but one day, I’m sure I will, for some reason or another.
This is not the same as when using the K2 API and ASP.NET (C#) to open K2 connection, and worklist, etc – and inter-operating with the K2 server/runtime. This is with regard to code within the workflow.
Another K2 Insider Gabriel Malherbe has posted a great article about how to add code to events within K2 blackpearl – with some screen-shots, etc.
It’s not for the faint-hearted – code within WF introduces a new swag of functionality, acronyms and techniques – XOML for one – and I’ve never been a fan of the design interface for WF (within Visual Studio).
But – if you HAVE to include some custom code within a K2 workflow – and can’t achieve the same result by calling a web service, or SmartObject method – then this article is a good start.
Thanks Gabe !