use of org.activiti.api.task.model.impl.TaskImpl in project Activiti by Activiti.
the class TaskAdminRuntimeImpl method complete.
@Override
public Task complete(CompleteTaskPayload completeTaskPayload) {
Task task = task(completeTaskPayload.getTaskId());
if (task == null) {
throw new IllegalStateException("Task with id: " + completeTaskPayload.getTaskId() + " cannot be completed because it cannot be found.");
}
taskRuntimeHelper.handleCompleteTaskPayload(completeTaskPayload);
TaskImpl competedTaskData = new TaskImpl(task.getId(), task.getName(), Task.TaskStatus.COMPLETED);
taskService.complete(completeTaskPayload.getTaskId(), completeTaskPayload.getVariables(), true);
return competedTaskData;
}
Aggregations