Work > C#

K2Five: Creating an asynchronous event

4 Mins. Read.
With the new release of K2 five and it’s workflow designer, we do not have the capability to write custom code in our workflow anymore. For some, this is a shocker and unbelievable. Having no code in your workflow has been a best practice for some organizations for years and as a low-code platform, it’s a nobrainer. However, there are requirements that always required code in the past, one of those Asynchronous server events.

Add AD-Group to SP2010 via CSOM

2 Mins. Read.
Unfortunatly, projects aren’t always that fancy. In this case I’m still doing a bit of SP2010. Luckaly we do use CSOM to make it a bit interesting. CSOM has a lot of functionality, and theoretically you can say “it does everything the old-fashioned SPSite model does”. However, it can be a struggle. In this case, we needed to add a AD Group/User to sharepoint directly. Don’t ask, it’s a customer requirement.

K2 Workflow Client Services - Video by Eric Schaffer

1 Mins. Read.
In my previous post, I wrote about the new Workflow Client Services that are available within K2. In my post, I created a small worklist page fully based on javascript/jquery/json. Eric Schaffer has made this video describing how you can do this, even creating a action pull down. The video is on youtube, so here’s a direct link: http://www.youtube.com/watch?v=QKIv6C8WnLI

LINQ2SQL: Where is the DataShape class?

1 Mins. Read.
We’re going to use LINQ2SQL in a project. Don’t ask why we’re not doing Entity Framework. When you start out with LINQ2SQL, you’ll google bing on “LINQ2SQL”. This, if you feel lucky, ends up in this page: http://msdn.microsoft.com/en-us/library/bb425822.aspx The page is long and old. The read, you’ll just have to cope with. That it is old is sometimes annoying because it’s outdated. What I couldn’t really find was the DataShape class on msdn.

C# using statement and the K2 APIs

3 Mins. Read.

Recently in one of our projects, we had to do some performance optimizations that required us to look a bit closer at the resources our application used. In general, you should always dispose an object that’s implementing the IDisposable interface.

K2’s client API’s use a connection to the K2 server which needs to be closed and disposed after you’re done using them. In C# you can use the using-statement to dispose your objects when you’re done with it. The using-statement only works on objects that inherits from IDisposable.
Here are some examples of how to correctly use the using-statement when using K2 API’s.