This post is part of the series Forced Root Cause Monitoring via Mashups and Modal Popups
To not feel lost or out of context, it's recommended to read the main post first.
Required Logic
The following logic will help us realizing this particular use case:
- The trigger property on the AlertThing switches from false to true.
- The MashupMain will receive dynamic Property updates via the AlertThing.GetProperties service. It will validate the value of the trigger Property and if it's true the MashupMain will show the MashupPopup as a modal popup. A modal popup will be exclusively in the foreground, so the user cannot interact with anything else in the Mashup except the modal popup.
- In the modal popup the user chooses one of the pre-defined AlertStateDefinitions. When a State is selected, the popup will set the State as a Mashup Parameter, pass this to the MashupMain and the popup close itself.
- When the MashupPopup is closed, the MashupMain will read the Mashup Parameter
- The MashupMain will set the selectedReason in the AlertThing to the selected value. It will also reset the trigger property to false. This allows the property to be set to true again to trigger another forced popup.
- On any value change the AlertThing will store the selectedReason State in a ValueStream to capture historic information on which root causes were selected at which time.
- The ValueStream information will be displayed as a table in a GridWidget in the MashupMain once the new properties have been set.