fetch task with multiple or condition

Huy Guys *,
To fetch all tasks from history for a given list of process variables, do i can use the or() method. Here is an example of how you can do it:
is it correct?

List<HistoricTaskInstance> historicTasks = historyService.createHistoricTaskInstanceQuery()
    .or()
    .processVariableValueEquals("variable1", value1)
    .processVariableValueEquals("variable2", value2)
    .processVariableValueEquals("variable3", value3)
    .endOr()
    .list();

Hi @Adil

I tried your code and it’s working. so the historyService should be initilized like this:

HistoryService historyService = engine.getHistoryService();

1 Like