The ANNotificationList.InstanceEvent() event handler returns an ANInstanceEvent arg, which contains an ANInstanceEvent.ID that can be used to retrieve an ANInstance object that has the full information on instance, including whether the instance is active or not. However, the ANInstanceEvent.Action has a state called NotificationEndedNew, which I believe occurs when a new condition has fired creating a new instance,ending the previously active instance. Is that correct?
If so, does the ANInstanceEvent.ID correspond to the new instance that just started or the one that ended?
If it corresponds to the one that just started then how can I retrieve the ID of the instance that just ended? Can I safely subtract 1 from the ANInstanceEvent.ID or are there corner cases where that assumption fails?