/ #K2 #SharePoint 

Switching to K2 SmartForms mid project


I have been working with K2 products for more than ten years (since 2003) in various roles. Over that time there have been periods of frustration, especially where I have had to support solutions built by other people where they have used InfoPath and a lot of custom code in the workflows. We didn’t previously license the K2 SmartForms piece of the solution, and I have to admit that I was a little sceptical about how good SmartForms would be and how well it would be able to deliver on the requirements we have.

I’ve also been working with SharePoint since 2003. I am not really sad to see the back of InfoPath. Whilst for simple stuff it seemed good on the surface, so many times it got really complicated. I have also had some custom ASP.Net solutions built by partners which integrate with K2. These have also ended up feeling very complicated and are difficult to support. Also, because they are Full Trust SharePoint solutions, deploying changes is a pain, often requiring out of hours effort.

My initial path

I came to a realisation some months ago that I really wanted to get away from Full Trust solutions. This was partly driven by what is happening around Office 365 and also that ‘SharePoint integrated’ and ‘InfoPath integrated’ K2 solutions will only work in 2010 mode on SharePoint 2013.  This means re-writing the workflow/user interface to use the ‘non-integrated’ approaches. Also, I was pretty fed-up with having to deploy on Sunday mornings…

My experience with building workflow solutions during the past ten years leads me to believe that up to 80% of the effort in the solution is building the user interface.

Given that InfoPath is being discontinued and having looked at what was happening in the industry while at the SharePoint conference in Las Vegas, I decided to have a go at building a solution using HTML5, Bootstrap, Angular JS, Entity Framework, SQL, SharePoint and K2. The user interface for the solution would be primarily client side with some WebAPIs taking care of talking to the back end. The workflow would be in K2 BlackPearl.

The solution I was building was due to be delivered within 3 months. Not only that, we could only work on it part time and still had to do other projects, support and maintenance on the platform.

Using these technologies was a huge learning curve. I spent a lot of time watching the great content on Pluralsight and really quite enjoyed the learning. I had to overcome a number of issues including the fact that the current K2 REST APIs don’t support CORS, so I had to build an intermediary using WebAPI.

I worked on this on and off for about 2 months. All the time the deadline for delivering the project was getting ever closer. In addition, I began to realise how much code I was writing, how many components were involved, and started to worry about how other team members were going to be able to skill up and support the solution. Knowing that I was learning it because I was passionate, I had doubts that others would necessarily share my passion to the same extent. I really didn’t want to get into the situation where I was the only person in the team that could provide support and maintenance for the solution. I also wanted us to be able to deliver changes quickly as the need arose.

A new financial year

After quite a lot of evaluation and with the advent of a new financial year and budget, we decided to purchase K2 SmartForms. One of the things I really liked about the SmartForms solution was that it ran outside of SharePoint. Much as I love SharePoint, being able to abstract the design and execution of the forms to somewhere else, but still integrate with the SharePoint platform as needed was an attractive proposition. This fits in well with potential cloud based solutions for the future.

At this point I evaluated the amount of work remaining on the project using the other technologies and came to the conclusion that the sensible thing was to get SmartForms deployed into our infrastructure as quickly as possible and have a go at using that to build the solution. Whilst I really did like what I was doing with Angular JS etc, I decided that the benefit of the rest of our team being able to maintain and support the solution outweighed the reasons to continue.

Round One

I watched some of the material on K2 University and had a go at building the solution using SmartForms, SmartObjects and Workflow over a period of about eight business days. I was already impressed with how much of the solution I had built in that time with absolutely no code.

Then I worked with a K2 Consultant for an hour to see if I was on the right track. As it happened there were a number of techniques which could be used to make the solution much more elegant so I spent the next week rebuilding it. Whilst a little tedious, it helped to reinforce how to use the tools.

Round Two

Having implemented nearly all of the requested features in an incredibly short space of time, I presented to the stakeholders and got some feedback. They seemed happy with the functionality but a bit disappointed with the way the user interface looked. So now it was time to learn how to build a custom theme and make the forms more attractive.

I laughed when the K2 consultant suggested I hand over the design to our CSS developer. Being a very small team, I ‘handed’ the design to myself and began working through the CSS in Visual Studio.

Using some corporate colours and fonts I ended up with a fairly respectable look and feel and again showed it to the stakeholders. They seemed much happier so we decided to schedule a presentation to the team of people who would be using the solution.

Requirements and scope

In some ways, this process has reminded me a lot of the years when I built Lotus Notes solutions in a very agile fashion. (Now that was a product ahead of its time in my opinion….)

Whilst presenting to the team, new requirements surfaced that had not been identified in previous workshops. I was quite amazed that although the changes were of some substance, I completed them in a matter of about seven working hours.

I couldn’t help but wonder how long it would have taken me if I was making those changes to my custom Angular JS based solution.

Conclusion (so far)

I have genuinely been blown away with how much functionality I have been able to build in such a short period of time with no code at all. This was reinforced by how quickly I was able to make changes to the solution.

During the project, I have been able to use the K2 Package and Deployment tools to deploy between development, staging and production environment. It hasn’t been 100% smooth sailing, but I have been able to overcome any issues I have encountered so far. Generally I am pretty happy with this part of the toolset.

I am still working on a couple of technical infrastructure issues with the K2 support team, but I am sure we’ll sort that out.

In the mean time, I have already built two other solutions with SmartForms to do document approvals in SharePoint libraries. I’ll admit I did write a bit of JavaScript for those ones, but only for the SharePoint custom actions to call the SmartForms to then start the workflow. (We are still on SharePoint 2010)

There is genuine excitement among team members about the possibilities for SmartForms and we are running training for the whole team in October. I believe we will be able to deliver high quality consistent solutions in pretty short time frames and I am looking forward to seeing how things progress over the next six months.

I have transitioned from ‘sceptic’ to ‘convert’ when it comes to SmartForms. Congratulations to the K2 team on creating a really useful product.