首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >如何删除没有结束时间的Camunda历史流程实例?

如何删除没有结束时间的Camunda历史流程实例?
EN

Stack Overflow用户
提问于 2017-01-31 17:29:05
回答 1查看 2.6K关注 0票数 0

不知何故,我在数据库中得到了一个没有结束时间的历史流程实例。

该条目如下所示:

代码语言:javascript
运行
复制
ACT_HI_PROCINST (ID_, PROC_INST_ID_, BUSINESS_KEY_, END_TIME_)
VALUES ('0c128aec-e6f0-11e6-bc94-5456dbfc2b09', '0c128aec-e6f0-11e6-bc94-5456dbfc2b09', '3bc71b87-7134-4ead-8493-4c0f11d635be', null);

当我尝试使用DELETE HTTP request to the REST interface删除历史流程实例时,出现以下错误:

代码语言:javascript
运行
复制
ERROR [org.camunda.bpm.engine.context] (default task-7) ENGINE-16004 Exception while closing command context: Process instance is still running, cannot delete historic process instance: 0c128aec-e6f0-11e6-bc94-5456dbfc2b09: instance.getEndTime() is null: org.camunda.bpm.engine.exception.NullValueException: Process instance is still running, cannot delete historic process instance: 0c128aec-e6f0-11e6-bc94-5456dbfc2b09: instance.getEndTime() is null
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
    at org.camunda.bpm.engine.impl.util.EnsureUtil.generateException(EnsureUtil.java:329)
    at org.camunda.bpm.engine.impl.util.EnsureUtil.ensureNotNull(EnsureUtil.java:49)
    at org.camunda.bpm.engine.impl.util.EnsureUtil.ensureNotNull(EnsureUtil.java:44)
    at org.camunda.bpm.engine.impl.cmd.DeleteHistoricProcessInstanceCmd.execute(DeleteHistoricProcessInstanceCmd.java:49)
    at org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
    at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:95)
    at org.camunda.bpm.engine.impl.interceptor.JtaTransactionInterceptor.execute(JtaTransactionInterceptor.java:58)
    at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:30)
    at org.camunda.bpm.engine.impl.HistoryServiceImpl.deleteHistoricProcessInstance(HistoryServiceImpl.java:99)
    at org.camunda.bpm.engine.rest.sub.history.impl.HistoricProcessInstanceResourceImpl.deleteHistoricProcessInstance(HistoricProcessInstanceResourceImpl.java:53)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)

如何在Java或HTTP中删除没有结束时间的历史流程实例?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-02-01 04:45:45

流程实例未完成。我认为您只能删除该实例。https://docs.camunda.org/manual/7.6/reference/rest/process-instance/delete/

您还可以降低历史记录级别,以减少data https://docs.camunda.org/manual/7.6/user-guide/process-engine/history/#set-the-history-level

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/41953895

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档