historyService.deleteHistoricProcessInstance(processInstanceId);
今天用上面的代码来删除activiti工作流的流程实例的时候报错了,说流程正在运行无法删除流程实例,报错提示如下所示:
Process instance is still running, cannot delete historic process instance XXXX
解决方法:
将historyService.deleteHistoricProcessInstance(processInstanceId)改成以下代码即可,亲试有效,极力推荐!
runtimeService.deleteProcessInstance(processInstanceId,"");