Notifications#
Notification.Show
A Notification represents an asynchronous alarm.
Notifications are sent to the GUI using a publish/subscribe mechanism. The GUI will display the number of notifications in a notification icon in the status bar. The different severities, colors and display behaviors are configured in the generic table NotificationSeverity.
This Notification Severity is defined by the user and it can target a specific Employee, Role or Everyone. It is possible to filter the visibility of each Notification to a particular Facility, Area, Resource or Steps. Filtering in the GUI is performed against the current user employee Workgroup.
Furthermore, it is also possible to configure the type of tracking and clearance, which can be of three types:
- ManualSingleUser - the first Employee that clears the Alarm will close the Alarm.
- ManualEveryUser - every Employee must clear the Alarm. In this case, a Valid To date must be set.
- Automatic - the system will clear the Alarm automatically once the Valid To date is reached.
There is also the possibility to configure each notification to automatically expand the notifications sidebar when a specific type of notification is received. This behavior can be changed by editing the On New Display Mode field in the Notification Severity generic table, as seen below.
Info
Notifications are part of Alarm Management, which is a Critical Manufacturing optional module.
Integration with Microsoft Teams#
Notifications can be created in MES and sent to an instance of Microsoft Teams through the use of webhooks, requiring minimal configuration. There is one configuration entry that is essential to a proper use of this functionality: /Cmf/System/Notification/Integration/TeamsWebhook, that must contain the webhook to which the MES will send the Notification. To configure the system, follow these steps:
- Open Microsoft Teams and navigate to the team window where you wish to send the Notification. On the top right hand corner of the team window (or on the right hand side of the team name in the left sidebar), press the three dots and from the context menu choose Connectors.
- Select Incoming Webhook and press Configure.
- On the configuration window, select a name for the webhook and press Create.
- Copy the URL for the created webhook.
- Go to the MES, open the Configuration panel under the Administration group. Search for the
/Cmf/System/Notification/Integration/TeamsWebhookentry, edit it and use the value retrieved in the previous point. Save the configuration entry.
- In the Notification section under the Business Data menu, create a new Notification.
- Whenever this Notification is triggered, it will be displayed in Microsoft Teams, within the main chat window of the configured team.
Info
To remove the integration, either delete the webhook from Microsoft Teams or clear the configuration entry from the MES.
There is an alternative way to send notifications to a specific webhook through the use of a DEE action created for this purpose. This will allow the user to adapt the notification and use further conditional and logic statements, as well as gather more data to be sent to the user. The IntegrationEntries system will then trigger the notification for Microsoft Teams. The webhook configuration process should be the same on the receiving end, with the URL of the webhook being used within the DEE itself as a property of the action group BusinessObjects.NotificationCollection.Create.Pre. Here is a simple example below:
UseReference("Cmf.Navigo.BusinessObjects.dll", "Cmf.Navigo.BusinessObjects.AlarmManagement");
UseReference("Cmf.Foundation.BusinessObjects.dll", "Cmf.Foundation.BusinessObjects");
UseReference("Cmf.Navigo.BusinessObjects.dll", "Cmf.Navigo.BusinessObjects");
UseReference("Cmf.Foundation.BusinessOrchestration.dll", "");
UseReference("", "Cmf.Foundation.Common.Exceptions");
UseReference("", "Cmf.Foundation.Common");
UseReference("", "Cmf.Navigo.Common");
var serviceProvider = (IServiceProvider)Input["ServiceProvider"];
((INotificationCreateOptions)Input["NotificationCreateOptions"]).CanExecute = true;
((INotificationCreateOptions)Input["NotificationCreateOptions"]).TeamsEndpoint = "[INSERT_WEBHOOK_URL_HERE]";
INotification not = serviceProvider.GetService<INotification>();
not.Name = "TestNotification";
IMaterial material = null;
if (Input.ContainsKey("Material"))
{
material = (IMaterial)Input["Material"];
}
not.Details = "Material " + material?.Name + " has been processed";
not.Create();







