Adding a 3rd Party Server to the Notification Event subsystem
K2 Notification Event - Adding a 3rd Party Server to the Notification Event
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

Fig. 1. Notification Event architecture including 3rd party server
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. 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 blackpearl Notification Event Object Browser, an object browser component need to be developed to display the objects, events and properties of the newly added system. This object browser component need to implement the ObjectBrowser interface.

Fig. 2. 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.

Fig. 3. Object Browser in 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 blackpearl version 4.6.9, a number of configuration files have been consolidated into a single configuration file to simplify the management of configuration settings. The SourceCode.Eventbus.Mapping.dll.config and SourceCode.Eventbus.Server.config have been consolidated into the K2HostServer.exe.Config file, which is located in the \K2 blackpearl\Host Server\Bin folder on the K2 Server.The connection strings previously stored in these files are now retrieved from the K2HostServer.exe.Config file.

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

Fig. 5. SourceCode.EventBus.Server.config
In K2 blackpearl version 4.6.9, a number of configuration files have been consolidated into a single configuration file to simplify the management of configuration settings. The SourceCode.Eventbus.Server.config have been consolidated into the K2HostServer.exe.Config file, which is located in the \K2 blackpearl\Host Server\Bin folder on the K2 Server.The connection strings previously stored in these files are now retrieved from the K2HostServer.exe.Config file.