Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Boundary Event can't be triggered after EventSubProcess is triggered #6874

Closed
Zelldon opened this issue Apr 26, 2021 · 2 comments · Fixed by #9175
Closed

Boundary Event can't be triggered after EventSubProcess is triggered #6874

Zelldon opened this issue Apr 26, 2021 · 2 comments · Fixed by #9175
Assignees
Labels
kind/bug Categorizes an issue or PR as a bug scope/broker Marks an issue or PR to appear in the broker section of the changelog severity/high Marks a bug as having a noticeable impact on the user with no known workaround version:1.3.8 version:8.1.0-alpha1 Marks an issue as being completely or in parts released in 8.1.0-alpha1 version:8.1.0 Marks an issue as being completely or in parts released in 8.1.0

Comments

@Zelldon
Copy link
Member

Zelldon commented Apr 26, 2021

Describe the bug

Imagine following process:

diagram_1

We first trigger the EventSubProcess and afterwards the boundary event. The boundary event should terminate the scope but it can't be triggered since the Timer is canceled.

To Reproduce

Model:
diagram_1.bpmn.txt

Test:

  @Test
  // https://github.com/camunda-cloud/zeebe/issues/6552
  public void shouldTriggerBoundaryAndTerminateFlowScope() throws IOException {
    // given
    final ProcessBuilder process = Bpmn.createExecutableProcess(PROCESS_ID);
 

    engineRule
        .deployment()
        .withXmlResource(Files.readAllBytes(Path.of("/tmp/diagram_1.bpmn")))
        .deploy();

    final long processInstanceKey =
        engineRule
            .processInstance()
            .ofBpmnProcessId(PROCESS_ID)
            .withVariables(Map.of("key", 123))
            .create();

    // when
    RecordingExporter.messageSubscriptionRecords(MessageSubscriptionIntent.CREATED)
        .withProcessInstanceKey(processInstanceKey)
        .withMessageName(MSG_NAME)
        .await();

    engineRule.message().withName(MSG_NAME).withCorrelationKey("123").withTimeToLive(0).publish();
    engineRule.increaseTime(Duration.ofSeconds(30));

    // then
    assertThat(
            RecordingExporter.processInstanceRecords()
                .withProcessInstanceKey(processInstanceKey)
                .limitToProcessInstanceCompleted())
        .extracting(r -> tuple(r.getValue().getBpmnElementType(), r.getIntent()))
        .containsSubsequence(
            tuple(BpmnElementType.BOUNDARY_EVENT, ProcessInstanceIntent.ELEMENT_ACTIVATED),
            tuple(BpmnElementType.BOUNDARY_EVENT, ProcessInstanceIntent.ELEMENT_COMPLETED),
            tuple(BpmnElementType.PROCESS, ProcessInstanceIntent.ELEMENT_COMPLETED));
  }

Unfortunately I cant use the Bpmn Model API to write the test

   //
    //    process
    //        .eventSubProcess("event_sub_proc")
    //        .startEvent("event_sub_start")
    //        .interrupting(true)
    //        .message(b -> b.name(MSG_NAME).zeebeCorrelationKeyExpression("key"))
    //        .endEvent("event_sub_end");
    //
    //    final BpmnModelInstance model =
    //        process
    //            .startEvent("start_proc")
    //            .subProcess(
    //                "sub",
    //                sub -> {
    //                  sub.subProcess()
    //                      .triggerByEvent()
    //                      .startEvent("event_sub_start")
    //                      .interrupting(true)
    //                      .message(b -> b.name(MSG_NAME).zeebeCorrelationKeyExpression("key"))
    //                      .endEvent("event_sub_end");
    //
    //                  sub.embeddedSubProcess()
    //                      .startEvent()
    //                      .serviceTask("task", task -> task.zeebeJobType("task"))
    //                      .endEvent();
    //                })
    //            .boundaryEvent()
    //            .timerWithDuration("PT15S")
    //            .endEvent("end_proc")
    //            .done();

Expected behavior

Log/Stacktrace

Full Stacktrace

/usr/lib/jvm/java-11-openjdk/bin/java -ea -Didea.test.cyclic.buffer.size=1048576 -javaagent:/opt/intellij/idea-IU-203.6682.168/lib/idea_rt.jar=37313:/opt/intellij/idea-IU-203.6682.168/bin -Dfile.encoding=UTF-8 -classpath /opt/intellij/idea-IU-203.6682.168/lib/idea_rt.jar:/opt/intellij/idea-IU-203.6682.168/plugins/junit/lib/junit5-rt.jar:/opt/intellij/idea-IU-203.6682.168/plugins/junit/lib/junit-rt.jar:/home/zell/goPath/src/github.com/zeebe-io/zeebe/engine/target/test-classes:/home/zell/goPath/src/github.com/zeebe-io/zeebe/engine/target/classes:/home/zell/goPath/src/github.com/zeebe-io/zeebe/util/target/classes:/home/zell/.m2/repository/org/apache/logging/log4j/log4j-api/2.14.1/log4j-api-2.14.1.jar:/home/zell/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.12.3/jackson-databind-2.12.3.jar:/home/zell/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.12.3/jackson-core-2.12.3.jar:/home/zell/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.12.3/jackson-datatype-jsr310-2.12.3.jar:/home/zell/.m2/repository/org/springframework/spring-core/5.3.6/spring-core-5.3.6.jar:/home/zell/.m2/repository/org/springframework/spring-jcl/5.3.6/spring-jcl-5.3.6.jar:/home/zell/.m2/repository/org/springframework/spring-context/5.3.6/spring-context-5.3.6.jar:/home/zell/.m2/repository/org/springframework/spring-aop/5.3.6/spring-aop-5.3.6.jar:/home/zell/.m2/repository/org/springframework/spring-expression/5.3.6/spring-expression-5.3.6.jar:/home/zell/.m2/repository/org/springframework/boot/spring-boot/2.4.5/spring-boot-2.4.5.jar:/home/zell/.m2/repository/org/springframework/boot/spring-boot-actuator/2.4.5/spring-boot-actuator-2.4.5.jar:/home/zell/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/2.4.5/spring-boot-autoconfigure-2.4.5.jar:/home/zell/.m2/repository/org/springframework/boot/spring-boot-actuator-autoconfigure/2.4.5/spring-boot-actuator-autoconfigure-2.4.5.jar:/home/zell/.m2/repository/org/agrona/agrona/1.10.0/agrona-1.10.0.jar:/home/zell/.m2/repository/org/slf4j/slf4j-api/1.7.30/slf4j-api-1.7.30.jar:/home/zell/goPath/src/github.com/zeebe-io/zeebe/protocol/target/classes:/home/zell/goPath/src/github.com/zeebe-io/zeebe/zb-db/target/classes:/home/zell/.m2/repository/org/rocksdb/rocksdbjni/6.19.3/rocksdbjni-6.19.3.jar:/home/zell/goPath/src/github.com/zeebe-io/zeebe/protocol-impl/target/classes:/home/zell/.m2/repository/org/msgpack/jackson-dataformat-msgpack/0.8.22/jackson-dataformat-msgpack-0.8.22.jar:/home/zell/goPath/src/github.com/zeebe-io/zeebe/logstreams/target/classes:/home/zell/goPath/src/github.com/zeebe-io/zeebe/dispatcher/target/classes:/home/zell/.m2/repository/com/netflix/concurrency-limits/concurrency-limits-core/0.3.6/concurrency-limits-core-0.3.6.jar:/home/zell/goPath/src/github.com/zeebe-io/zeebe/atomix/cluster/target/classes:/home/zell/goPath/src/github.com/zeebe-io/zeebe/atomix/utils/target/classes:/home/zell/.m2/repository/com/typesafe/config/1.4.1/config-1.4.1.jar:/home/zell/.m2/repository/com/esotericsoftware/minlog/1.3.1/minlog-1.3.1.jar:/home/zell/goPath/src/github.com/zeebe-io/zeebe/snapshot/target/classes:/home/zell/goPath/src/github.com/zeebe-io/zeebe/journal/target/classes:/home/zell/.m2/repository/io/netty/netty-transport/4.1.63.Final/netty-transport-4.1.63.Final.jar:/home/zell/.m2/repository/io/netty/netty-resolver/4.1.63.Final/netty-resolver-4.1.63.Final.jar:/home/zell/.m2/repository/io/netty/netty-codec/4.1.63.Final/netty-codec-4.1.63.Final.jar:/home/zell/.m2/repository/io/netty/netty-common/4.1.63.Final/netty-common-4.1.63.Final.jar:/home/zell/.m2/repository/io/netty/netty-transport-native-epoll/4.1.63.Final/netty-transport-native-epoll-4.1.63.Final-linux-x86_64.jar:/home/zell/.m2/repository/io/netty/netty-transport-native-unix-common/4.1.63.Final/netty-transport-native-unix-common-4.1.63.Final.jar:/home/zell/.m2/repository/org/apache/commons/commons-math3/3.6.1/commons-math3-3.6.1.jar:/home/zell/.m2/repository/com/esotericsoftware/kryo/5.1.0/kryo-5.1.0.jar:/home/zell/.m2/repository/com/esotericsoftware/reflectasm/1.11.9/reflectasm-1.11.9.jar:/home/zell/.m2/repository/io/netty/netty-buffer/4.1.63.Final/netty-buffer-4.1.63.Final.jar:/home/zell/.m2/repository/com/google/guava/guava/30.1.1-jre/guava-30.1.1-jre.jar:/home/zell/.m2/repository/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar:/home/zell/.m2/repository/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar:/home/zell/.m2/repository/org/checkerframework/checker-qual/3.8.0/checker-qual-3.8.0.jar:/home/zell/.m2/repository/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3.jar:/home/zell/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.12.3/jackson-annotations-2.12.3.jar:/home/zell/goPath/src/github.com/zeebe-io/zeebe/msgpack-core/target/classes:/home/zell/goPath/src/github.com/zeebe-io/zeebe/expression-language/target/classes:/home/zell/.m2/repository/org/camunda/feel/feel-engine/1.13.1/feel-engine-1.13.1.jar:/home/zell/.m2/repository/com/lihaoyi/fastparse_2.13/2.3.1/fastparse_2.13-2.3.1.jar:/home/zell/.m2/repository/com/lihaoyi/sourcecode_2.13/0.2.3/sourcecode_2.13-0.2.3.jar:/home/zell/.m2/repository/com/lihaoyi/geny_2.13/0.6.5/geny_2.13-0.6.5.jar:/home/zell/.m2/repository/org/scala-lang/scala-library/2.13.5/scala-library-2.13.5.jar:/home/zell/goPath/src/github.com/zeebe-io/zeebe/msgpack-value/target/classes:/home/zell/goPath/src/github.com/zeebe-io/zeebe/bpmn-model/target/classes:/home/zell/.m2/repository/org/camunda/bpm/model/camunda-xml-model/7.15.0/camunda-xml-model-7.15.0.jar:/home/zell/.m2/repository/uk/co/real-logic/sbe-tool/1.22.0/sbe-tool-1.22.0.jar:/home/zell/.m2/repository/io/prometheus/simpleclient/0.10.0/simpleclient-0.10.0.jar:/home/zell/goPath/src/github.com/zeebe-io/zeebe/protocol-asserts/target/classes:/home/zell/.m2/repository/javax/annotation/javax.annotation-api/1.3.2/javax.annotation-api-1.3.2.jar:/home/zell/.m2/repository/junit/junit/4.13.2/junit-4.13.2.jar:/home/zell/.m2/repository/org/hamcrest/hamcrest-core/2.2/hamcrest-core-2.2.jar:/home/zell/.m2/repository/org/junit/jupiter/junit-jupiter-params/5.7.1/junit-jupiter-params-5.7.1.jar:/home/zell/.m2/repository/org/apiguardian/apiguardian-api/1.1.0/apiguardian-api-1.1.0.jar:/home/zell/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.7.1/junit-jupiter-api-5.7.1.jar:/home/zell/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar:/home/zell/.m2/repository/org/junit/platform/junit-platform-commons/1.7.1/junit-platform-commons-1.7.1.jar:/home/zell/.m2/repository/org/assertj/assertj-core/3.19.0/assertj-core-3.19.0.jar:/home/zell/.m2/repository/org/msgpack/msgpack-core/0.8.22/msgpack-core-0.8.22.jar:/home/zell/goPath/src/github.com/zeebe-io/zeebe/test-util/target/classes:/home/zell/goPath/src/github.com/zeebe-io/zeebe/exporter-api/target/classes:/home/zell/goPath/src/github.com/zeebe-io/zeebe/clients/java/target/classes:/home/zell/goPath/src/github.com/zeebe-io/zeebe/gateway-protocol-impl/target/classes:/home/zell/goPath/src/github.com/zeebe-io/zeebe/gateway-protocol/target/classes:/home/zell/.m2/repository/io/grpc/grpc-protobuf/1.37.0/grpc-protobuf-1.37.0.jar:/home/zell/.m2/repository/com/google/api/grpc/proto-google-common-protos/2.1.0/proto-google-common-protos-2.1.0.jar:/home/zell/.m2/repository/io/grpc/grpc-protobuf-lite/1.37.0/grpc-protobuf-lite-1.37.0.jar:/home/zell/.m2/repository/io/grpc/grpc-stub/1.37.0/grpc-stub-1.37.0.jar:/home/zell/.m2/repository/io/grpc/grpc-core/1.37.0/grpc-core-1.37.0.jar:/home/zell/.m2/repository/com/google/code/gson/gson/2.8.6/gson-2.8.6.jar:/home/zell/.m2/repository/com/google/android/annotations/4.1.1.4/annotations-4.1.1.4.jar:/home/zell/.m2/repository/io/perfmark/perfmark-api/0.23.0/perfmark-api-0.23.0.jar:/home/zell/.m2/repository/io/grpc/grpc-netty/1.37.0/grpc-netty-1.37.0.jar:/home/zell/.m2/repository/io/netty/netty-codec-http2/4.1.63.Final/netty-codec-http2-4.1.63.Final.jar:/home/zell/.m2/repository/io/netty/netty-codec-http/4.1.63.Final/netty-codec-http-4.1.63.Final.jar:/home/zell/.m2/repository/io/netty/netty-handler-proxy/4.1.63.Final/netty-handler-proxy-4.1.63.Final.jar:/home/zell/.m2/repository/io/netty/netty-codec-socks/4.1.63.Final/netty-codec-socks-4.1.63.Final.jar:/home/zell/.m2/repository/com/google/protobuf/protobuf-java/3.15.8/protobuf-java-3.15.8.jar:/home/zell/.m2/repository/io/netty/netty-tcnative-boringssl-static/2.0.38.Final/netty-tcnative-boringssl-static-2.0.38.Final.jar:/home/zell/.m2/repository/io/netty/netty-handler/4.1.63.Final/netty-handler-4.1.63.Final.jar:/home/zell/.m2/repository/com/fasterxml/jackson/dataformat/jackson-dataformat-yaml/2.12.3/jackson-dataformat-yaml-2.12.3.jar:/home/zell/.m2/repository/org/testcontainers/testcontainers/1.15.3/testcontainers-1.15.3.jar:/home/zell/.m2/repository/org/apache/commons/commons-compress/1.20/commons-compress-1.20.jar:/home/zell/.m2/repository/org/rnorth/duct-tape/duct-tape/1.0.8/duct-tape-1.0.8.jar:/home/zell/.m2/repository/org/rnorth/visible-assertions/visible-assertions/2.1.2/visible-assertions-2.1.2.jar:/home/zell/.m2/repository/net/java/dev/jna/jna/5.8.0/jna-5.8.0.jar:/home/zell/.m2/repository/com/github/docker-java/docker-java-api/3.2.8/docker-java-api-3.2.8.jar:/home/zell/.m2/repository/com/github/docker-java/docker-java-transport-zerodep/3.2.8/docker-java-transport-zerodep-3.2.8.jar:/home/zell/.m2/repository/com/github/docker-java/docker-java-transport/3.2.8/docker-java-transport-3.2.8.jar:/home/zell/.m2/repository/org/springframework/spring-beans/5.3.6/spring-beans-5.3.6.jar:/home/zell/.m2/repository/org/yaml/snakeyaml/1.28/snakeyaml-1.28.jar:/home/zell/.m2/repository/io/grpc/grpc-api/1.37.0/grpc-api-1.37.0.jar:/home/zell/.m2/repository/io/grpc/grpc-context/1.37.0/grpc-context-1.37.0.jar:/home/zell/.m2/repository/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar:/home/zell/.m2/repository/com/google/errorprone/error_prone_annotations/2.6.0/error_prone_annotations-2.6.0.jar:/home/zell/.m2/repository/org/codehaus/mojo/animal-sniffer-annotations/1.20/animal-sniffer-annotations-1.20.jar:/home/zell/.m2/repository/org/mockito/mockito-core/3.9.0/mockito-core-3.9.0.jar:/home/zell/.m2/repository/net/bytebuddy/byte-buddy/1.10.20/byte-buddy-1.10.20.jar:/home/zell/.m2/repository/net/bytebuddy/byte-buddy-agent/1.10.20/byte-buddy-agent-1.10.20.jar:/home/zell/.m2/repository/org/objenesis/objenesis/3.2/objenesis-3.2.jar:/home/zell/.m2/repository/org/awaitility/awaitility/4.0.3/awaitility-4.0.3.jar:/home/zell/.m2/repository/org/hamcrest/hamcrest/2.2/hamcrest-2.2.jar:/home/zell/.m2/repository/org/apache/commons/commons-lang3/3.12.0/commons-lang3-3.12.0.jar:/home/zell/goPath/src/github.com/zeebe-io/zeebe/logstreams/target/test-classes:/home/zell/goPath/src/github.com/zeebe-io/zeebe/build-tools/target/classes:/home/zell/.m2/repository/org/apache/logging/log4j/log4j-core/2.14.1/log4j-core-2.14.1.jar:/home/zell/.m2/repository/org/apache/logging/log4j/log4j-slf4j-impl/2.14.1/log4j-slf4j-impl-2.14.1.jar com.intellij.rt.junit.JUnitStarter -ideVersion5 -junit4 io.zeebe.engine.processing.bpmn.subprocess.InterruptingEventSubprocessConcurrencyTest,shouldTriggerBoundaryAndTerminateFlowScope
14:16:45.766 [Broker-0-LogStream-1] DEBUG io.zeebe.logstreams - Configured log appender back pressure at partition 1 as AppenderVegasCfg{initialLimit=1024, maxConcurrency=32768, alphaLimit=0.7, betaLimit=0.95}. Window limiting is disabled
14:16:45.981 [Broker-0-StreamProcessor-1] DEBUG io.zeebe.logstreams - Recovering state of partition 1 from snapshot
14:16:46.146 [Broker-0-StreamProcessor-1] INFO  org.camunda.feel.FeelEngine - Engine created. [value-mapper: CompositeValueMapper(List(io.zeebe.el.impl.feel.MessagePackValueMapper@2e48ab9d)), function-provider: io.zeebe.el.impl.feel.FeelFunctionProvider@6d1be648, clock: io.zeebe.el.impl.ZeebeFeelEngineClock@58f21e11, configuration: Configuration(false)]
14:16:46.329 [Broker-0-StreamProcessor-1] INFO  io.zeebe.logstreams - Recovered state of partition 1 from snapshot at position -1
14:16:46.351 [Broker-0-StreamProcessor-1] INFO  org.camunda.feel.FeelEngine - Engine created. [value-mapper: CompositeValueMapper(List(io.zeebe.el.impl.feel.MessagePackValueMapper@3514adb8)), function-provider: io.zeebe.el.impl.feel.FeelFunctionProvider@649b2b7e, clock: io.zeebe.el.impl.ZeebeFeelEngineClock@497bad05, configuration: Configuration(false)]
14:16:46.367 [Broker-0-StreamProcessor-1] INFO  org.camunda.feel.FeelEngine - Engine created. [value-mapper: CompositeValueMapper(List(io.zeebe.el.impl.feel.MessagePackValueMapper@71bc9419)), function-provider: io.zeebe.el.impl.feel.FeelFunctionProvider@2e8ff223, clock: io.zeebe.el.impl.ZeebeFeelEngineClock@3803264d, configuration: Configuration(false)]
14:16:47.311 [Broker-0-StreamProcessor-1] INFO  org.camunda.feel.FeelEngine - Engine created. [value-mapper: CompositeValueMapper(List(io.zeebe.el.impl.feel.MessagePackValueMapper@6114ac29)), function-provider: io.zeebe.el.impl.feel.FeelFunctionProvider@73f39e85, clock: io.zeebe.el.impl.ZeebeFeelEngineClock@6f0dcb21, configuration: Configuration(false)]
14:16:52.834 [] INFO  io.zeebe.test - Test failed, following records were exported:
14:16:52.912 [] INFO  io.zeebe.test - Compact log representation:
--------
	['C'ommand/'E'event/'R'ejection] [valueType] [intent] - #[position]->#[source record position]  P[partitionId]K[key] - [summary of value]
	P9K999 - key; #999 - record position; "ID" element/process id; @"elementid"/[P9K999] - element with ID and key
	Keys are decomposed into partition id and per partition key (e.g. 2251799813685253 -> P1K005). If single partition, the partition is omitted.
	Long IDs are shortened (e.g. 'startEvent_5d56488e-0570-416c-ba2d-36d2a3acea78' -> 'star..acea78'
--------
C DEPLOYMENT         CREATE         - #01-> -1  -1 - process.xml
E PROC               CREATED        - #02->#01 K01 - process.xml->"proc" (version:1)
E DEPLOYMENT         CREATED        - #03->#01 K02 - process.xml
E DEPLOYMENT         FULLY_DISTR    - #04->#01 K02 - 
C PROC_INST_CREATION CREATE         - #05-> -1  -1 - new <process "proc"> with variables: {key=123}
E VAR                CREATED        - #06->#05 K04 - key->123 in <process [K03]>
C PROC_INST          ACTIVATE       - #07->#05 K03 - PROCESS "proc" in <process "proc"[K03]>
E PROC_INST_CREATION CREATED        - #08->#05 K05 - new <process "proc"> with variables: {key=123}
E PROC_INST          ACTIVATING     - #09->#07 K03 - PROCESS "proc" in <process "proc"[K03]>
E PROC_INST          ACTIVATED      - #10->#07 K03 - PROCESS "proc" in <process "proc"[K03]>
C PROC_INST          ACTIVATE       - #11->#07  -1 - START_EVENT "start_proc" in <process "proc"[K03]>
E PROC_INST          ACTIVATING     - #12->#11 K06 - START_EVENT "start_proc" in <process "proc"[K03]>
E PROC_INST          ACTIVATED      - #13->#11 K06 - START_EVENT "start_proc" in <process "proc"[K03]>
C PROC_INST          COMPLETE       - #14->#11 K06 - START_EVENT "start_proc" in <process "proc"[K03]>
E PROC_INST          COMPLETING     - #15->#14 K06 - START_EVENT "start_proc" in <process "proc"[K03]>
E PROC_INST          COMPLETED      - #16->#14 K06 - START_EVENT "start_proc" in <process "proc"[K03]>
E PROC_INST          SEQ_FLOW_TAKEN - #17->#14 K07 - SEQUENCE_FLOW "sequenc..655f9ae" in <process "proc"[K03]>
C PROC_INST          ACTIVATE       - #18->#14 K08 - SUB_PROCESS "sub" in <process "proc"[K03]>
E PROC_INST          ACTIVATING     - #19->#18 K08 - SUB_PROCESS "sub" in <process "proc"[K03]>
E PROC_MSG_SUB       CREATING       - #20->#18  -1 - "messageName" (inter.) correlationKey: 123 @[K08] in <process "proc"[K03]> (no vars)
E TIMER              CREATED        - #21->#18 K09 -  @"boundar..67d7335"[K08]  in <process "K01"[K03]> due T14:17:02.714
E PROC_INST          ACTIVATED      - #22->#18 K08 - SUB_PROCESS "sub" in <process "proc"[K03]>
C PROC_INST          ACTIVATE       - #23->#18  -1 - START_EVENT "startEv..2c49cf1" in <process "proc"[K03]>
C MSG_SUB            CREATE         - #24-> -1  -1 - "messageName" (inter.) correlationKey: 123 @[K08] in <process "proc"[K03]> (no vars)
E PROC_INST          ACTIVATING     - #25->#23 K10 - START_EVENT "startEv..2c49cf1" in <process "proc"[K03]>
E PROC_INST          ACTIVATED      - #26->#23 K10 - START_EVENT "startEv..2c49cf1" in <process "proc"[K03]>
C PROC_INST          COMPLETE       - #27->#23 K10 - START_EVENT "startEv..2c49cf1" in <process "proc"[K03]>
E MSG_SUB            CREATED        - #28->#24 K11 - "messageName" (inter.) correlationKey: 123 @[K08] in <process "proc"[K03]> (no vars)
C PROC_MSG_SUB       CREATE         - #29-> -1  -1 - "messageName" (inter.) @[K08] in <process ?[K03]> (no vars)
C MSG                PUBLISH        - #30-> -1  -1 - "messageName" correlationKey: 123 (no vars)
E PROC_INST          COMPLETING     - #31->#27 K10 - START_EVENT "startEv..2c49cf1" in <process "proc"[K03]>
E PROC_INST          COMPLETED      - #32->#27 K10 - START_EVENT "startEv..2c49cf1" in <process "proc"[K03]>
E PROC_INST          SEQ_FLOW_TAKEN - #33->#27 K12 - SEQUENCE_FLOW "sequenc..297e777" in <process "proc"[K03]>
C PROC_INST          ACTIVATE       - #34->#27 K13 - SERVICE_TASK "task" in <process "proc"[K03]>
E PROC_MSG_SUB       CREATED        - #35->#29  -1 - "messageName" (inter.) correlationKey: 123 @[K08] in <process "proc"[K03]> (no vars)
E MSG                PUBLISHED      - #36->#30 K14 - "messageName" correlationKey: 123 (no vars)
E MSG_SUB            CORRELATING    - #37->#30 K11 - "messageName" (inter.) correlationKey: 123 @[K08] in <process "proc"[K03]> (no vars)
E MSG                EXPIRED        - #38->#30 K14 - "messageName" correlationKey: 123 (no vars)
C PROC_MSG_SUB       CORRELATE      - #39-> -1  -1 - "messageName" (inter.) correlationKey: 123 @[K08] in <process "proc"[K03]> (no vars)
E PROC_INST          ACTIVATING     - #40->#34 K13 - SERVICE_TASK "task" in <process "proc"[K03]>
E JOB                CREATED        - #41->#34 K15 - K15 "task" @"task"[K13] 3 retries, in <process "proc"[K03]> (no vars)
E PROC_INST          ACTIVATED      - #42->#34 K13 - SERVICE_TASK "task" in <process "proc"[K03]>
C TIMER              TRIGGER        - #43->#34 K09 -  @"boundar..67d7335"[K08]  in <process "K01"[K03]> due T14:17:02.714
E PROC_MSG_SUB       CORRELATED     - #44->#39  -1 - "messageName" (inter.) correlationKey: 123 @[K08] in <process "proc"[K03]> (no vars)
E PROC_EVNT          TRIGGERING     - #45->#39 K16 -  @"event_sub_start"[K08] in <process K01[K03]> (no vars)
C TIMER              CANCEL         - #46->#39 K09 -  @"boundar..67d7335"[K08]  in <process "K01"[K03]> due T14:17:02.714
C PROC_INST          TERMINATE      - #47->#39 K13 - SERVICE_TASK "task" in <process "proc"[K03]>
C MSG_SUB            CORRELATE      - #48-> -1  -1 - "messageName" (inter.) @[K08] in <process "proc"[K03]> (no vars)
R TIMER              TRIGGER        - #49->#43 K09 -  @"boundar..67d7335"[K08]  in <process "K01"[K03]> due T14:17:02.714 !INVALID_STATE (Expected to trigger a timer with key '2251799813685257', but the timer is not active anymore)
C PROC_MSG_SUB       CORRELATE      - #50-> -1  -1 - "messageName" (inter.) correlationKey: 123 @[K08] in <process "proc"[K03]> (no vars)
E TIMER              CANCELED       - #51->#46 K09 -  @"boundar..67d7335"[K08]  in <process "K01"[K03]> due T14:17:02.714
E PROC_INST          TERMINATING    - #52->#47 K13 - SERVICE_TASK "task" in <process "proc"[K03]>
C JOB                CANCEL         - #53->#47 K15 - K15 "task" @"task"[K13] 3 retries, in <process "proc"[K03]> (no vars)
E PROC_INST          TERMINATED     - #54->#47 K13 - SERVICE_TASK "task" in <process "proc"[K03]>
E PROC_EVNT          TRIGGERED      - #55->#47 K16 -  @"event_sub_start"[K08] in <process K01[K03]> (no vars)
E PROC_INST          ACTIVATING     - #56->#47 K17 - EVENT_SUB_PROCESS "event_sub_proc" in <process "proc"[K03]>
E PROC_INST          ACTIVATED      - #57->#47 K17 - EVENT_SUB_PROCESS "event_sub_proc" in <process "proc"[K03]>
C PROC_INST          ACTIVATE       - #58->#47  -1 - START_EVENT "event_sub_start" in <process "proc"[K03]>
E MSG_SUB            CORRELATED     - #59->#48 K11 - "messageName" (inter.) correlationKey: 123 @[K08] in <process "proc"[K03]> (no vars)
R PROC_MSG_SUB       CORRELATE      - #60->#50  -1 - "messageName" (inter.) correlationKey: 123 @[K08] in <process "proc"[K03]> (no vars) !NOT_FOUND (Expected to correlate process message subscription with element key '2251799813685256' and message name 'messageName', but no such subscription was found)
C MSG_SUB            REJECT         - #61-> -1  -1 - "messageName" correlationKey: 123 @[ -1] in <process "proc"[K03]> (no vars)
E JOB                CANCELED       - #62->#53 K15 - K15 "task" @"task"[K13] 3 retries, in <process "proc"[K03]> (no vars)
E PROC_INST          ACTIVATING     - #63->#58 K18 - START_EVENT "event_sub_start" in <process "proc"[K03]>
E PROC_INST          ACTIVATED      - #64->#58 K18 - START_EVENT "event_sub_start" in <process "proc"[K03]>
C PROC_INST          COMPLETE       - #65->#58 K18 - START_EVENT "event_sub_start" in <process "proc"[K03]>
R MSG_SUB            REJECT         - #66->#61  -1 - "messageName" correlationKey: 123 @[ -1] in <process "proc"[K03]> (no vars) !INVALID_STATE (Expected message '2251799813685262' to be correlated for process with BPMN process id 'proc' but no correlation was found)
E PROC_INST          COMPLETING     - #67->#65 K18 - START_EVENT "event_sub_start" in <process "proc"[K03]>
E PROC_INST          COMPLETED      - #68->#65 K18 - START_EVENT "event_sub_start" in <process "proc"[K03]>
E PROC_INST          SEQ_FLOW_TAKEN - #69->#65 K19 - SEQUENCE_FLOW "sequenc..78e396b" in <process "proc"[K03]>
C PROC_INST          ACTIVATE       - #70->#65 K20 - SERVICE_TASK "Activity_00sk5wi" in <process "proc"[K03]>
E PROC_INST          ACTIVATING     - #71->#70 K20 - SERVICE_TASK "Activity_00sk5wi" in <process "proc"[K03]>
E JOB                CREATED        - #72->#70 K21 - K21 "other" @"Activity_00sk5wi"[K20] 3 retries, in <process "proc"[K03]> (no vars)
E PROC_INST          ACTIVATED      - #73->#70 K20 - SERVICE_TASK "Activity_00sk5wi" in <process "proc"[K03]>

-------------- Deployed Processes ----------------------
process.xml ------ 
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:ns0="http://camunda.org/schema/zeebe/1.0" xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" id="definitions_82b966a5-cba5-4f92-8e6e-c370e4216c61" targetNamespace="http://www.omg.org/spec/BPMN/20100524/MODEL" exporter="Zeebe Modeler" exporterVersion="0.11.0">
  <process id="proc" isExecutable="true">
    <startEvent id="start_proc" name="start_proc">
      <outgoing>sequenceFlow_c7948246-f47e-4be0-9314-023bb655f9ae</outgoing>
    </startEvent>
    <subProcess id="sub" name="sub">
      <incoming>sequenceFlow_c7948246-f47e-4be0-9314-023bb655f9ae</incoming>
      <startEvent id="startEvent_4cb47d4d-7f62-4537-84aa-d4cf92c49cf1">
        <outgoing>sequenceFlow_42ea434f-4673-49f7-aa5e-b07f4297e777</outgoing>
      </startEvent>
      <serviceTask id="task" name="task">
        <extensionElements>
          <ns0:taskDefinition type="task" />
        </extensionElements>
        <incoming>sequenceFlow_42ea434f-4673-49f7-aa5e-b07f4297e777</incoming>
        <outgoing>sequenceFlow_113d78ef-5602-4c61-b6b2-f4f0ca8657f0</outgoing>
      </serviceTask>
      <sequenceFlow id="sequenceFlow_42ea434f-4673-49f7-aa5e-b07f4297e777" sourceRef="startEvent_4cb47d4d-7f62-4537-84aa-d4cf92c49cf1" targetRef="task" />
      <endEvent id="endEvent_a7f3ebc5-9c5a-45b3-b5d9-f6eddbd1f6fd">
        <incoming>sequenceFlow_113d78ef-5602-4c61-b6b2-f4f0ca8657f0</incoming>
      </endEvent>
      <sequenceFlow id="sequenceFlow_113d78ef-5602-4c61-b6b2-f4f0ca8657f0" sourceRef="task" targetRef="endEvent_a7f3ebc5-9c5a-45b3-b5d9-f6eddbd1f6fd" />
      <subProcess id="event_sub_proc" name="event_sub_proc" triggeredByEvent="true">
        <startEvent id="event_sub_start" name="event_sub_start">
          <outgoing>sequenceFlow_647d6142-7709-43c0-b662-b05e378e396b</outgoing>
          <messageEventDefinition id="messageEventDefinition_771baa70-7a8c-436b-bcbe-ffdbf1e715ce" messageRef="message_67878739-f840-4152-99f0-a352dd9541c3" />
        </startEvent>
        <endEvent id="event_sub_end" name="event_sub_end">
          <incoming>Flow_18q2o3r</incoming>
        </endEvent>
        <sequenceFlow id="sequenceFlow_647d6142-7709-43c0-b662-b05e378e396b" sourceRef="event_sub_start" targetRef="Activity_00sk5wi" />
        <sequenceFlow id="Flow_18q2o3r" sourceRef="Activity_00sk5wi" targetRef="event_sub_end" />
        <serviceTask id="Activity_00sk5wi">
          <extensionElements>
            <ns0:taskDefinition type="other" />
          </extensionElements>
          <incoming>sequenceFlow_647d6142-7709-43c0-b662-b05e378e396b</incoming>
          <outgoing>Flow_18q2o3r</outgoing>
        </serviceTask>
      </subProcess>
    </subProcess>
    <sequenceFlow id="sequenceFlow_c7948246-f47e-4be0-9314-023bb655f9ae" sourceRef="start_proc" targetRef="sub" />
    <boundaryEvent id="boundaryEvent_20862c6e-b6c6-4e3a-a33a-562af67d7335" attachedToRef="sub">
      <outgoing>sequenceFlow_b67668b3-9b63-4c32-b5c9-f91655657511</outgoing>
      <timerEventDefinition id="timerEventDefinition_53fe9d42-090d-4234-ba0d-7e735680cfd1">
        <timeDuration id="timeDuration_065e7399-c41f-4a46-afc2-9dd746f62a9d">PT15S</timeDuration>
      </timerEventDefinition>
    </boundaryEvent>
    <endEvent id="end_proc" name="end_proc">
      <incoming>sequenceFlow_b67668b3-9b63-4c32-b5c9-f91655657511</incoming>
    </endEvent>
    <sequenceFlow id="sequenceFlow_b67668b3-9b63-4c32-b5c9-f91655657511" sourceRef="boundaryEvent_20862c6e-b6c6-4e3a-a33a-562af67d7335" targetRef="end_proc" />
  </process>
  <message id="message_67878739-f840-4152-99f0-a352dd9541c3" name="messageName">
    <extensionElements>
      <ns0:subscription correlationKey="=key" />
    </extensionElements>
  </message>
  <bpmndi:BPMNDiagram id="BPMNDiagram_c4afa61e-24f7-4026-b521-98e460c6e1af">
    <bpmndi:BPMNPlane id="BPMNPlane_0017be0e-7999-4e3e-afe1-9aa3523b5e6b" bpmnElement="proc">
      <bpmndi:BPMNEdge id="BPMNEdge_16bd327d-ea21-4170-b219-1754587bb0ba" bpmnElement="sequenceFlow_b67668b3-9b63-4c32-b5c9-f91655657511">
        <di:waypoint x="432" y="536" />
        <di:waypoint x="432" y="570" />
        <di:waypoint x="652" y="570" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_9e269366-1e93-4a9e-b54b-66c703c28266" bpmnElement="sequenceFlow_c7948246-f47e-4be0-9314-023bb655f9ae">
        <di:waypoint x="196" y="178" />
        <di:waypoint x="246" y="178" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="BPMNShape_8c80bbd1-4c0d-4766-820c-18669aad8699" bpmnElement="start_proc">
        <dc:Bounds x="160" y="160" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="153" y="196" width="50" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_7b1357ed-61ce-4730-83b9-3d55c4dae82b" bpmnElement="end_proc">
        <dc:Bounds x="652" y="552" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="647" y="588" width="47" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_2473ac10-1c4d-493c-a737-abc2f37f25d6" bpmnElement="sub" isExpanded="true">
        <dc:Bounds x="246" y="78" width="454" height="440" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="BPMNEdge_726e4c21-22a5-4f0c-bb5f-e078599e0ee9" bpmnElement="sequenceFlow_113d78ef-5602-4c61-b6b2-f4f0ca8657f0">
        <di:waypoint x="482" y="178" />
        <di:waypoint x="532" y="178" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_3e65c31e-3253-481a-b36d-f2de4d261b09" bpmnElement="sequenceFlow_42ea434f-4673-49f7-aa5e-b07f4297e777">
        <di:waypoint x="332" y="178" />
        <di:waypoint x="382" y="178" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="BPMNShape_1b15af91-1b1f-4f70-bc21-cd495f2ce311" bpmnElement="startEvent_4cb47d4d-7f62-4537-84aa-d4cf92c49cf1">
        <dc:Bounds x="296" y="160" width="36" height="36" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_09cabbae-5aa1-4309-8cc5-831865cfa155" bpmnElement="task">
        <dc:Bounds x="382" y="138" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_e3ab4547-b095-4d14-a583-4cc957c430e0" bpmnElement="endEvent_a7f3ebc5-9c5a-45b3-b5d9-f6eddbd1f6fd">
        <dc:Bounds x="532" y="160" width="36" height="36" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_ebdb2804-9b5a-40c3-b84b-12154419807d" bpmnElement="event_sub_proc" isExpanded="true">
        <dc:Bounds x="290" y="250" width="350" height="200" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="BPMNEdge_78ea5249-dadb-4be1-869f-92d8c76af40c" bpmnElement="sequenceFlow_647d6142-7709-43c0-b662-b05e378e396b">
        <di:waypoint x="376" y="350" />
        <di:waypoint x="410" y="350" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_18q2o3r_di" bpmnElement="Flow_18q2o3r">
        <di:waypoint x="510" y="350" />
        <di:waypoint x="542" y="350" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="BPMNShape_bfc02561-954f-417f-9f67-c81b8fdc8e7b" bpmnElement="event_sub_start">
        <dc:Bounds x="340" y="332" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="319" y="368" width="79" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_17a77778-b950-447f-bfeb-2047e4c7ae46" bpmnElement="event_sub_end">
        <dc:Bounds x="542" y="332" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="522" y="368" width="76" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Activity_1r3bgm4_di" bpmnElement="Activity_00sk5wi">
        <dc:Bounds x="410" y="310" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_833af4cf-49f8-47ff-bc03-17414573d4ce" bpmnElement="boundaryEvent_20862c6e-b6c6-4e3a-a33a-562af67d7335">
        <dc:Bounds x="414" y="500" width="36" height="36" />
      </bpmndi:BPMNShape>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>

--------------- Decomposed keys (for debugging) -----------------
 -1 <-> -1
K01 <-> 2251799813685249
K02 <-> 2251799813685250
K03 <-> 2251799813685251
K04 <-> 2251799813685252
K05 <-> 2251799813685253
K06 <-> 2251799813685254
K07 <-> 2251799813685255
K08 <-> 2251799813685256
K09 <-> 2251799813685257
K10 <-> 2251799813685258
K11 <-> 2251799813685259
K12 <-> 2251799813685260
K13 <-> 2251799813685261
K14 <-> 2251799813685262
K15 <-> 2251799813685263
K16 <-> 2251799813685264
K17 <-> 2251799813685265
K18 <-> 2251799813685266
K19 <-> 2251799813685267
K20 <-> 2251799813685268
K21 <-> 2251799813685269

14:16:52.916 [] DEBUG io.zeebe.util.buffer - Close stream processor
14:16:52.917 [Broker-0-StreamProcessor-1] DEBUG io.zeebe.logstreams - Closed stream processor controller Broker-0-StreamProcessor-1.
14:16:52.967 [Broker-0-LogStream-1] INFO  io.zeebe.logstreams - Close appender for log stream stream-1
14:16:52.968 [stream-1-write-buffer] DEBUG io.zeebe.dispatcher - Dispatcher closed
14:16:52.968 [Broker-0-LogStream-1] INFO  io.zeebe.logstreams - On closing logstream stream-1 close 2 readers
14:16:52.968 [] DEBUG io.zeebe.broker.test - Clean up test files on path /tmp/junit2260845461591156480
14:16:52.969 [] DEBUG io.zeebe.util.actor - Closing actor thread ground '-zb-fs-workers'
14:16:52.969 [] DEBUG io.zeebe.util.actor - Closing actor thread ground '-zb-actors'
14:16:52.970 [] DEBUG io.zeebe.util.actor - Closing actor thread ground '-zb-fs-workers': closed successfully
14:16:52.971 [] DEBUG io.zeebe.util.actor - Closing actor thread ground '-zb-actors': closed successfully

java.lang.AssertionError: 
Expecting:
  [(PROCESS, ACTIVATE_ELEMENT),
    (PROCESS, ELEMENT_ACTIVATING),
    (PROCESS, ELEMENT_ACTIVATED),
    (START_EVENT, ACTIVATE_ELEMENT),
    (START_EVENT, ELEMENT_ACTIVATING),
    (START_EVENT, ELEMENT_ACTIVATED),
    (START_EVENT, COMPLETE_ELEMENT),
    (START_EVENT, ELEMENT_COMPLETING),
    (START_EVENT, ELEMENT_COMPLETED),
    (SEQUENCE_FLOW, SEQUENCE_FLOW_TAKEN),
    (SUB_PROCESS, ACTIVATE_ELEMENT),
    (SUB_PROCESS, ELEMENT_ACTIVATING),
    (SUB_PROCESS, ELEMENT_ACTIVATED),
    (START_EVENT, ACTIVATE_ELEMENT),
    (START_EVENT, ELEMENT_ACTIVATING),
    (START_EVENT, ELEMENT_ACTIVATED),
    (START_EVENT, COMPLETE_ELEMENT),
    (START_EVENT, ELEMENT_COMPLETING),
    (START_EVENT, ELEMENT_COMPLETED),
    (SEQUENCE_FLOW, SEQUENCE_FLOW_TAKEN),
    (SERVICE_TASK, ACTIVATE_ELEMENT),
    (SERVICE_TASK, ELEMENT_ACTIVATING),
    (SERVICE_TASK, ELEMENT_ACTIVATED),
    (SERVICE_TASK, TERMINATE_ELEMENT),
    (SERVICE_TASK, ELEMENT_TERMINATING),
    (SERVICE_TASK, ELEMENT_TERMINATED),
    (EVENT_SUB_PROCESS, ELEMENT_ACTIVATING),
    (EVENT_SUB_PROCESS, ELEMENT_ACTIVATED),
    (START_EVENT, ACTIVATE_ELEMENT),
    (START_EVENT, ELEMENT_ACTIVATING),
    (START_EVENT, ELEMENT_ACTIVATED),
    (START_EVENT, COMPLETE_ELEMENT),
    (START_EVENT, ELEMENT_COMPLETING),
    (START_EVENT, ELEMENT_COMPLETED),
    (SEQUENCE_FLOW, SEQUENCE_FLOW_TAKEN),
    (SERVICE_TASK, ACTIVATE_ELEMENT),
    (SERVICE_TASK, ELEMENT_ACTIVATING),
    (SERVICE_TASK, ELEMENT_ACTIVATED)]
to contain subsequence:
  [(BOUNDARY_EVENT, ELEMENT_ACTIVATED),
    (BOUNDARY_EVENT, ELEMENT_COMPLETED),
    (PROCESS, ELEMENT_COMPLETED)]


	at io.zeebe.engine.processing.bpmn.subprocess.InterruptingEventSubprocessConcurrencyTest.shouldTriggerBoundaryAndTerminateFlowScope(InterruptingEventSubprocessConcurrencyTest.java:166)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:61)
	at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:54)
	at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:54)
	at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:54)
	at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:54)
	at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:54)
	at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:54)
	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
	at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
	at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:220)
	at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:53)


Process finished with exit code 255

Environment:

  • OS:
  • Zeebe Version:
  • Configuration:
@Zelldon Zelldon added kind/bug Categorizes an issue or PR as a bug scope/broker Marks an issue or PR to appear in the broker section of the changelog severity/high Marks a bug as having a noticeable impact on the user with no known workaround Status: Needs Priority labels Apr 26, 2021
@npepinpe npepinpe added this to Ready in Zeebe Apr 27, 2021
@Zelldon
Copy link
Member Author

Zelldon commented May 6, 2021

I had a closer look why this happens and I think the bad guy is this https://github.com/camunda-cloud/zeebe/blob/develop/engine/src/main/java/io/camunda/zeebe/engine/processing/common/EventTriggerBehavior.java#L106

We unsubscribe for all kind of events, when we triggered a event sub process, which is in general ok because we don't want to trigger other interrupting event sub processes. On root level it is no problem because the flow scope is the process instance and for a boundary event it has the activity as scope. But for embedded sub processes it is an issue, since here the scopes are the same. So either we don't unsubscribe, since interrupting should be enough. Or we somehow detect that one subscription is for a boundary event, which we don't delete then.

Appreciate your input @saig0

@Zelldon Zelldon self-assigned this May 6, 2021
@Zelldon Zelldon moved this from Ready to In progress in Zeebe May 6, 2021
@Zelldon
Copy link
Member Author

Zelldon commented May 6, 2021

Discussed with @saig0:

First it looked promising with not subscribing for event sub processes, but later we realized that it can cause issues with messages, since they are marked as correlated but not really trigger anything in the process execution.

We will use the other approach to only unsubscribe for other event sub processes. In order to do that we add a new property to the TimerRecord and ProcessMessageSubscriptionRecord, which allows us to determine the target element type.

Next steps:

  1. Create issue to add event sub process builder to the embedded process
  2. Add element type to TimerRecord and ProcessMessageSubscriptionRecord (could be separate PR's)
  3. Unsubscribe only for event sub processes, not for boundary events. (this fixes the current issue)

This is something which makes it probably not into 1.0, so we should also handle the case where the element type is not available. We should handle the default value as before that we just unsubscribe.

@npepinpe npepinpe moved this from In progress to Ready in Zeebe May 7, 2021
@Zelldon Zelldon removed their assignment May 19, 2021
@npepinpe npepinpe moved this from Ready to Planned in Zeebe Oct 29, 2021
@npepinpe npepinpe moved this from Planned to Ready in Zeebe Nov 11, 2021
@KerstinHebel KerstinHebel removed this from Ready in Zeebe Mar 23, 2022
@saig0 saig0 self-assigned this Apr 12, 2022
zeebe-bors-camunda bot added a commit that referenced this issue Apr 27, 2022
9175: Trigger boundary events after an interrupting event subprocess is triggered r=saig0 a=saig0

## Description

Fixing the issue that boundary events can't be triggered after an interrupting event subprocess is triggered on the scope. 

Solve the issue by:
* avoid that event subscriptions of boundary event are removed when an interrupting event scope is triggered
  * introduce a filter when removing the event subscriptions
  * filter by event subprocesses and ignore other event subscriptions
* extend the event scope instance state to distinguish interrupting event subscriptions from boundary events
  * add the property `boundaryElementIds` for event scopes to distinguish boundary events from other events in the scope 
  * add the property `interrupted` for event scopes to mark if an interrupting event (subprocess) is triggered
  * if the event scope is interrupted then no other interrupting or non-interrupting events can be triggered
  * only boundary events can be triggered for an interrupted event scope
  * if an interrupting boundary event is triggered then the event scope doesn't accept any other event 

Maintenance:
* remove methods from the event scope state that are not used in production code
* migrate the event scope state test to JUnit 5       

## Related issues

closes #6874 



Co-authored-by: Philipp Ossler <philipp.ossler@gmail.com>
zeebe-bors-camunda bot added a commit that referenced this issue Apr 27, 2022
9175: Trigger boundary events after an interrupting event subprocess is triggered r=saig0 a=saig0

## Description

Fixing the issue that boundary events can't be triggered after an interrupting event subprocess is triggered on the scope. 

Solve the issue by:
* avoid that event subscriptions of boundary event are removed when an interrupting event scope is triggered
  * introduce a filter when removing the event subscriptions
  * filter by event subprocesses and ignore other event subscriptions
* extend the event scope instance state to distinguish interrupting event subscriptions from boundary events
  * add the property `boundaryElementIds` for event scopes to distinguish boundary events from other events in the scope 
  * add the property `interrupted` for event scopes to mark if an interrupting event (subprocess) is triggered
  * if the event scope is interrupted then no other interrupting or non-interrupting events can be triggered
  * only boundary events can be triggered for an interrupted event scope
  * if an interrupting boundary event is triggered then the event scope doesn't accept any other event 

Maintenance:
* remove methods from the event scope state that are not used in production code
* migrate the event scope state test to JUnit 5       

## Related issues

closes #6874 



Co-authored-by: Philipp Ossler <philipp.ossler@gmail.com>
zeebe-bors-camunda bot added a commit that referenced this issue Apr 28, 2022
9241: [Backport 8.0] Trigger boundary events after an interrupting event subprocess is triggered r=pihme a=saig0

## Description

Backport of #9175

## Related issues

relates to #6874


Co-authored-by: Philipp Ossler <philipp.ossler@gmail.com>
zeebe-bors-camunda bot added a commit that referenced this issue Apr 28, 2022
9242: [Backport 1.3] Trigger boundary events after an interrupting event subprocess is triggered r=pihme a=saig0

## Description

Backport of #9175

## Related issues

relates to #6874


Co-authored-by: Philipp Ossler <philipp.ossler@gmail.com>
zeebe-bors-camunda bot added a commit that referenced this issue Apr 28, 2022
9241: [Backport 8.0] Trigger boundary events after an interrupting event subprocess is triggered r=saig0 a=saig0

## Description

Backport of #9175

## Related issues

relates to #6874


Co-authored-by: Philipp Ossler <philipp.ossler@gmail.com>
zeebe-bors-camunda bot added a commit that referenced this issue Apr 28, 2022
9242: [Backport 1.3] Trigger boundary events after an interrupting event subprocess is triggered r=saig0 a=saig0

## Description

Backport of #9175

## Related issues

relates to #6874


Co-authored-by: Philipp Ossler <philipp.ossler@gmail.com>
zeebe-bors-camunda bot added a commit that referenced this issue Apr 28, 2022
9241: [Backport 8.0] Trigger boundary events after an interrupting event subprocess is triggered r=saig0 a=saig0

## Description

Backport of #9175

## Related issues

relates to #6874


Co-authored-by: Philipp Ossler <philipp.ossler@gmail.com>
@deepthidevaki deepthidevaki added the version:8.1.0-alpha1 Marks an issue as being completely or in parts released in 8.1.0-alpha1 label May 3, 2022
@Zelldon Zelldon added the version:8.1.0 Marks an issue as being completely or in parts released in 8.1.0 label Oct 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes an issue or PR as a bug scope/broker Marks an issue or PR to appear in the broker section of the changelog severity/high Marks a bug as having a noticeable impact on the user with no known workaround version:1.3.8 version:8.1.0-alpha1 Marks an issue as being completely or in parts released in 8.1.0-alpha1 version:8.1.0 Marks an issue as being completely or in parts released in 8.1.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants