if (historicTaskInstances != null && historicTaskInstances.size() > 0) { for (HistoricTaskInstance historicTaskInstance : historicTaskInstances) { assertEquals(processInstanceId, historicTaskInstance.getProcessInstanceId()); assertNotNull("Historic task " + historicTaskInstance.getTaskDefinitionKey() + " has no start time", historicTaskInstance.getStartTime()); assertNotNull("Historic task " + historicTaskInstance.getTaskDefinitionKey() + " has no end time", historicTaskInstance.getEndTime());
if (historicTaskInstances != null && historicTaskInstances.size() > 0) { for (HistoricTaskInstance historicTaskInstance : historicTaskInstances) { assertEquals(processInstanceId, historicTaskInstance.getProcessInstanceId()); if (historicTaskInstance.getClaimTime() != null) { assertNotNull("Historic task " + historicTaskInstance.getTaskDefinitionKey() + " has no work time", historicTaskInstance.getWorkTimeInMillis()); assertNotNull("Historic task " + historicTaskInstance.getTaskDefinitionKey() + " has no process instance id", historicTaskInstance.getProcessInstanceId()); assertNotNull("Historic task " + historicTaskInstance.getTaskDefinitionKey() + " has no execution id", historicTaskInstance.getExecutionId()); assertNotNull("Historic task " + historicTaskInstance.getTaskDefinitionKey() + " has no process definition id", historicTaskInstance.getProcessDefinitionId());
(userId).finished().orderByTaskCreateTime().desc().list(); for (HistoricTaskInstance taskInstance : taskInstances) { processInstanceIdSet.add(taskInstance.getProcessInstanceId());
protected void initRelatedContent() { relatedContentLayout = new VerticalLayout(); relatedContentLayout.addStyleName(ExplorerLayout.STYLE_DETAIL_BLOCK); addComponent(relatedContentLayout); initRelatedContentTitle(); List<Attachment> attachments = new ArrayList<Attachment>(); attachments.addAll(taskService.getTaskAttachments(historicTask.getId())); if (historicTask.getProcessInstanceId() != null) { attachments.addAll(taskService.getProcessInstanceAttachments(historicTask.getProcessInstanceId())); } if (!attachments.isEmpty()) { Table table = initRelatedContentTable(); populateRelatedContent(table, attachments); } else { initNoRelatedContentLabel(); } }
Map<QName, AssociationDefinition> taskAssociations = taskDef.getAssociations(); Map<String, Object> allVariables = getHistoricProcessVariables(historicTask.getProcessInstanceId()); allVariables.putAll(localVariables);
Map<QName, AssociationDefinition> taskAssociations = taskDef.getAssociations(); Map<String, Object> allVariables = getHistoricProcessVariables(historicTask.getProcessInstanceId()); allVariables.putAll(localVariables);
processes[i] = historicTaskInstances.get(i).getProcessInstanceId();
public WorkflowPath getWorkflowPath(HistoricTaskInstance historicTaskInstance) { WorkflowPath path = null; // Check to see if the instance is still running Execution execution = activitiUtil.getExecution(historicTaskInstance.getExecutionId()); if(execution != null) { // Process execution still running path = convert(execution); } else { // Process execution is historic path = buildCompletedPath(historicTaskInstance.getExecutionId(), historicTaskInstance.getProcessInstanceId()); } return path; }
public WorkflowPath getWorkflowPath(HistoricTaskInstance historicTaskInstance) { WorkflowPath path = null; // Check to see if the instance is still running Execution execution = activitiUtil.getExecution(historicTaskInstance.getExecutionId()); if(execution != null) { // Process execution still running path = convert(execution); } else { // Process execution is historic path = buildCompletedPath(historicTaskInstance.getExecutionId(), historicTaskInstance.getProcessInstanceId()); } return path; }
if (instances != null) { for (HistoricTaskInstance historicTaskInstance : instances) { List<HistoricVariableInstance> v = historyService.createHistoricVariableInstanceQuery().processInstanceId(historicTaskInstance.getProcessInstanceId()).list(); Map<String, Object> map = new HashMap<String, Object>(); if (v != null) { myTaskHistoryVo.setName(historicTaskInstance.getName()); myTaskHistoryVo.setProcessDefinitionId(historicTaskInstance.getProcessDefinitionId()); myTaskHistoryVo.setProcessInstanceId(historicTaskInstance.getProcessInstanceId()); myTaskHistoryVo.setStartTime(DateFormat.format(historicTaskInstance.getStartTime()));
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; }
result.setProcessDefinitionUrl(urlBuilder.buildUrl(RestUrls.URL_PROCESS_DEFINITION, taskInstance.getProcessDefinitionId())); result.setProcessInstanceId(taskInstance.getProcessInstanceId()); if (taskInstance.getProcessInstanceId() != null) { result.setProcessInstanceUrl(urlBuilder.buildUrl(RestUrls.URL_HISTORIC_PROCESS_INSTANCE, taskInstance.getProcessInstanceId()));
if (historicTaskInstances != null && historicTaskInstances.size() > 0) { for (HistoricTaskInstance historicTaskInstance : historicTaskInstances) { assertEquals(processInstanceId, historicTaskInstance.getProcessInstanceId()); assertNotNull("Historic task " + historicTaskInstance.getTaskDefinitionKey() + " has no start time", historicTaskInstance.getStartTime()); assertNotNull("Historic task " + historicTaskInstance.getTaskDefinitionKey() + " has no end time", historicTaskInstance.getEndTime());
if (historicTaskInstances != null && historicTaskInstances.size() > 0) { for (HistoricTaskInstance historicTaskInstance : historicTaskInstances) { assertEquals(processInstanceId, historicTaskInstance.getProcessInstanceId()); if (historicTaskInstance.getClaimTime() != null) { assertNotNull("Historic task " + historicTaskInstance.getTaskDefinitionKey() + " has no work time", historicTaskInstance.getWorkTimeInMillis()); assertNotNull("Historic task " + historicTaskInstance.getTaskDefinitionKey() + " has no process instance id", historicTaskInstance.getProcessInstanceId()); assertNotNull("Historic task " + historicTaskInstance.getTaskDefinitionKey() + " has no execution id", historicTaskInstance.getExecutionId()); assertNotNull("Historic task " + historicTaskInstance.getTaskDefinitionKey() + " has no process definition id", historicTaskInstance.getProcessDefinitionId());