assertNotNull("Historic task " + historicTaskInstance.getTaskDefinitionKey() + " has no process definition id", historicTaskInstance.getProcessDefinitionId()); assertNotNull("Historic task " + historicTaskInstance.getTaskDefinitionKey() + " has no task definition key", historicTaskInstance.getTaskDefinitionKey()); assertNotNull("Historic task " + historicTaskInstance.getTaskDefinitionKey() + " has no create time", historicTaskInstance.getCreateTime()); assertNotNull("Historic task " + historicTaskInstance.getTaskDefinitionKey() + " has no start time", historicTaskInstance.getStartTime()); assertNotNull("Historic task " + historicTaskInstance.getTaskDefinitionKey() + " has no end time", historicTaskInstance.getEndTime());
private TaskInfoBean transToTaskInfoBean(HistoricTaskInstance task) { TaskInfoBean taskInfoBean = new TaskInfoBean(); taskInfoBean.setTaskDefinitionKey(task.getTaskDefinitionKey()); taskInfoBean.setFormKey(task.getFormKey()); taskInfoBean.setProcessDefinitionId(task.getProcessDefinitionId()); taskInfoBean.setProcessInstanceId(task.getProcessInstanceId()); taskInfoBean.setTaskName(task.getName()); taskInfoBean.setTaskId(task.getId()); taskInfoBean.setAssigneeId(task.getAssignee()); taskInfoBean.setTaskCreateTime(task.getCreateTime()); taskInfoBean.setTaskEndTime(task.getEndTime()); taskInfoBean.setTaskOwner(task.getOwner()); HistoricProcessInstance historicInstance = historyService.createHistoricProcessInstanceQuery().processInstanceId(task.getProcessInstanceId()).includeProcessVariables().singleResult(); taskInfoBean.setItemsName(historicInstance.getProcessDefinitionName()); taskInfoBean.setVariables(historicInstance.getProcessVariables()); return taskInfoBean; }
assertNotNull("Historic task " + historicTaskInstance.getTaskDefinitionKey() + " has no process definition id", historicTaskInstance.getProcessDefinitionId()); assertNotNull("Historic task " + historicTaskInstance.getTaskDefinitionKey() + " has no task definition key", historicTaskInstance.getTaskDefinitionKey()); assertNotNull("Historic task " + historicTaskInstance.getTaskDefinitionKey() + " has no create time", historicTaskInstance.getCreateTime()); assertNotNull("Historic task " + historicTaskInstance.getTaskDefinitionKey() + " has no start time", historicTaskInstance.getStartTime()); assertNotNull("Historic task " + historicTaskInstance.getTaskDefinitionKey() + " has no end time", historicTaskInstance.getEndTime());