We’ve implemented GetKnownEventTypes with the following code, which creates an event type for each “Group” we have defined in our system:
public override System.Collections.ObjectModel.Collection<VideoOS.Platform.Data.EventType> GetKnownEventTypes(System.Globalization.CultureInfo culture)
{
eventTypes.Clear();
List<Tuple<string, Guid>> groupEventDefinitons = IdentityDisplayer.GetGroupEventDefinitions();
foreach (var entry in groupEventDefinitons)
{
eventTypes.Add(
new EventType()
{
GroupID = RocWatchPluginDefinition.EventGroupId,
ID = entry.Item2,
DefaultSourceKind = RocWatchPluginDefinition.RocWatchPluginKind,
Message = entry.Item1,
SourceKinds = new List<Guid>() { Kind.Camera }
});
}
return eventTypes;
}
The above code works correctly when viewed in the Management Client as we see the expected event types when creating Rule triggers. However, when we remove an entry from the returned eventTypes collection, the event type corresponding to that entry is not removed in the Management Client when creating Rule triggers. Additionally, if we add an entry to the eventTypes collection, the corresponding event type is not added to Rule triggers in the Management Client.
Essentially, after the first time GetKnownEventTypes is called, we cannot update the available Rule triggers in the Management Client until we restart the Event Server. Is there a way to update the available Rule trigger events in the Management Client without restarting the Event Server?