Hi,
Is there a way to fetch completed user tasks using task query in bproc? We need to implement some sort of outbox or user task history for reference purposes.
Hi,
sure, in BProc we have BprocHistoricService
, which allows to create queries for fetch historical data, and certainly you can use it for fetch taskData, as example
List<TaskData> tasks = bprocHistoricService.createHistoricTaskDataQuery()
.finished()
.taskAssignee(user.getId())
.orderByProcessInstanceId().desc()
.orderByDueDateNullsFirst().asc()
.list();
See also com.haulmont.addon.bproc.query.HistoricTaskDataQuery
and com.haulmont.addon.bproc.query.TaskInfoDataQuery
which allow to configure your taskQuery.