A SharePoint SmartObject GetList method created from a Document Library with many records results in a timeout error.

  • 16 February 2021
  • 0 replies
  • 4 views

Badge +9
 

A SharePoint SmartObject GetList method created from a Document Library with many records results in a timeout error.

KB001294

PRODUCT
K2 blackpearl 0807 to 4.6.6
BASED ON
K2 blackpearl 0807
LEGACY/ARCHIVED CONTENT
This article has been archived, and/or refers to legacy products, components or features. The content in this article is offered "as is" and will no longer be updated. Archived content is provided for reference purposes only. This content does not infer that the product, component or feature is supported, or that the product, component or feature will continue to function as described herein.

 

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: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”/><!

 


0 replies

Be the first to reply!

Reply