Autoclear trap-based alarm

Hi, need some help please.

Problem:
If a trap creates a northbound event, how do I simulate a “clear” based on the occurrence of the originating trap not received after a period of time?

Expected outcome:
This is actually for a Juniper RPM threshold event, however it doesn’t send a “clear” trap when threshold returns to normal. Therefore if the trap is not received for some time, the assumption is that the threshold is cleared and I need to generate a northbound clear event.

OpenNMS version:
TBC

Thanks

Regards
Mark