审批意见保存在ACT_HI_COMMENT
表中
审批状态保存在ACT_HI_VARINST
表中,为任务变量
public List<ApprovalEntity> getHistoryTaskByTaskId(String taskId){
HistoryService historyService = this.getHistoryService();
TaskService taskService = this.getTaskService();
HistoricTaskInstance historicTaskInstance = historyService.createHistoricTaskInstanceQuery().taskId(taskId).singleResult();
String processInstanceId = historicTaskInstance.getProcessInstanceId();
List<HistoricTaskInstance> historicTaskInstanceList = historyService.createHistoricTaskInstanceQuery()
.processInstanceId(processInstanceId).orderByTaskCreateTime().asc().list();
List<ApprovalEntity> approvalEntityList =