Search in sources :

Example 1 with HistoricTaskInstance

use of org.flowable.engine.history.HistoricTaskInstance in project plumdo-work by wengwh.

the class TaskRecoverResource method recoverTask.

@RequestMapping(value = "/task/{taskId}/recover", method = RequestMethod.PUT, name = "任务回收")
@ResponseStatus(value = HttpStatus.OK)
@Transactional(propagation = Propagation.REQUIRED)
public List<TaskResponse> recoverTask(@PathVariable("taskId") String taskId, @RequestBody(required = false) TaskActionRequest actionRequest) {
    List<TaskResponse> responses = new ArrayList<TaskResponse>();
    HistoricTaskInstance historicTaskInstance = getHistoricTaskFromRequest(taskId);
    /*List<Task> tasks = taskExtService.recoverTask(historicTaskInstance.getId());

	    for(Task nextTask : tasks){
	    	TaskExt taskExt = taskExtService.getTaskExtById(nextTask.getId());
	 		responses.add(restResponseFactory.createTaskResponse(taskExt));
	    }*/
    return responses;
}
Also used : HistoricTaskInstance(org.flowable.engine.history.HistoricTaskInstance) ArrayList(java.util.ArrayList) TaskResponse(com.plumdo.flow.rest.task.TaskResponse) ResponseStatus(org.springframework.web.bind.annotation.ResponseStatus) RequestMapping(org.springframework.web.bind.annotation.RequestMapping) Transactional(org.springframework.transaction.annotation.Transactional)

Aggregations

TaskResponse (com.plumdo.flow.rest.task.TaskResponse)1 ArrayList (java.util.ArrayList)1 HistoricTaskInstance (org.flowable.engine.history.HistoricTaskInstance)1 Transactional (org.springframework.transaction.annotation.Transactional)1 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)1 ResponseStatus (org.springframework.web.bind.annotation.ResponseStatus)1