Adding a 3rd Party Server to the Notification Event subsystem

This content applies to legacy components (such as K2 Studio and K2 for Visual Studio), legacy assemblies and APIs, legacy services or other legacy functionality. These legacy items may not be available, supported, or behave as described, in future updates or versions of K2. Please see the legacy component and API support policies for more information about support for these components

A 3rd party server such as SAP or Salesforce can be added to the Notification Event structure allowing the execution of events on these 3rd party servers to be recorded, and the appropriate notification generated from the Event database. To add a 3rd party server the following will be required:

  • Develop a Custom Event Recorder with an interface between the server and recorder
  • Develop the Object Browser to surface your objects, events and properties and register it in the web.config file
  • Develop a Resolver to resolve your properties or data fields from the context of your event

 

Server Recorder

The server will require a Server Recorder and an interface between the server and the recorder. The Server Recorder and Interface components are developed separately i.e. they must be developed as custom components. The IMSMSQSource.cs must be configured with the new recorder and interface details. 

Object Browser

To display the new server data structure in the K2 Notification Event Object Browser, an object browser component needs to be developed to display the objects, events and properties of the newly added system. This object browser component needs to implement the ObjectBrowser interface. This image shows the object browser in Workspace, displaying the K2 Workflow and SmartObject data.

Add the new server and interface details to the <eventbusobjectbrowsers> section on the Workspace Site web.config file.
Web.config

Resolver and Data Provider

A method of resolving messages must be added for the new server. e.g. Value Type Resolver or xml Resolver. To enable the resolving of data a data resolver as well as a data provider need to be created. The data provider is used generate runtime data, to be used by your associated data resolver at runtime to resolve the data value. The data provider need to implement the SourceCode.Framework.Data. RuntimeDataProviderBase interface, and the resolver need to implement the SourceCode.Framework.Data. RuntimeDataResolverBase interface.The Resolver interface must be updated in the SourceCode.EventBus.mapping.config file under the Resolver section as shown below:

In K2 version 4.6.9, a number of configuration files were consolidated into a single configuration file to simplify the management of configuration settings. The SourceCode.EventBus.Assemblies.config file has been consolidated into the K2HostServer.exe.Config file, which is located in the "%PROGRAMFILES%\K2\HostServer\Bin" folder on the K2 Server. The connection strings previously stored in this file are now retrieved from the K2HostServer.exe.Config file.

SourceCode.EventBus.mapping.config

The Data Resolver must be updated in the SourceCode.EventBus.Server.config file shown below:
SourceCode.EventBus.Server.config file

See also: How to add a 3rd-party event recorder to the K2 Server