A big gotcha with K2
I was at a client yesterday helping out with a process in K2 Blackpoint, and one of their requirements was that the person filling out this form has to select their project managers, they don’t have to have a project manager but are not restricted to one. So we put a people picker on the form and allowed the user to select multiple users so that K2 could dynamically set the destination of a client approval task.
We plugged all this data into K2, and tested the process. the activity for the project managers was coming through one at a time, it was supposed to send them all out at once, and once the first person actioned their task, the other project managers couldn’t access their tasks.
So after much digging, I discovered that K2 doesn’t handle multiple users in a people picker very well. When you pull the people through and use it to set the destination. K2 sees the multiple users in the destination, sends each one of them a task but only creates one slot even though it is set to create a slot per destination. This I am sure is a bug as how can it recognise each user name in the string and send each person a task but then not create a slot for each person?
So, what about a work around? Well, the client eventually had to decide on a limit of project managers, they picked five and we put five people pickers on the initial form. We then had to do some extra destination and line rules so that the process would only use the supplied users and not try to use an empty field, it would just bug out if it did. This is a compromise for now, as some employees are working on over twenty projects at a time.
So do I expect K2 to be able to handle multiple users in a delimited string, or string array? Yes! I really did think that K2 would be able to recognise the fact that this one destination actually has multiple user destinations in it, and react accordingly, which it did partially by sending each user the notification but it should have created a slot for each user.
Come K2, I thought you guys were beyond these types of basic functionality issues by now.
Upgrading your SharePoint databases
If you look at the “Review database status” page under “Upgrade and Migration” in SharePoint 2010 Central Administration, you may see a message in the status column that says something like “Database in compatibility range and an upgrade is recommended”. To do this you need to run the PowerShell command “Upgrade-SPContentDatabase but to do this you need to get the identity of each database you want to upgrade and run this command for each one. I have numerous clients that have more than one content db, and you may also want to upgrade the Central Admin databases too, so I have written a PowerShell function that takes in the Web Application and upgrades all databases attached to it:
Function UpgradeDatabases($webApp)
{
$web = Get-SPWebApplication -Identity $webApp
foreach($contentDB in $web.ContentDatabases)
{
Upgrade-SPContentDatabase -id $contentDB
}
}
A pretty straight forward function. Below is the ps1 file.
Download UpgradeDatabases file
Disclaimer:
Please read the disclaimer if you plan on using anything from this article.

