A SharePoint SmartObject GetList method created from a Document Library with many records results in a timeout error.
KB001294
PRODUCT
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
- Create a SharePoint Document library and add 8000 or more records in the Document library.
- Create a SharePoint SmartObject of this Document library from the K2 Site Settings menu within SharePoint.
- Create a K2 Designer for Visual Studio process where the SmartObject GetList method can be executed.
- 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.
- 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.
- The following steps will be required:
2.1 From “C:inetpubwwwrootwssVirtualDirectories{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:inetpubwwwrootwssVirtualDirectories{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 FilesCommon FilesMicrosoft SharedWeb Server Extensions14WebServicesSecurityTokenweb.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”/><!