06-18-2012 05:10 AM
public class CustomBpmnParseListener implements BpmnParseListener {
protected static ExecutionListener PROCESS_END_ARCHIVE_LISTENER = new ProcessEndArchiveListener();
@Override
public void parseProcess(Element processElement, ProcessDefinitionEntity processDefinition) {
processDefinition.addExecutionListener(ExecutionListener.EVENTNAME_END, PROCESS_END_ARCHIVE_LISTENER);
}
// …
}
HistoricProcessInstance processInstance = historyService.createHistoricProcessInstanceQuery()
.processInstanceId(execution.getProcessInstanceId()).singleResult();
List<HistoricTaskInstance> taskInstances = historyService.createHistoricTaskInstanceQuery()
.processInstanceId(execution.getProcessInstanceId()).list();
// Inspired by
// org.activiti.engine.impl.history.handler.ProcessInstanceEndHandler
HistoricProcessInstance processInstance = Context
.getCommandContext()
.getHistoricProcessInstanceManager()
.findHistoricProcessInstance(execution.getProcessInstanceId());
HistoricTaskInstanceQueryImpl historicTaskInstanceQuery = new HistoricTaskInstanceQueryImpl();
historicTaskInstanceQuery.processInstanceId(execution.getProcessInstanceId());
List<HistoricTaskInstance> taskInstances = Context.getCommandContext().getHistoricTaskInstanceManager()
.findHistoricTaskInstancesByQueryCriteria(historicTaskInstanceQuery, null);
06-18-2012 05:19 AM
06-18-2012 05:50 AM
06-18-2012 05:59 AM
06-18-2012 07:31 AM
06-19-2012 03:37 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.