You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a process unit test using the embedded Zeebe Test Engine (zeebe-process-test-extension) I get the following error upon completing the User Task which is followed by the Terminate End Event:
2023-09-14T13:15:51.228+02:00 ERROR 15152 --- [ zb-actors-5] io.camunda.zeebe.broker.process : Expected to process record 'TypedRecordImpl{metadata=RecordMetadata{recordType=COMMAND, valueType=JOB, intent=COMPLETE}, value={"deadline":-1,"worker":"","retries":-1,"retryBackoff":0,"recurringTime":-1,"type":"","customHeaders":[packed value (length=1)],"variables":"gA==","errorMessage":"","errorCode":"","bpmnProcessId":"","processDefinitionVersion":-1,"processDefinitionKey":-1,"processInstanceKey":-1,"elementId":"","elementInstanceKey":-1}}' without errors, but exception occurred with message 'Expected the child count to be positive but was -1'.
java.lang.IllegalStateException: Expected the child count to be positive but was -1
at io.camunda.zeebe.engine.state.instance.ElementInstance.decrementChildCount(ElementInstance.java:111) ~[zeebe-workflow-engine-8.2.13.jar:8.2.13]
at io.camunda.zeebe.engine.state.instance.DbElementInstanceState.removeInstance(DbElementInstanceState.java:163) ~[zeebe-workflow-engine-8.2.13.jar:8.2.13]
at io.camunda.zeebe.engine.state.appliers.ProcessInstanceElementTerminatedApplier.applyState(ProcessInstanceElementTerminatedApplier.java:41) ~[zeebe-workflow-engine-8.2.13.jar:8.2.13]
at io.camunda.zeebe.engine.state.appliers.ProcessInstanceElementTerminatedApplier.applyState(ProcessInstanceElementTerminatedApplier.java:19) ~[zeebe-workflow-engine-8.2.13.jar:8.2.13]
at io.camunda.zeebe.engine.state.appliers.EventAppliers.applyState(EventAppliers.java:302) ~[zeebe-workflow-engine-8.2.13.jar:8.2.13]
at io.camunda.zeebe.engine.processing.streamprocessor.writers.ResultBuilderBackedEventApplyingStateWriter.appendFollowUpEvent(ResultBuilderBackedEventApplyingStateWriter.java:41) ~[zeebe-workflow-engine-8.2.13.jar:8.2.13]
at io.camunda.zeebe.engine.processing.bpmn.behavior.BpmnStateTransitionBehavior.transitionTo(BpmnStateTransitionBehavior.java:219) ~[zeebe-workflow-engine-8.2.13.jar:8.2.13]
at io.camunda.zeebe.engine.processing.bpmn.behavior.BpmnStateTransitionBehavior.transitionToTerminated(BpmnStateTransitionBehavior.java:209) ~[zeebe-workflow-engine-8.2.13.jar:8.2.13]
at io.camunda.zeebe.engine.processing.bpmn.task.JobWorkerTaskProcessor.lambda$onTerminate$10(JobWorkerTaskProcessor.java:96) ~[zeebe-workflow-engine-8.2.13.jar:8.2.13]
I do not get these weird exceptions in case the end event is a simple End Event.
Expected behaviour
Completing a User Task followed by a Terminate End Event should not lead to a IllegalStateException when testing my process with the embedded test engine.
Reproduction steps
Run ProcessUnitTest in the following Maven project:
Description
Given the following sample process:
In a process unit test using the embedded Zeebe Test Engine (
zeebe-process-test-extension
) I get the following error upon completing the User Task which is followed by the Terminate End Event:I do not get these weird exceptions in case the end event is a simple End Event.
Expected behaviour
Completing a User Task followed by a Terminate End Event should not lead to a IllegalStateException when testing my process with the embedded test engine.
Reproduction steps
Run
ProcessUnitTest
in the following Maven project:camunda-8-terminate-event.zip
Environment
The text was updated successfully, but these errors were encountered: