Java Code Examples for org.camunda.bpm.engine.history.HistoricActivityInstance#getActivityType()
The following examples show how to use
org.camunda.bpm.engine.history.HistoricActivityInstance#getActivityType() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ActivityList.java From camunda-bpm-platform-osgi with Apache License 2.0 | 6 votes |
@Override protected Object doExecute() throws Exception { HistoricProcessInstance processInstance = engine.getHistoryService().createHistoricProcessInstanceQuery().processInstanceId(instanceId).singleResult(); System.out.println("Process instance : " + processInstance.getId()); System.out.println("Process definition : " + processInstance.getProcessDefinitionId()); System.out.println(""); List<HistoricActivityInstance> activities = engine.getHistoryService().createHistoricActivityInstanceQuery(). processInstanceId(instanceId).orderByHistoricActivityInstanceStartTime().asc().list(); String[][] data = new String[activities.size()][HEADER.length]; int i = 0; for (HistoricActivityInstance activity : activities) { data[i++] = new String[]{ activity.getId(), activity.getDurationInMillis() + " ms", activity.getActivityId(), activity.getActivityName(), activity.getActivityType() }; } ASCIITable.getInstance().printTable(HEADER, data); return null; }
Example 2
Source File: HistoricActivityInstanceDto.java From camunda-bpm-platform with Apache License 2.0 | 6 votes |
public static void fromHistoricActivityInstance(HistoricActivityInstanceDto dto, HistoricActivityInstance historicActivityInstance) { dto.id = historicActivityInstance.getId(); dto.parentActivityInstanceId = historicActivityInstance.getParentActivityInstanceId(); dto.activityId = historicActivityInstance.getActivityId(); dto.activityName = historicActivityInstance.getActivityName(); dto.activityType = historicActivityInstance.getActivityType(); dto.processDefinitionKey = historicActivityInstance.getProcessDefinitionKey(); dto.processDefinitionId = historicActivityInstance.getProcessDefinitionId(); dto.processInstanceId = historicActivityInstance.getProcessInstanceId(); dto.executionId = historicActivityInstance.getExecutionId(); dto.taskId = historicActivityInstance.getTaskId(); dto.calledProcessInstanceId = historicActivityInstance.getCalledProcessInstanceId(); dto.calledCaseInstanceId = historicActivityInstance.getCalledCaseInstanceId(); dto.assignee = historicActivityInstance.getAssignee(); dto.startTime = historicActivityInstance.getStartTime(); dto.endTime = historicActivityInstance.getEndTime(); dto.durationInMillis = historicActivityInstance.getDurationInMillis(); dto.canceled = historicActivityInstance.isCanceled(); dto.completeScope = historicActivityInstance.isCompleteScope(); dto.tenantId = historicActivityInstance.getTenantId(); dto.removalTime = historicActivityInstance.getRemovalTime(); dto.rootProcessInstanceId = historicActivityInstance.getRootProcessInstanceId(); }
Example 3
Source File: Executable.java From camunda-bpm-assert-scenario with Apache License 2.0 | 5 votes |
static WaitstateExecutable newInstance(ProcessRunnerImpl runner, HistoricActivityInstance instance) { if (!runner.isExecuted(instance)) { String type = instance.getActivityType(); if (types.containsKey(type)) { try { return (WaitstateExecutable) Class.forName(IgnoredExecutable.class.getPackage().getName() + "." + types.get(type)).getConstructor(ProcessRunnerImpl.class, HistoricActivityInstance.class).newInstance(runner, instance); } catch (Exception e) { throw new IllegalArgumentException(e); } } return new IgnoredExecutable(runner, instance); } return null; }