activity判断流程结束和删除流程
//判断流程是否结束 ,如果审批结束才更新五级分类Bug #3147
/*ProcessInstance pi = runtimeService.createProcessInstanceQuery()
.processInstanceId(fiveLevel.getAct().getProcInsId()).singleResult();*/
/* if(pi==null){
fiveLevel.getLoanContract().setFiveLevel(fiveLevel.getFiveLevel());//更新状态
loanContractService.save(fiveLevel.getLoanContract());//提交申请时不更改五级分类的状态Bug #3147
System.out.println("流程已经结束");
}
else{
System.out.println("流程没有结束");
} */
//删除流程:
//流程没有结束:
// taskService.addComment(taskId, processInstanceId, comment);//备注
//runtimeService.deleteProcessInstance(processInstanceId,"");
//historyService.deleteHistoricProcessInstance(processInstanceId);//(顺序不能换)
//流程已经结束:historyService.deleteHistoricProcessInstance(procesInstanceId);
//runtimeService.suspendProcessInstanceById(processInstanceId);