Unable to trigger k2process integrated with sharepoint document library

  • 22 July 2010
  • 3 replies
  • 0 views

Badge +9

Hi all,


I have a k2 process that integrated with sharepoint document library through "Sharepoint workflow integration process wizard". When i add an item to document library, it should trigger the process. It is triggering the k2process when an item is created to document library. but if i add the sharepoint item to document library through sharepoint object model(through code), the k2process is not triggering. What could be the cause, there is no error in sharepoint.


I got the below error in event viewer


Error loading and running event receiver Microsoft.SharePoint.Workflow.SPWorkflowAutostartEventReceiver in Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c. Additional information is below.


: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))


Any help.


3 replies

Badge +4

So the item is added to the document library, but the event receiver fails?


Are you able to view the specific event in "K2 Event Integration" on the site actions of the SharePoint site? Also, try clicking on "Configure" of the specific event. Let me know if you see an error.


Clint

Badge +9

Hi Clint, thnx for the reply. I can see the option "K2 Events Integration" under Site Actions -> Site Settings. But i dont see any events under K2Event Integration. Do i need to add any k2 or sharepont events manually? When i add the doc library item manyally, the k2 process is attaching fine but if i add an item through aspx code using SPObject model, its not ttriggering. when i check the event log, its giving the below error.


An error occurred trying to call the runtime web service to start the process System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Exception: An error occurred trying to create a new instance of the process. ---> System.Exception: 24408 K2:SHAREPOINTsystem from IP:18417 does not have rights to Start Process SampleK2SolutionSampleProcess
   at SourceCode.Workflow.Client.InternalConnection.Call(ArchiveX ar, MessageType msgtype)
   at SourceCode.Workflow.Client.InternalConnection.CallFunction(ArchiveX ar)
   at SourceCode.Workflow.Client.Connection.CreateProcessInstance(String ProcName, Int32 Version, String Layer)
   at SourceCode.Workflow.Client.Connection.CreateProcessInstance(String ProcName)
   at SourceCode.Workflow.RuntimeServices.Functions.SharePointServiceFunctions.StartWFIntegrationProcess(String K2Server, String Folio, String MetaDataDetail, String ProcessName, String K2IntegrationDataXml, String ProcessObjectXml, String k2ProcessXML, String ClientUserLogon)
   --- End of inner exception stack trace ---
   at SourceCode.Workflow.RuntimeServices.Functions.SharePointServiceFunctions.StartWFIntegrationProcess(String K2Server, String Folio, String MetaDataDetail, String ProcessName, String K2IntegrationDataXml, String ProcessObjectXml, String k2ProcessXML, String ClientUserLogon)
   at SourceCode.Workflow.RuntimeServices.SharePointService.StartProcess(String k2ServerName, String Folio, String MetaDataDetail, String processName, String k2IntegrationDataXml, String processObjectXml, String k2ProcessXML, String clientUserLogon)


I have given all k2 permissions for user from workspace. Any help. 

Badge +6

Hi Srikanth,


The problem is indicated in the error message: SHAREPOINTSystem does not have rights to Start Process


You said you are inserting the item in SharePoint using ASPX. This web application is not enabled for delegation and it is thus attempting to start the processs as the SharePoint system.


You have 2 options:


1. Give 'Everyone' 'Start' rights to the process


2. Enable you web application for delegation: See http://support.microsoft.com/kb/810572


In a distributed environment you will have to enable K2, SharePoint and your own web application for Kerberos. For K2 see the 'Getting Started Guide'. For SharePoint see this KB: http://blogs.msdn.com/b/martinkearn/archive/2007/04/23/configuring-kerberos-for-sharepoint-2007-part-1-base-configuration-for-sharepoint.aspx


HTH

Reply