AnsweredAssumed Answered

Query for completed task and display them on page

Question asked by pylady on Sep 19, 2013
Latest reply on Sep 20, 2013 by trademak

I want to get completed  tasks between two dates, so I have a query that looks like this one:

HistoryService historyService = processEngine.getHistoryService();
NativeHistoricTaskInstanceQuery taskQuery = historyService.createNativeHistoricTaskInstanceQuery();
ManagementService managementService = processEngine.getManagementService();
taskQuery.sql("SELECT * FROM " + managementService.getTableName(HistoricTaskInstance.class) + " WHERE start_time_>=#{startTime} AND end_time_<=#{endTime}");
taskQuery.parameter("startTime", startTime).parameter("endTime", endTime);
List<HistoricTaskInstance> tasksCompleted = taskQuery.list();

I'm using Alfresco 4.2d and I want to display this list of historicTaskInstances, with its parameters like "type" or "completionDate", on my jsp page.
Can anybody give me a suggestion on how to do this?

I'm a newbie and I would appreciate any help!
Thanks in advance,