Custom notification channel

Custom notification channel updates in v10

Published on : Aug 10, 2021

Category : BizTalk360 Update

Senthil Kumar

Author

Introduction

BizTalk360 version 10 is a major release of the product with UI refresh, improved user experience, new features, and improvements. Monitoring is one of the core pillars of the BizTalk360, the engineering team constantly brings new features and improvements in the monitoring section. An important change in the product is the rewrite of the client-side Knock out framework to the Angular framework. This architectural change will provide the scalability to adopt the latest technology for the next 8 to 10 years.

Custom Notification Channels (v10)

BizTalk360 can trigger notifications with the in-built custom notification channels like Microsoft Teams, Slack, Service Now, SMTP and PowerShell. The users have the option to create their custom notification channel, to meet the business requirement. In version 10, the custom notification channel feature UI has improved the user experience with the new card layout. This provides different options that can be managed in a single view.

As highlighted above, a change in the client-side framework migration to Angular has an impact on the custom notification channel configuration as well. In the previous version of BizTalk360, Custom Notification configurations are stored in XML Format in the database. 

Dynamic Controls

Angular Formly can generate dynamic form controls and bind the values with the JSON properties. To be able to render the dynamic UI controls, the XML Format needs to be converted to JSON Format in the client-side script. Using the XML format in the notification channel configuration causes a performance issue while converting XML to JSON. It leads to maintainability issues of the different formats on the client and server-side.

Custom notification channel

To overcome this challenge, in the latest version (10.0) of the BizTalk360 custom notification channel configurations are converted to JSON Format. This has an impact on the existing notification channel configuration. There are two scenarios in which notification channel migrations needs to be handled. Those scenarios are:

  • Inbuilt Notification Channels
  • Custom Notification Channels

Inbuilt Notification Channels

For the Inbuilt notification channels, the migration has been handled automatically in the application. Conversation of XML Format to JSON format has been handled in the Initial Onboarding API call. Users can make sure the notification channel configurations are successfully migrated to JSON format in the following BizTalk360 tables:

  • b360_alert_notify_GlobalNotificationChannel
  • b360_alert_notify_AlarmNotificationChannel

The Global notification channel table’s columns (GlobalPropertiesSchema and AlarmPropertiesSchema) hold the JSON Data.  Similarly, the Alarm notification channel table column “AlarmPropertiesXML” should be converted into JSON.

To support the existing configuration works smoothly after upgrade to the latest version, in BizTalk360, migration scenarios are handled in the API service call Initial Onboarding. During the first load of the User interface the “InitialOnBoarding” API Call is invoked to do the migration process. On successful migration, we can see an entry in the table b360_admin_DBMigration_Status about the Notification channel configuration migration “NOTIFICATION_CHANNEL_CONFIGURATION_10.0” and the message “Notification Channel configuration has been successfully migrated.

On the successful migration of the “notification channels”, BizTalk360 can continue to use the existing configuration.

Custom Notification Channels

The users who created their own custom notification channels must take this migration path. The steps will help you to migrate the custom notification channel to the newer version are:

  1. Convert the existing Global properties and Alarm properties to JSON format as the steps in this Use this GitHub project to migrate the notification channel configurations
  2. Build your custom notification channel project solution and take the latest dll
  3. Reconfigure the custom notification channel that you are migrating by uploading the latest assembly file

ServiceNow Channel

Let’s take the ServiceNow notification channel as an example, to understand how users can create the custom notification channel in the latest version.

Global Properties

Define the notification channel global properties in Json format with important ServiceNow entities like:

  • ServiceNow Instance
  • Authentication (User Credentials)
  • Notification Settings (Error & Warnings)
  • Proxy Settings

The structure of the Json Schema properties are defined as:

  • Required properties: name, displayName, isMandatory, type (controls like text box)
  • Optional properties: tooltip, items, placeholder
  •              {
    			"name": "servicenowurl",
    			"displayName": "ServiceNow URL",
    			"isMandatory": "true",
    			"tooltip": "The instance where the incidents should be created.",
    			"type": "input",
    			"items": [],
    			"placeholder": "https://dev.service-now.com" 
    		}
    

Alarm Properties

As like Global properties, the Alarm schema has been defined with the following properties:

  • Short Description
  • Impact
  • Urgency
  • Assignment Group
  • Category
  • Subcategory
  • Configuration Item
  • Additional Comments
Custom notification channel

The Alarm Json schema has been constructed with name, displayName, isMandatory, disabled, defaultValue and type

{
		"name": "urgency",
		"displayName": "Urgency",
		"isMandatory": "true",
		"disabled": "false",
		"defaultValue": "false",
		"type": "input",
		"maxLength": "1000",
		"items": []
	}

API Service

In a C# Service, the ServiceNow Notification channel must implement the interface IChannelNotification. This Interface is defined with the following methods:

  • string GetGlobalPropertiesSchema();
  • string GetAlarmPropertiesSchema();
  • bool SendNotification(BizTalkEnvironment environment, Alarm alarm, string globalProperties, Dictionary<MonitorGroupTypeName, MonitorGroupData> notifications);
  • T GetSettings(List<CustomNotificationChannel> channelSettings);

In the custom notification channel, these methods must be implemented in the service of Service Now. The Send Notification method can take care of pushing notifications about the monitoring status of alarms to ServiceNow as an incident. Based on the notification channel configuration (like Errors & Warning) the monitoring status can be delivered. Users have the preference to send the notification via a proxy server.

You can view the full source code of ServiceNow Notification Channel.

Conclusion

The insights provided in this article help you to create custom notification channel in the latest version of BizTalk360. The users can extend or modify custom notification channels based on the business use case.  You can raise the features requests in the feedback portal.

Try our latest version of the BizTalk360 version 10. Happy Integration!