I delete process by RuntimeService#deleteProcessInstances.
If it happened during service task i get I exception:
ENGINE-16004 Exception while closing command context: null: java.lang.NullPointerException
It seems like task can’t be ended. It is not error for me.
Can I skip task ending?
More stack trace:
│2019-11-22 10:22:33,975 ERROR [org.camunda.bpm.engine.context] (pool-9-thread-343) ENGINE-16004 Exception while closing command context: null: java.lang.NullPointerException │
│ at org.camunda.bpm.camunda-engine//org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl.getNonEventScopeExecutions(PvmExecutionImpl.java:1036) │
│ at org.camunda.bpm.camunda-engine//org.camunda.bpm.engine.impl.tree.LeafActivityInstanceExecutionCollector.visit(LeafActivityInstanceExecutionCollector.java:34) │
│ at org.camunda.bpm.camunda-engine//org.camunda.bpm.engine.impl.tree.LeafActivityInstanceExecutionCollector.visit(LeafActivityInstanceExecutionCollector.java:29) │
│ at org.camunda.bpm.camunda-engine//org.camunda.bpm.engine.impl.tree.ReferenceWalker.walkUntil(ReferenceWalker.java:87) │
│ at org.camunda.bpm.camunda-engine//org.camunda.bpm.engine.impl.tree.ReferenceWalker.walkUntil(ReferenceWalker.java:65) │
│ at org.camunda.bpm.camunda-engine//org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl.createActivityExecutionMapping(PvmExecutionImpl.java:1425) │
│ at org.camunda.bpm.camunda-engine//org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl.createActivityExecutionMapping(PvmExecutionImpl.java:1457) │
│ at org.camunda.bpm.camunda-engine//org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityEnd.execute(PvmAtomicOperationActivityEnd.java:53) │
│ at org.camunda.bpm.camunda-engine//org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityEnd.execute(PvmAtomicOperationActivityEnd.java:32) │
│ at org.camunda.bpm.camunda-engine//org.camunda.bpm.engine.impl.interceptor.AtomicOperationInvocation.execute(AtomicOperationInvocation.java:91) │
│ at org.camunda.bpm.camunda-engine//org.camunda.bpm.engine.impl.interceptor.CommandInvocationContext.invokeNext(CommandInvocationContext.java:125) │
│ at org.camunda.bpm.camunda-engine//org.camunda.bpm.engine.impl.interceptor.CommandInvocationContext.performNext(CommandInvocationContext.java:104) │
│ at org.camunda.bpm.camunda-engine//org.camunda.bpm.engine.impl.interceptor.CommandInvocationContext.performOperation(CommandInvocationContext.java:79) │
│ at org.camunda.bpm.camunda-engine//org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:618) │
│ at org.camunda.bpm.camunda-engine//org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:594)