04-26-2013 03:59 AM
if(pi.getEndTime()==null)
{
DeploymentCache dc =((ProcessEngineConfigurationImpl)processEngineConfiguration).getDeploymentManager().getProcessDefinitionCache();
ProcessDefinitionEntity pd =(ProcessDefinitionEntity)dc.get(pi.getProcessDefinitionId());
if(pd==null){
pd = (ProcessDefinitionEntity)repositoryService.createProcessDefinitionQuery().processDefinitionId(pi.getProcessDefinitionId()).singleResult();
dc.add(pi.getProcessDefinitionId(), pd);
this.runtimeService.deleteProcessInstance(processId,"user delete");
dc.remove(pi.getProcessDefinitionId());
}
else
this.runtimeService.deleteProcessInstance(processId,"user delete");
}
this.historyService.deleteHistoricProcessInstance(processId);
public void deleteCascade(String deleteReason) {
this.deleteReason = deleteReason;
this.deleteRoot = true;
performOperation(AtomicOperation.DELETE_CASCADE);
}
public void recordProcessInstanceEnd(String processInstanceId, String deleteReason, String activityId) {
if(isHistoryLevelAtLeast(HistoryLevel.ACTIVITY)) {
HistoricProcessInstanceEntity historicProcessInstance = getHistoricProcessInstanceManager()
.findHistoricProcessInstance(processInstanceId);
if (historicProcessInstance!=null) {
historicProcessInstance.markEnded(deleteReason);
historicProcessInstance.setEndActivityId(activityId);
}
}
}
org.activiti.engine.impl.history.HistoryManager.recordProcessInstanceEnd(String, String, String)
org.activiti.engine.impl.history.handler.ProcessInstanceEndHandler.notify(DelegateExecution)
org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(InterpretableExecution)
org.activiti.engine.impl.interceptor.CommandContext.performOperation(AtomicOperation, InterpretableExecution)
org.activiti.engine.impl.pvm.runtime.ExecutionImpl.performOperation(AtomicOperation)
04-27-2013 04:04 AM
04-30-2013 05:31 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.