Hi Dojo,
I have an element which tracks other elements in a Dataminer agent and stores their information in a table. If a tracked element is deleted from Dataminer, is it possible to catch the SLNet message (or some other indicator that tracks the deletion of the element) in the connector and run a QAction to reflect the changes? Or do we have to continuously check if the elements tracked continue to exist in the Dataminer system?
Hi Chian,
In your connector you could use 'Monitors' to subscribe on element state changes. This is described on the following page: https://docs.dataminer.services/develop/devguide/ClassLibrary/ClassLibraryMonitorsGettingStarted.html. The page also contains an example of how you can do this.
That’s actually a very good remark! However, a subscription is only created once for the entire DMS, rather than for each individual element.
I’m not sure if you can do this with the Monitors library, but it is possible to create one subscription on all ElementStateEventMessages. This way you only need one subscription.
@Chian
Maybe also add an option to switch to a polling based system in case subscriptions would cause too big of a load on a big system.