BDC Issue With Caching Configuration on the Autogenerated Web Service

  • 16 February 2021
  • 0 replies
  • 2 views

Userlevel 5
Badge +20
 

BDC Issue With Caching Configuration on the Autogenerated Web Service

KB000293

PRODUCT
K2 blackpearl
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

The current builds of K2 blackpearl have a known issue with the SharePoint Business Data Catalog (BDC) integration. At the most basic level there is an issue with caching configuration on the autogenerated web service. This issue will be addressed in future releases of K2 blackpearl.

 

 

Error Resolution

This workaround involves manually correcting the auto generated code in the BDC SmartObject web service.
Note: These changes will need to be manually applied to multiple front ends in a load balanced SharePoint farm
Follow the steps below:
  1. Locate the web service application folder on the SharePoint web front end. This location is typically found here:
    C:Program FilesCommon FilesK2 BlackPearlBDC{SmartObjectName}
  2. Navigate to CodeApp_Code directory
  3. Open Service.cs file
  4. Remove the call to Initialise_SmartObjectName() from the static Service method so it looks like this:
    static Service()
    {
    }
  5. Locate the List declaration and make note of the smartObjectNames variable name
    //  Dynamic K2AutoMetaData
    private static List smartObjectNames = new List() ;
  6. Locate the Initialise_SmartObjectName() method and add a .Clear() call for all the variables that match the information from step 5 so that they looks like this:
    // -- Dynamic K2AutoMetaData
    private static void Initialise_TR7Employee()
    {
        smartObjectNames.Clear();
        ...
    }
  7. Add the Initialise_SmartObjectName() call as the first line in every “Get…” WebMethod for the web service. By default there are three of these as indicated here:
    public SmartObjectName[] GetSmartObjectNames(string name)
    {
        Initialise_SmartObjectName(); 
        ...
    }

    public SmartObjectName GetSmartObjectNameByID(string id)
    {
        Initialise_SmartObjectName(); 
        ...
    }

    public string[] GetSmartObjectNameIDs()
    {
        Initialise_SmartObjectName(); 
        ...
    }

The web service will now bring back non-cached data.

Note: Although this workaround is not a high performance option, as it simply bypasses all caching code, it does ensure the latest data at all times.

 


0 replies

Be the first to reply!

Reply