use of org.camunda.bpm.engine.rest.hal.HalResource in project camunda-bpm-platform by camunda.
the class HalTaskList method fromTaskList.
public static HalTaskList fromTaskList(List<Task> tasks, long count) {
HalTaskList taskList = new HalTaskList();
// embed tasks
List<HalResource<?>> embeddedTasks = new ArrayList<HalResource<?>>();
for (Task task : tasks) {
embeddedTasks.add(HalTask.fromTask(task));
}
taskList.addEmbedded("task", embeddedTasks);
// links
taskList.addLink("self", fromPath(TaskRestService.PATH).build());
taskList.count = count;
return taskList;
}
Aggregations