Exception Message Configuration

The MSI interface is also capable of generating exception messages. This Message is independent from any qualifiers but may include data which allows to assign an exception to a running EBR.

The layout of the exception message is predefined by the MSI standard and needs no further configuration. However, the exceptions within the exception message need to be created. Since many exceptions can occur during a short amount of time, the exceptions are not being read from tags but from a message queue. The ID of this message queue is predefined, but the object, to which this message queue is attached, can be configured in the Message Configuration.

Exception Message
Figure 1. Exception Message

In this example a Message Processor is configured as the exception provider and exceptions are being read from a message queue attached to the Message Processor. The following Lua code shows how exceptions can be created and placed in the message queue of the exception provider:

local JSON= require("rapidjson")
local MSI = require('mbro-msi')
local exProviderObj = syslib.getobject("/System/Core/MSIMessageBroker/MSIMessageProcessor")
local exProviderId = exProviderObj:numid()
local ex_queue_id = syslib.msgqueue(exProviderId, MSI.EXCEPTION_SLOT)

local exception = JSON.encode({
                        causedAt = "2020-11-28 12:20:00,000",
                        systemDescription = "inmation test system",
                        userDescription= "Exception",
                        exceptionComment = {{changeDate="2020-11-28 12:30:00,000",
                                            user= "me"
                                          {changeDate="2020-11-28 12:40:00,000",
                                            commentText="Found it",
                                            user= "me"
syslib.msgpush(ex_queue_id, exception)

Using Central Mapping

The 'Exception Messages' are currently not linked to the Central Mapping Table, but the individual objects creating and handing over the events to the message queue can have a link to the Message Processor and by that have access to the Central Mapping Table.