Search in sources :

Example 1 with TaskDto

use of org.camunda.bpm.engine.rest.dto.task.TaskDto in project camunda-bpm-platform by camunda.

the class TaskRestServiceImpl method queryTasks.

@Override
public List<TaskDto> queryTasks(TaskQueryDto queryDto, Integer firstResult, Integer maxResults) {
    ProcessEngine engine = getProcessEngine();
    queryDto.setObjectMapper(getObjectMapper());
    TaskQuery query = queryDto.toQuery(engine);
    List<Task> matchingTasks = executeTaskQuery(firstResult, maxResults, query);
    List<TaskDto> tasks = new ArrayList<TaskDto>();
    for (Task task : matchingTasks) {
        TaskDto returnTask = TaskDto.fromEntity(task);
        tasks.add(returnTask);
    }
    return tasks;
}
Also used : Task(org.camunda.bpm.engine.task.Task) TaskQuery(org.camunda.bpm.engine.task.TaskQuery) ArrayList(java.util.ArrayList) TaskDto(org.camunda.bpm.engine.rest.dto.task.TaskDto) ProcessEngine(org.camunda.bpm.engine.ProcessEngine)

Aggregations

ArrayList (java.util.ArrayList)1 ProcessEngine (org.camunda.bpm.engine.ProcessEngine)1 TaskDto (org.camunda.bpm.engine.rest.dto.task.TaskDto)1 Task (org.camunda.bpm.engine.task.Task)1 TaskQuery (org.camunda.bpm.engine.task.TaskQuery)1