protected String getInitiator(String PROC_INST_ID_) {
HistoricProcessInstance hip = historyService.createHistoricProcessInstanceQuery().processInstanceId(PROC_INST_ID_).singleResult();
List<HistoricActivityInstance> hais = historyService.createHistoricActivityInstanceQuery().processInstanceId(PROC_INST_ID_)
.orderByHistoricActivityInstanceId().asc().list();
BpmnModel bpmnModel = repositoryService.getBpmnModel(hip.getProcessDefinitionId());
List<FlowNode> historicFlowNodeList = new LinkedList<FlowNode>();
for(HistoricActivityInstance hai : hais) {
historicFlowNodeList.add((FlowNode) bpmnModel.getMainProcess().getFlowElement(hai.getActivityId(), true));
if(hai.getAssignee() != null) {
return hai.getAssignee();
}
}
return null;
}
本作品採用《CC 協議》,轉載必須註明作者和本文連結