Hi Suman,
Best way would be using PCo as kind of middle layer to the data source and then configuring this eventing you need in the PCo.
PCo has this notification functionality where you can send messages to MII transaction and then have this logic to send the data to ECC in this MII transaction.
Do you have PCo?
If not then you could use this approach:
Basically you have keep a flag which stores whether the notification is already sent or not.
You can use MDO for this.
Create a persistent MDO and store this flag in this MDO.
When you query the datasource and get the value which shows that the unit is unoperational, then check the flag in the MDO(using MDO query) whether the notification is already sent to ECC or not and then only decide whether to sent the notification to ECC.
When you get the correct value for the unit then update the flag in the MDO(using MDO Query) to false so that the next time value is 0 , the notification is sent to ECC.
Clarifications:
1) Using this MDO approach you could set the flag so that the message is sent only once.
2) I am not sure whether data sources have control flag. But using PCo would solve this problem.
3) Though the scheduler will run everytime but this MDO flag approach would not sent notification to ECC each and every time.
4) Yes, if you use this MII pull approach then you would have to query the data source each and every time.
that is why using PCo would be good solution as then it would be a push from PCo side.
Regards,
Rohit Negi.