Here is the usecase:
I have a application that creates services which are basically events and elements with parameter to monitor.
I store the service and event details in DOM.
Every time when there is a update on element from live device, i want to update the element present in service also. For this I have a scheduler, which takes the service data from DOM and refresh/updates for every two minutes.
var addServiceMessage = new AddServiceMessage
{
DataMinerID = service.ServiceInfo.DataMinerID,
HostingDataMinerID = service.ServiceInfo.HostingAgentID,
Service = service.ServiceInfo,
};
_engine.SendSLNetSingleResponseMessage(addServiceMessage);
above is the current code i use for the process.
since this is AddServiceMessage, everytime the scheduler runs, i see service edited information log in data cube.
Sometimes there wont be anything to edit(there is no change in backend), it will only be refresh.
In this case also i see service edited information log in data cube.
Is there any way to not edit the service everytime?
also is there any alternative for AddServiceMessage? It doesnt look appropriate for the operation i want to do.
Hi Baranisudha,
The AddServiceMessage can be used not only to add services, but also to update them.
When using it to update a service, you will always get Edited information events, even if no actual changes were made to the service. This happens because (at least) the 'Modified' property in the corresponding Service.xml configuration file is updated with the timestamp of the most recent refresh.
I see you've created a separate question regarding alternatives to the AddServiceMessage for your use case, so it's best to continue addressing that part of your inquiry there: Any alternative way to updated elements inside the service? - DataMiner Dojo.