Historic Process Instance Date Range Query

Hello there,
I want to query historic process instances with date range. Actually my request is the following: I want all finished process instance in period of month before to current date.

I have tried something like that:

// get default process engine and history service from it...
ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();
HistoryService historyService = processEngine.getHistoryService();

List<HistoricProcessInstance> instanceList = historyService
        .variableValueEquals("var1_key", "var1_value")
        .variableValueEquals("var2_key", "var2_value")

How to include date range here?
Thank you in advance!

Hi @hedza06,

You can add #finishedBefore().

Best regards,


can this two methods be combined?

I think so, is it working for you?

Yes, it works. Thank you :grinning: