Introduction

A timeout error occurs when executing a SharePoint SmartObject GetList method within a K2 process.  This only occurs when the SharePoint Document library which the SharePoint SmartObject was created from contains 8000 or more records.  When the GetList method is then executed to return these records, the timeout error may occur.  The Process Instance will go into an error state.

Error Scenario

  1. Create a SharePoint Document library and add 8000 or more records in the Document library.
  2. Create a SharePoint SmartObject of this Document library from the K2 Site Settings menu within SharePoint.
  3. Create a K2 Designer for Visual Studio process where the SmartObject GetList method can be executed.
  4. Deploy the process and start multiple instances of this process.

Error Message


“The operation has timed out”

Resolution

This Hotfix is contained within the latest K2 Update. Install the update package to resolve the error.  The following steps need to be completed in order for this change to take effect.

  1. The SharePoint and SharePoint V2 Service now have a timeout configuration that can be set in the Service Instance Configuration.  The default for this timeout is set to 90 seconds, however for the error scenario described above this needs to be increased to a suitable value.   This can be done in Workspace>Management Console>Workflow Server>SmartObjects>Services.
  2. The following steps will be required:

2.1  From “C:\inetpub\wwwroot\wss\VirtualDirectories\{Your-SharePointWeb-Port}\web.config” open the web.config file and set the timeout to a suitable value in the   following section:
 <configuration>\<system.web>\<httpRuntime executionTimeout=”360”/><!

2.2 From “C:\inetpub\wwwroot\wss\VirtualDirectories\{CA-Port}\web.config”  , open the web.config file and set the timeout to a suitable value in the following section (optional):
<configuration>\<system.web>\<httpRuntime executionTimeout=”360”/><!

2.3 From “C:\ Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\WebServices\SecurityToken\web.config”, open the web.config file and set the timeout to a suitable value in the following section (optional):
<configuration>\<system.web>\<httpRuntime executionTimeout=”360”/><!