Emitting Process Instance status change events

Is there a way to get a list of process instance ids and process definition names for:

  • List item

All active process instances that were last updated since some UTC timestamp.
All suspended process instances that were last updated since some UTC timestamp.
All active process instances with an incident that were last updated since some UTC timestamp.
All externally terminated process instances that were last updated since some UTC timestamp.
All internally terminated process instances that were last updated since some UTC timestamp.

I don’t care when the process instances were started, when the last activity occurred, when they finished etc. What need to know is which changed since the last time I looked (by change I mean became active, suspend, errorred out, completed normally or were cancelled (deleted)).

I need to emitted status updates regarding these events via a message bus (like RabbitMQ / SQS or SNS) to interested micro-services so that they can update status info in their databases.

The only way appears to be polling the REST API every few seconds perhaps to see what’s changed since the last poll. Unfortunately - there’s no “last update” argument available. So I might be stuck having to query the Camunda database directly for this perhaps.

We are treating Camunda as a black box workflow engine - really don’t want to tinker with its code to enable easily upgrading it and avoid introducing defects.

Any thoughts on how to pull this off?