SharePoint 2013

For updated and additional information on integration and compatibility of versions of K2 with SharePoint, please refer to the Product Compatibility, Integration and Support Matrix.

The SharePoint 2013 Service Type is used to integrate with SharePoint via the client side object model (CSOM) and REST services to query and update SharePoint lists and libraries. This service type forms the foundation of integration between K2 and SharePoint Online/2013 and later.

K2 uses two Service Types for integrating with SharePoint Online/2013 and later:

For the purposes of this topic, we will focus only on the K2 SharePoint Service Type.

A Service Instance of the SharePoint service is created and configured automatically when installing the K2 for SharePoint App on a SharePoint site collection. Additional Service Instances will be created for each new site collection that is integrated with K2
You cannot manually register, refresh, modify or delete service instances for the SharePoint service types (unless directed by K2 support to do so). You must use the K2 for SharePoint App registration wizard to create and manage Service Instances.

Service Authentication

OAuth is the only supported Authentication Mode for the SharePoint Service Brokers. The necessary configuration to enable OAuth is performed when you register the App in a SharePoint site, which is one of the main reasons a service instance cannot be manually created. The authentication uses either a high-trust, server to server (S2S) token for on-premises SharePoint servers, or a standard token along with an Azure AD token for SharePoint Online servers.

To allow the K2 server to integrate with SharePoint outside of the context of a user (for example when a workflow executes a SmartObject that points to a list in SharePoint), an administrative OAuth token is generated at the time of registration, which happens on the app catalog. The site collections served by that app catalog all use the same Administrative OAuth token, however the instances of the SharePoint broker are based on the site collection.

As part of the Service Registration , you can see the resources that K2 creates to enable the authentication and integration.

Service Keys (Service Instance Configuration Settings)

Creating instances of this service is automatically done as part of the K2 for SharePoint Registration Wizard. The table below is provided for informational purposes only, contact K2 support if you need to make changes to the existing service instance's configuration.

Key Data Type Sample Value Notes
Admin Site URL Uri for the administration site. http://dlx:44544/default.aspx (Only applies to on-premises) this will expose the administration site as a SmartObject for things like site templates.
Default Locale ID Number 1033 for English The Locale ID is set to identify the culture and language used by windows to display information.
Describe sub sites True or False When set to True, sub sites will be shown in the service instance if False they will not be displayed. The default is False.
Dynamic True or False False (Required) Reserved for future functionality.
Excluded Fields XML

<fields>
<property name='TypeAsString' operator='equals' value='MediaFieldType' />
<property name='TypeAsString' operator='equals' value='Overbook' />
</fields>

The property allows you to specify an override for which Fields must be excluded on your SmartObjects.
Excluded Lists XML

<lists>
<property name='BaseTemplate' operator='equals' value='100' />
<property name='BaseTemplate' operator='equals' value='101' />
</lists>

The property allows you to specify an override for which Lists must be excluded on your SmartObjects.
Include Hidden Libraries True or False When set to True, all Service Objects based on the hidden libraries in the SharePoint site will be exposed, provided the user has sufficient permissions in SharePoint. The default value is False.
Include Hidden Lists True or False Taxonomy Hidden List User Information List When set to True, all Service Objects based on the hidden lists in the SharePoint site will be exposed, provided the user has sufficient permissions in SharePoint. The default value is False.
Included Fields XML

<fields> <property name='TypeAsString' operator='equals' value='MediaFieldType' /> <property name='TypeAsString' operator='equals' value='Overbook' /> </fields>
<Fields>
<list name="TypeAsString" value="BusinessData" />
<list name="TypeAsString" value="ContactInfo" />
</Fields>

The property allows you to specify an override for which Fields must surface in the SmartObjects.
Included Lists XML

<lists>
<property name='BaseTemplate' operator='equals' value='100' />
<property name='BaseTemplate' operator='equals' value='101' />
</lists>
<Lists>
<list name="BaseType" value="102" />
<list name="BaseType" value="108" />
</Lists>

The property allows you to specify an override for which lists you want to surface in your SmartObject layer. This includes custom lists.
Office 365 True or False If connecting to SharePoint On-premises, this field must be set to False. If the value is set to True, it will indicate the URL is a SharePoint Online site.
Site Url Http or Https link https://portal.denallix.com (Required) The local or cloud SharePoint site URL against which the instance is registered and from where the Service Objects are to be exposed. The default value is HTTP://
Parse Lookup Field Values True or False When set to True, this will parse the Lookup Field values in SharePoint. The default value here is True. In SharePoint, the number of Lookup Field values is limited to 8 (Refer to http://support.microsoft.com/kb/2489707 for more information).
Throttle Documents Number (Required) The number of results that can be returned in a user query. The default value is 50. (changing the number of returned results will have an impact on performance).
Throttle List Items Number (Required) The number of results that can be returned in a user query. The default value is 2000. (changing the number of returned results will have an impact on performance).
Use Internal Field Names True or False When set to False, the Service Object schema properties display names will be 'Display' names. When set to True, the property names displayed will be System names. The default value is False (Display names).
Service Time Out Time intervals in milliseconds (Required) Service registration time out. The default value is 120000ms (If increased this will allow for service to wait longer before it times out, this will be helpful if the connection to SharePoint is slow).

Service Objects

When SmartObjects are created for the Service Instance, they are organized within the following categories:

If the K2 for SharePoint App is added to a subsite of the site collection, it is added to the service instance that already exists for the site collection. The structure of the artifacts generated, such as SmartObjects, View, Forms, Workflows and Reports, follows the structure of the site collection. For example, if you have a subsite called Subsite1 that is a child of your root site, and created a subsite under Subsite1 called Subsite1-1, when you add the K2 for SharePoint app to Subsite1-1 and generate at least a data app for the Documents library on Subsite1-1, the following structure is created automatically

Sorting and paging may only be used on the following SmartObject methods:

  • Get List Items
  • Get List Items with Method Options
  • Get Documents Metadata With Options
  • Get Documents Metadata
  • Get Document Sets

The tables below describe some of the commonly-used Service Object Methods for this service.

SmartObjects

K2 generates SmartObjects for these Service Objects when you create Data for a K2 application in SharePoint. To generate SmartObjects for a specific List or Library, browse to the library, click the K2 Application button, and then makes sure Data is selected. This refreshes the service instance and generates the SmartObject in the corresponding category that mimics the structure of your site collection.

If you do not need these SmartObjects to show up in the browser-based workflow design tools, select None in the Allow this SmartObject to be used in Workflow for this setting. Selecting This site and all of its subsites allows the SmartObject to appear in the browser-based workflow designer when designing workflows on sites that are direct descendants of the site.

  • If you do not need these SmartObjects to show up in the designer (for use in workflows) you can select None. Note that selecting This site and all of its subsites allows the SmartObject to appear in the designer when designing workflows on sites that are direct descendants of the site.
  • You can also use the SmartObjects link from the K2 for SharePoint Settings page to generate multiple SmartObjects at a time for selected Lists or Libraries in the Site. This is especially helpful if you need to use data from other lists and libraries on your site but do not need to create additional artifacts, such as Views, Forms, Workflows and Reports, for those lists and libraries

    Finally. designers can also use the SmartObject design tools to build advanced SmartObjects that leverage the Service Objects in this service.

    Considerations