We have a scenario in which we need to check the status of different devices and create an event "completed". We need to check the history of events and check the status of different devices if any of them are in "stop" status. how can we check the history of events?
Devices - D1, D2, D3, D4
Each device will have status "start" and "stop". If all the devices are in "stop" stage then I should trigger new event "completed". If any of the devices are in "start" stage we shouldn't trigger "completed" event. For this, we need to know about the past events. how can we do this?
Please help.