Installing SharePoint on a K2 Server

Okay, so I’ve not been blogging much recently as I have been sidetracked onto exciting deployment tests for the system we’ve been working on. However, I did come across this interesting issue…

Normally, if I were having K2 BlackPearl on the same box as SharePoint, I would install SharePoint first, then K2. This seems to work without much fuss, and is the right way of doing it.

However, this time I had installed K2, and was now trying to install SharePoint (long story). However, SharePoint’s installer kept failing (using the SP2 with cumumlative updates to April, in a slipstream installer). It simply would not complete successfully.

Eventually, we tracked this down to the SQL 2005 Report Viewer. We uninstalled (via ‘Add an Remove Progams’) the ‘Microsoft Report Viewer Redistributable 2005′ program, stopped the K2 BlackPearl service, and tried installing SharePoint again. It worked.

Of course, the idea would be, don’t have the two on the same box. But just in case someone else tries the same thing.

And I hope I’ll get back to development soon.

What happens when a K2 BlackPearl Licence expires?

So, I’d built a demo with a short-term licence key – one that expired at the end of December. This was unfortunate as the demo got moved to January. Anyway, what happened when the licence expired? Um, sudden workflow death. The workflow host ceased functioning – so my workflows which were in progress wouldn’t do anything, and even the worklists stopped functioning.

Hmm. Seems a bit brutal to me – I’d expected that the in progress workflows might be possible to continue, albeit that I wouldn’t expect to be able to start new processes. I suppose maybe it makes sense, ‘cos otherwise people would be able to still be using ‘in progress’ workflows for years afterwards, but it was a bit of a shock.

On the other hand, updating the licence wasn’t too hard – provided you can find the URL

“Error occurred adding the feature to the farm” when deploying K2 workflow

This problem proved a real puzzler for me – but the guys on the K2 underground came through with a good answer – the Application Pool Identity of the Moss Site Collection must be part of the Farm Administrators group. (Which makes sense when you think about it. The K2 web services are running under the App pool identity of the site collection, and they’re trying to deploy features to the farm…)

Unfortunately, I then suffered a second problem – and error of ‘Value cannot be null’ when trying to deploy a workflow associated with a SharePoint Content Type. Sadly, all this was worked on last minute just before Christmas, so I’ve forgotten a lot of what I did to my machine. I met with some of the guys from K2 who were very helpful, and we did quite a lot. My memories are:

  • Installed SP1 for [blackpearl]
  • Installed Office 2007 (I was in a hurry and forgot, okay?)
  • Stopped trying to associate the workflow with a content type and instead associated it with a specific list – which worked for the demo, but associating with the content type is a far, far cooler idea.
  • Changed my form to allow “Cross-Domain Access for User Form Templates” and changed the data connection timeouts in SharePoint to be longer – as several of the guys in the thread noted, this does seem to be an issue with K2 workflows in VMs – but then my 2GB RAM machine was running a VM with MOSS, SQL2005, K2 and a DC, SMTP and POP services on it.
  • Gave more rights to K2 to some of the users. I had to give the App pool more permissions than I had, in order to allow it to display worklists, which also makes sense.
  • Sorted out a misconfiguration in IIS.

I’m sure I’ve missed other things, but it was so long ago now, I can’t quite remember. The only other thing I can remember doing was sitting around a lot waiting for everthing to work. The applications were quick enough when they’d been compiled, but that meant that the first time I hit some of the pages, well, there was a lot of waiting. And errors from timeouts. Particularly we had problems with contacting SQL Reporting Services from some of the K2 wizards, but found that if you waited a moment or two and then tried again then they were okay.

K2 – “Unable to read the Temporary Class” Error

I installed Black Pearl and when I went to the workspace, I had the error:

Unable to generate a temporary class (result=1).
error CS2001: Source file ‘C:\WINDOWS\TEMP\hq-r-kii.0.cs’ could not be found
error CS2008: No inputs specified

I found an article called “K2 – Read the Troubleshooting instructions” by Jeremy Hancock which was bang on. Just in case his blog goes offline, the solution was…

Give all “Authenticated Users” the following C:\Windows\Temp permissions: Read & Execute, List Folder Contents, Read, Write

That fixed it for me. Apparently it is in the troubleshooting in the manual – but who checks that before Google these days? Well spotted Jeremy.

Good synopsis of SharePoint Workflow

“To MOSS or not to MOSS”. That is a question…

Edit – apparently K2 Black Pearl is out – must get a copy and take a look. I saw a demo, oh, November last year. It bored our management, but blew our developers away…

PPS – note to self – get access to k2underground.com

Comments from my old blog:

K2Underground is quite good, but keep an eye on my blog – I’m going to start writing about K2 in the development section.

It’s good, but it doesn’t help solve some long standing issues to do with storing data in workflow engines. I have had to implement my own data storage system alongside the K2 workflow in the project I have been working on for the last 6 months.

By Jonathan at 20:39:36 Friday 7th September 2007