Hi @ELopes, welcome to the Zeebe Community!
You can do it with Elastic Search (ES), but I don’t know how to query it. Someone else may have that at their fingertips.
There is Node package for Zeebe that queries ES: https://github.com/VilledeMontreal/workit/tree/master/packages/zeebe-elasticsearch-client.
You can use an exporter and listen to the events that signal the creation and completion of workflow instances. Then you maintain that in a state store outside Zeebe. This is how Simple Monitor (SM) does it.
I don’t have time to do this for you right now, but here is how I would approach this:
- Read the Simple Monitor source to see what workflow event records listens to in order to get the current state.
- Look at the Elastic Search exporter source to see how it constructs the exported representation of the workflow event records.
- Either: use a similar approach to SM with the Hazelcast exporter; or write a query over Elastic Search that effectively streams the workflow events and allows you to build the current state.