If you would like to get completed processes you need to configure history log and then query it.
Moreover you can configure your own event listeners so you can gather what information you need and store it wherever you like.
1 of 1 people found this helpful
Yes, Maciej is right.. I think that the best approach is to decouple those queries from the runtime session. You can directly get the information from the history logs or some custom listener that you can attach to the session to store information in a different storage.