K2 – The base type â€™SourceCode.SharePoint.ProcessPortal.UI.PortalWebPartPageâ€™ is not allowed for this page. The type is not registered as safe.
When creating a a process portal or trying to access certain sections of a process portal in K2 Blackpearl or Blackpoint & you get the following error:
“Parser Error Message: The base type â€™SourceCode.SharePoint.ProcessPortal.UI.PortalWebPartPageâ€™ is not allowed for this page. The type is not registered as safe.
Assembly Name=”SourceCode.SharePoint.ProcessPortal, Version=188.8.131.52, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d
Page Language=”C#” MasterPageFile=”~masterurl/default.master” Inherits=”SourceCode.SharePoint.ProcessPortal.UI.PortalWebPartPage
Register TagPrefix=”SharePoint” Namespace=”Microsoft.SharePoint.WebControls
/k2/default.aspx Line: 3
Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927″
Check your web.config & if the below lines dont exist add them & your problem should be fixed:
<SafeControl Assembly="SourceCode.SharePoint.ProcessPortal, Version=184.108.40.206, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d" Namespace="SourceCode.SharePoint.ProcessPortal.UI" TypeName="*" Safe="True" SafeAgainstScript="True" /> <SafeControl Assembly="SourceCode.SharePoint.ProcessPortal, Version=220.127.116.11, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d" Namespace="SourceCode.SharePoint.ApplicationPages" TypeName="*" Safe="True" SafeAgainstScript="True" />
When deploying a new smartobject you get the following error in K2 Blackpoint / Blackpearl:
“Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. ”
You need to increase the timeout for K2 Smartobjects by doing the following –
1) Open the following file – [InstallDir]K2 blackpearl\Host Server\Bin\SourceCode.SmartObjects.Runtime.config
2) Add a key “commandtimeout” & set the value to 120
3) Save the file and restart the K2 service
Note: If you still get the error, try increasing the timeout ie. 160, 200 etc
K2 Error: The solution has not been opened. The following error occurred on opening: Value cannot be null.
When in K2 Blackpoint or K2 Blackpearl you are using a Infopath Integration Wizard and when you try to specify the Infopath form template you get the error:
“The solution has not been opened. The following error occurred on opening: Value cannot be null.
Parameter name: adapter”
Delete your submit data connection in your Infopath form, you should then be able to add your Infopath form template to your K2 process with no error.
The Refresh interval can be changed in the web.config file by editing the value in the following node:
<add key="ViewFlowRefreshTime" value="30" />
The web.config file can be found in the following location:
Program Files\K2 blackpoint\WebServices\ViewFlow
K2 Blackpoint/Blackpearl In a one way trust environment â€“ Error: MSMQ A queue with the same path name already exists
If youre K2 Blackpoint/Blackpearl in a one way trust environment & you get the following error when starting the K2Server Service:
Event ID 7030 “A queue with the same path name already exists”
Modify the following bold portions in these two configuration files in C:\Program Files\K2 blackpearl-blackpoint\Host Server\Bin folder.
Configuring K2 Blackpoint in a one way trust as per previous post. Deployed a new process & then triggered it by creating a new document. The process started & I could click on it & see it as ‘In progress’.
When I went to the K2 Process Portal the ‘Processes’ webpart showed the process as deployed with all the relevant data. However the process never displayed in the K2 Worklist webparts nor did it show as ‘Running’ in the K2 Instance Summary Webpart.
This is because the account that you are using to run your Sharepoint web application needs ‘Admin’ & ‘Impersonate’ rights on the K2 server.
K2 Blackpoint/Blackpearl In a one way trust environment – Error: Authentication required for session
If you are trying to get K2 Blackpoint or K2 Blackpearl working in a one way trust environment using K2′s pass thru authentication there is a blog post here on how to get it to work:
I followed the instructions but every time I tried to access the settings page in the K2 process portal (/_layouts/K2/PPManagementConsole.aspx) I would get the error:
Authentication required for session xxxxxxxxxxxxxxxxxxxx
This was because the account(s) running my Sharepoint app pool(s) also need to be in the trusted domain along with the K2server service account.
Hopefully this may help someone if they have similar problems!
When troubleshooting K2 Blackpoint / K2 Blackpearl you run the K2 Server in console mode, this then allows you to see everything thats going on as the K2 server is processing requests. However the text moves quickly so for further analysis you can output everything to a text file by running the K2HostServer.exe & piping it out to a file of your choice eg below:
C:\Program Files\K2 blackpearl\Host Server\Bin\K2HostServer.exe > c:\k2ServerLog.txt
The above will output everything to the root of C: into a file called k2ServerLog.txt
When deploying a new K2 Blackpoint or K2 Blackpearl you may get the following error:
(K2Project) SmartObject Server Exception: Could not publish SmartObject Definition to server: Error refreshing Service Instance ‘WorkflowReportingService’. Service returned : ‘Workflow Reporting SO Service: Communication with the underlying transaction manager has failed.
SmartObject: [Test - Process Instances]
If you do checking the following may help:
1) Specifically allow the Distributed Transaction Coordinator access through the Windows Firewall on the servers ‘allowed programs list’
2) The servers might have been cloned causing the MSDTC GUIDS to be duplicated. Remove and re-install the MSDTC components on the servers to fix this
3) Troubleshoot using DTCping & DTCtester (You need to make sure any firewalls allow the RPC port range through – http://support.microsoft.com/kb/154596)
4) In Component Services in Administrative Tools on your servers select the â€œNo Authenticationâ€ option in the MSDTC configuration options.
Installing K2 Blackpoint / Blackpearl in a one way trust environment you need to run the K2 server service account & application pool using an account from the ‘trusted’ domain. It is also recommended that you install K2 components using this account:
Note: It is recommended to install all K2 components using the K2 Service Account. Log on to the server as the K2 Service Account before installing.
However if you try you will get the following error:
“The K2 Setup Manager requires the logged on user to have domain user privileges to proceed”
As you are in a one way trust environment you cant easily give the required permissions (if at all) so the work around is –
“If you have a scenario where you have multiple domains, you can disable the Installerâ€™s domain check. 1. Please browse to the directory where you are executing the installation files from. 2. Look for an configuration file called product.config. This file will reside in the installer directory. 3. Please edit the file and change the Domainusercheck from true to false as shown below. 4. Save the file and execute the setup.exe again.
setting key=”domainusercheck” value=”false”
If you are installing K2 Blackpoint / K2 Blackpearl in a distributed Sharepoint environment, you install K2 for Sharepoint on your web front ends but the K2 section still doesnt appear in Sharepoint Central Administration.
This is probably because you are hosting your central admin web app on a different server ie. an application server, if this is the case you need to install K2 on this server hosting your central admin as well as your Sharepoint Web Front End servers.
Sharepoint Workflow Task Error: This task is currently locked by a running workflow and cannot be edited
Error in Event Log on Sharepoint Server: This task is currently locked by a running workflow and cannot be edited
When a workflow processes a task normally, the following sequence of events is expected to occur:
1. The process begins.
2. The workflow places a â€˜lockâ€™ on the task so nothing else can change the values while the workflow is processing.
3. The workflow processes the task.
4. The lock is released when the task processing is finished.
The error occurs because the lock never gets released, which usually occurs between steps 2 – 4. You can read more from this forum post.
Anyway I was getting this problem in a K2 Blackpoint / Blackpearl workflow which was preventing my workflow from moving to the next step. I resolved it by creating a new task list & pointing my K2 process to the new task list, no locking errors & the workflow runs fine now.
You may get similar errors with any workflow product ie. Nintex, Sharepoint Designer Workflow, C# Workflow etc, anything that uses the Sharepoint Workflow Engine & Sharepoint Task Lists.
In a K2 Sharepoint process you will quite often have to update the same piece of meta data in multiple locations ie. you have a status column which is part of the list your process is attached to but you may need to reflect this status update on another list item in another list for reporting purposes or something similar. Your lists will need to have a common piece of metadata like a ‘reference number’ or something similar in order for you to return the List IDs’.
You can do this fairly easily using the ‘Sharepoint Search’ event wizard in K2.
- Drop the Sharepoint Search Event wizard on to your design canvas
- Choose ‘Search in a Sharepoint List or Library’ this will just search the specific list your point it at
- Add the URL of the Sharepoint site where the list resides & pick the list you want to search
- Now specify you search parameters ie
Content Type: Order
Field: Reference Number
Value: Order Number (This column exists on your other list ie. the one attached to your existing process)
This is now searching your list for a reference number that matches the order number on your original list.
- Create a content field in order to store the results on the next screen
- Finish the process and save
- Now if you go into your process explorer you can browse your new content field that will contain the List ID of your item everytime your search event fires
ie. Object Browser –> XML Fields –> ‘Process Name’ –> ‘Content Field Name’ –> Items –> Item –> Item (This contains the List Item ID of the item you wish to update on the other list)
ps: I wrote this in a hurry which is probably apparent!
In K2 Blackpearl you have access to a K2 Report Designer making it fairly easy to create custom reports, however in Blackpoint there is no report designer. The good news is you can still create custom reports by creating a new Web Application in Visual Studio & using the ADO.net provider that ships with Blackpoint for interacting with Smartobject data.
“K2 blackpoint ships with an ADO.net provider for interacting with SmartObjects. This includes any SmartObjects that you create against SharePoint content, Workflow SmartObjects that you can configure when designing your process, as well as some pre-configured reporting SmartObjects which are used by the out of the box reports in the process portal.
The ADO.net provider allows you to build ASP.net forms as well as SQL Reporting Services reports in much the same way as you would use any other ADO.net provider.
Today I will show you the ASP.net example. The recording attached to this post also discusses using the ADO.net Provider in a SQL Reporting Services report. The configuration of the data source is similar for ASP.net and SQLRS.
For this example I have created a basic web page project. There are 2 things that you will need to configure to ensure that your ASP.net page works properly with the data provider”
If you want / need to provide direct links to specific K2 reports without having to prompt the users to input various parameters ie dates etc you can by passing directly into your K2 report url.
The parameters below can be passed in:
a. FullName: Folder\ProcessName
b. Version: int_Version
c. ValueType: 0 to have average duration, 1 to have the instance numbers
d. FromDate: start date for the report YYYY/MM/DD
e. ToDate: end date for the report YYYY/MM/DD
f. Status: 2 for Active, 4 for Completed
g. EventType: 0 for all events, 1 to exclude Server Events
So an example url passing the above parameters in a K2 Blackpoint environment would look something like this:
If you are creating a K2 Blackpearl / K2 Blackpoint process using the ‘Sharepoint Workflow Integration Client’ and when trying to open a particular task item to complete it & you get a ‘page cannot be found’ error in you web browser, its probably because the task title in your workflow contains a ‘&’ char.
Replace ‘&’ with ‘and’ or something and you will be able to view & complete your K2 task as expected.
When trying to view K2 Blackpoint Blackpearl report error: ‘Microsoft.ReportViewer.WebForms The system cannot find the file specified
When trying to view a K2 Blacpoint or Blackpearl report in a process portal you get the following error:
An error has occurred trying to load the settings for the report. N/A:Could not load file or assembly ‘Microsoft.ReportViewer.WebForms, Version=18.104.22.168, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies. The system cannot find the file specified.
In my case the reason was that I needed to install the Microsoft Report Viewer Redistributable 2008 on my server(s). Once installed do an IISreset & all reports should render as expected.
Had a strange problem on our K2 Dev Server where all of a sudden we could not deploy any K2 processes, old or new. Basically we would click deploy & it would never complete, the deployment would appear to be happening but if you looked at the K2studio.exe in process monitor it wasnt using any processor resources after the 1st second or so ie 0% processor usage.
If you then looked at C:\Users\MyUserName\Documents\K2Studio\K2Project1\obj\Debug\my-project-my-process.exe you would see that its file size would always be 0k.
After logging a call with K2 a spending a few hours troubleshooting it turned out to be something corrupt with my userprofile on the K2 Server. Once we deleted my profile & then recreated it we could then deploy K2 processes as expected.
Hopefully this will help someone with similar problems deploying K2 Blackpoint or K2 Blackpearl processes.
The current list item ID in a K2 Blackpoint / Blackpearl process is held in the ‘SpIntegrationData’ hive in XML fields. This hive is hidden by default so in the Object Explorer window you need to click the down arrow top right hand side & click ‘Show Hidden Fields’.
SPIntegrationData –> SPData –> All available data fields show here
This data is populated as soon as the process is started.
As you probably know lookup columns in Sharepoint are stored in this format â€œID;#Stringâ€ (record number & then the string value). I was trying to use a lookup value in a K2 process to make up the new sites URL when provisioning new sites. Obviously this was failing due to the way lookup columns are stored ie. illegal characters ID;#String.
You can get round this by using the K2 ‘Code Reference Event’
1) Add a ‘Code Reference Event’ to one of your activity containers on the K2 canvas.
2) Give the code event a name
3) Event Method Editor –> Call Constructor –> Add Reference –> Microsoft.Sharepoint.dll
4) Now on the Select Constructor Screen: Microsoft.Sharepoint –> SPFieldLookUpValue –> Constructor(String fieldValue)
5) Assign your Sharepoint Lookup Column to the fieldValue parameter
6) Now map the LookupValue field to whichever field you wish to store the lookup string value in, set ‘Retrieve Value’ and tick ‘after’
7) Now the field you chose to store the lookup string value will contain just the string without the prefix ID;# and can be used throughout the rest of your K2 process.