Controller
@PostMapping("/trunTaskActivati")
@ApiOperation(value = "依据TaskID,userId转办", httpMethod = "POST", notes = "依据TaskID,userId转办")
@ResponseBody
public ResponseVo trunTask(String PROCINSTID, String userId){
jbpmProcessinstanceService.trunTask(PROCINSTID,userId);
return new ResponseVo<>();
}
Service
public void trunTask(String PROCINSTID, String userId) {
activitiInstanceService.trunTask(PROCINSTID, userId);
}
public void trunTask(String PROCINSTID, String userId) {
String taskId = this.getTasks(PROCINSTID);
ProcessEngines.getDefaultProcessEngine().getTaskService().setAssignee(taskId, userId);
ProcessEngines.getDefaultProcessEngine().getTaskService().setOwner(taskId, userId);
}