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

Using modification, I can't activate an element if an interrupting event subprocess was triggered #10477

Closed
saig0 opened this issue Sep 26, 2022 · 3 comments · Fixed by #10609
Assignees
Labels
area/reliability Marks an issue as related to improving the reliability of our software (i.e. it behaves as expected) area/ux Marks an issue as related to improving the user experience 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:8.1.1 Marks an issue as being completely or in parts released in 8.1.1 version:8.2.0-alpha1 Marks an issue as being completely or in parts released in 8.2.0-alpha1 version:8.2.0 Marks an issue as being completely or in parts released in 8.2.0

Comments

@saig0
Copy link
Member

saig0 commented Sep 26, 2022

Describe the bug

The process instance modification doesn't work if an interrupting event subprocess was triggered.

I deployed a process with an interrupting event subprocess. I created an instance of the process. The interrupting event subprocess was triggered.

Now, I try to modify the process instance and activate an element that is in the same scope as the event subprocess (e.g. the subprocess that contains the task C). The modification command is applied (i.e. no rejection) but the element is not activated.

If I try to activate an element in a nested scope instead (e.g. the task C) then it works and the element (e.g. task C) and its flow scopes (e.g. the subprocess that contains C) are activated.

image

To Reproduce

  1. Deploy the process: issue-10477.bpmn (with the correct .bpmn file extension)
  2. Create an instance of the process
  3. Trigger the event subprocess by publishing a message
  4. Modify the process instance and try to activate the subprocess
  5. Verify that the subprocess is not activated
JUnit test

@Test  
public void shouldActivateElementInInterruptedFlowScope() {  
  // given  
  ENGINE  
      .deployment()  
      .withXmlResource(  
          Bpmn.createExecutableProcess(PROCESS_ID)  
              .eventSubProcess(  
                  "event-subprocess",  
                  eventSubprocess ->  
                      eventSubprocess  
                          .startEvent()  
                          .interrupting(true)  
                          .message(  
                              message ->  
                                  message.name("interrupt").zeebeCorrelationKeyExpression("key"))  
                          .userTask("A")  
                          .endEvent())  
              .startEvent()  
              .userTask("B")  
              .subProcess(  
                  "subprocess",  
                  subprocess ->  
                      subprocess.embeddedSubProcess().startEvent().userTask("C").endEvent())  
              .endEvent()  
              .done())  
      .deploy();  
  
  final var processInstanceKey =  
      ENGINE.processInstance().ofBpmnProcessId(PROCESS_ID).withVariable("key", "key-1").create();  
  
  RecordingExporter.processInstanceRecords(ProcessInstanceIntent.ELEMENT_ACTIVATED)  
      .withProcessInstanceKey(processInstanceKey)  
      .withElementId("B")  
      .await();  
  
  ENGINE  
      .message()  
      .withName("interrupt")  
      .withCorrelationKey("key-1")  
      .withTimeToLive(Duration.ofMinutes(1))  
      .publish();  
  
  RecordingExporter.processInstanceRecords(ProcessInstanceIntent.ELEMENT_ACTIVATED)  
      .withProcessInstanceKey(processInstanceKey)  
      .withElementId("A")  
      .await();  
  
  // when  
  ENGINE  
      .processInstance()  
      .withInstanceKey(processInstanceKey)  
      .modification()  
      .activateElement("C")  
      .activateElement("subprocess")  
      .modify();  
  
  // then  
  Assertions.assertThat(  
          RecordingExporter.processInstanceRecords(ProcessInstanceIntent.ELEMENT_ACTIVATED)  
              .withProcessInstanceKey(processInstanceKey)  
              .withElementId("C")  
              .exists())  
      .isTrue();  
  
  Assertions.assertThat(  
          RecordingExporter.processInstanceRecords(ProcessInstanceIntent.ELEMENT_ACTIVATED)  
              .withProcessInstanceKey(processInstanceKey)  
              .withElementId("subprocess")  
              .limit(2)  
              .count())  
      .isEqualTo(2);  
}

Expected behavior

Using the process instance modification, I can activate an element if an interrupting event subprocess was triggered in the same scope.

Log/Stacktrace

Test output

	['C'ommand/'E'event/'R'ejection] [valueType] [intent] - #[position]->#[source record position] 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 DPLY         CREATE            - #01-> -1  -1 - 
E PROC         CREATED           - #02->#01 K01 - process.xml -> "process" (version:1)
E DPLY         CREATED           - #03->#01 K02 - process.xml
E DPLY         FULLY_DISTRIBUTED - #04->#01 K02 - 
C CREA         CREATE            - #05-> -1  -1 - new <process "process"> (default start)  with variables: {key=key-1}
E VAR          CREATED           - #06->#05 K04 - key->"key-1" in <process [K03]>
C PI           ACTIVATE          - #07->#05 K03 - PROCESS "process" in <process "process"[K03]>
E CREA         CREATED           - #08->#05 K05 - new <process "process"> (default start)  with variables: {key=key-1}
E PI           ACTIVATING        - #09->#07 K03 - PROCESS "process" in <process "process"[K03]>
E PI           ACTIVATED         - #10->#07 K03 - PROCESS "process" in <process "process"[K03]>
C PI           ACTIVATE          - #11->#07  -1 - START_EVENT "startEv..68def4b" in <process "process"[K03]>
E PI           ACTIVATING        - #12->#11 K06 - START_EVENT "startEv..68def4b" in <process "process"[K03]>
E PI           ACTIVATED         - #13->#11 K06 - START_EVENT "startEv..68def4b" in <process "process"[K03]>
C PI           COMPLETE          - #14->#11 K06 - START_EVENT "startEv..68def4b" in <process "process"[K03]>
E PI           COMPLETING        - #15->#14 K06 - START_EVENT "startEv..68def4b" in <process "process"[K03]>
E PROC_MSG_SUB CREATING          - #16->#14 K07 - "interrupt" (inter.) correlationKey: key-1 @[K03] in <process "process"[K03]> (no vars)
E PI           COMPLETED         - #17->#14 K06 - START_EVENT "startEv..68def4b" in <process "process"[K03]>
E PI           SEQ_FLOW_TAKEN    - #18->#14 K08 - SEQUENCE_FLOW "sequenc..8fdcbf8" in <process "process"[K03]>
C PI           ACTIVATE          - #19->#14 K09 - USER_TASK "B" in <process "process"[K03]>
C MSG_SUB      CREATE            - #20-> -1  -1 - "interrupt" (inter.) correlationKey: key-1 @[K03] in <process "process"[K03]> (no vars)
E PI           ACTIVATING        - #21->#19 K09 - USER_TASK "B" in <process "process"[K03]>
E JOB          CREATED           - #22->#19 K10 - K10 "io.camunda.zeebe:userTask" @"B"[K09] 1 retries, in <process "process"[K03]> (no vars)
E PI           ACTIVATED         - #23->#19 K09 - USER_TASK "B" in <process "process"[K03]>
E MSG_SUB      CREATED           - #24->#20 K11 - "interrupt" (inter.) correlationKey: key-1 @[K03] in <process "process"[K03]> (no vars)
C PROC_MSG_SUB CREATE            - #25-> -1  -1 - "interrupt" (inter.) @[K03] in <process ?[K03]> (no vars)
C MSG          PUBLISH           - #26-> -1  -1 - "interrupt" correlationKey: key-1 (no vars)
E PROC_MSG_SUB CREATED           - #27->#25 K07 - "interrupt" (inter.) correlationKey: key-1 @[K03] in <process "process"[K03]> (no vars)
E MSG          PUBLISHED         - #28->#26 K12 - "interrupt" correlationKey: key-1 (no vars)
E MSG_SUB      CORRELATING       - #29->#26 K11 - "interrupt" (inter.) correlationKey: key-1 @[K03] in <process "process"[K03]> (no vars)
C PROC_MSG_SUB CORRELATE         - #30-> -1  -1 - "interrupt" (inter.) correlationKey: key-1 @[K03] in <process "process"[K03]> (no vars)
C MSG_SUB      CORRELATE         - #31-> -1  -1 - "interrupt" (inter.) @[K03] in <process "process"[K03]> (no vars)
E PROC_MSG_SUB CORRELATED        - #32->#30 K07 - "interrupt" (inter.) correlationKey: key-1 @[K03] in <process "process"[K03]> (no vars)
E PROC_EVNT    TRIGGERING        - #33->#30 K13 -  @"startEv..f436214"[K03] in <process K01[K03]> (no vars)
C PI           TERMINATE         - #34->#30 K09 - USER_TASK "B" in <process "process"[K03]>
E MSG_SUB      CORRELATED        - #35->#31 K11 - "interrupt" (inter.) correlationKey: key-1 @[K03] in <process "process"[K03]> (no vars)
E PI           TERMINATING       - #36->#34 K09 - USER_TASK "B" in <process "process"[K03]>
E JOB          CANCELED          - #37->#34 K10 - K10 "io.camunda.zeebe:userTask" @"B"[K09] 1 retries, in <process "process"[K03]> (no vars)
E PI           TERMINATED        - #38->#34 K09 - USER_TASK "B" in <process "process"[K03]>
C PI           ACTIVATE          - #39->#34  -1 - EVENT_SUB_PROCESS "event-subprocess" in <process "process"[K03]>
E PI           ACTIVATING        - #40->#39 K14 - EVENT_SUB_PROCESS "event-subprocess" in <process "process"[K03]>
E PI           ACTIVATED         - #41->#39 K14 - EVENT_SUB_PROCESS "event-subprocess" in <process "process"[K03]>
C PI           ACTIVATE          - #42->#39  -1 - START_EVENT "startEv..f436214" in <process "process"[K03]>
E PI           ACTIVATING        - #43->#42 K15 - START_EVENT "startEv..f436214" in <process "process"[K03]>
E PI           ACTIVATED         - #44->#42 K15 - START_EVENT "startEv..f436214" in <process "process"[K03]>
C PI           COMPLETE          - #45->#42 K15 - START_EVENT "startEv..f436214" in <process "process"[K03]>
E PI           COMPLETING        - #46->#45 K15 - START_EVENT "startEv..f436214" in <process "process"[K03]>
E PI           COMPLETED         - #47->#45 K15 - START_EVENT "startEv..f436214" in <process "process"[K03]>
E PI           SEQ_FLOW_TAKEN    - #48->#45 K16 - SEQUENCE_FLOW "sequenc..3d27e30" in <process "process"[K03]>
C PI           ACTIVATE          - #49->#45 K17 - USER_TASK "A" in <process "process"[K03]>
E PI           ACTIVATING        - #50->#49 K17 - USER_TASK "A" in <process "process"[K03]>
E JOB          CREATED           - #51->#49 K18 - K18 "io.camunda.zeebe:userTask" @"A"[K17] 1 retries, in <process "process"[K03]> (no vars)
E PI           ACTIVATED         - #52->#49 K17 - USER_TASK "A" in <process "process"[K03]>
C MOD          MODIFY            - #53-> -1 K03 - <activate "C" no vars> <activate "subprocess" no vars> 
E PI           ACTIVATING        - #54->#53 K19 - SUB_PROCESS "subprocess" in <process "process"[K03]>
E PI           ACTIVATED         - #55->#53 K19 - SUB_PROCESS "subprocess" in <process "process"[K03]>
C PI           ACTIVATE          - #56->#53 K20 - USER_TASK "C" in <process "process"[K03]>
C PI           ACTIVATE          - #57->#53 K21 - SUB_PROCESS "subprocess" in <process "process"[K03]>
E MOD          MODIFIED          - #58->#53 K03 - <activate "C" no vars> <activate "subprocess" no vars> 
E PI           ACTIVATING        - #59->#56 K20 - USER_TASK "C" in <process "process"[K03]>
E JOB          CREATED           - #60->#56 K22 - K22 "io.camunda.zeebe:userTask" @"C"[K20] 1 retries, in <process "process"[K03]> (no vars)
E PI           ACTIVATED         - #61->#56 K20 - USER_TASK "C" in <process "process"[K03]>
R PI           ACTIVATE          - #62->#57 K21 - SUB_PROCESS "subprocess" in <process "process"[K03]> !INVALID_STATE (Expected flow scope instance to be not interrupted but was interrupted by an event with id 'event-subprocess'.)

-------------- Deployed Processes ----------------------
process.xml -> "process" (version:1)[K01] ------
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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" id="definitions_86d5572f-8d46-43b4-99e6-3dddec01cf8b" targetNamespace="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL">
  <process id="process" isExecutable="true">
    <subProcess id="event-subprocess" name="event-subprocess" triggeredByEvent="true">
      <startEvent id="startEvent_dc4108c2-265a-4597-bb34-cb966f436214" isInterrupting="true">
        <outgoing>sequenceFlow_e1d2f999-c0d4-4d8d-9404-ad5363d27e30</outgoing>
        <messageEventDefinition id="messageEventDefinition_cdcc7ec2-78c3-4cca-a578-faa2eeccca85" messageRef="message_5260f7c4-e1d3-420f-a1fc-342494ce6805"/>
      </startEvent>
      <userTask id="A" name="A">
        <incoming>sequenceFlow_e1d2f999-c0d4-4d8d-9404-ad5363d27e30</incoming>
        <outgoing>sequenceFlow_8d4c9435-cfc0-45be-b6d3-3b53155a9dc6</outgoing>
      </userTask>
      <sequenceFlow id="sequenceFlow_e1d2f999-c0d4-4d8d-9404-ad5363d27e30" sourceRef="startEvent_dc4108c2-265a-4597-bb34-cb966f436214" targetRef="A"/>
      <endEvent id="endEvent_3fbd6729-1c22-4df6-9169-0bb519cc302b">
        <incoming>sequenceFlow_8d4c9435-cfc0-45be-b6d3-3b53155a9dc6</incoming>
      </endEvent>
      <sequenceFlow id="sequenceFlow_8d4c9435-cfc0-45be-b6d3-3b53155a9dc6" sourceRef="A" targetRef="endEvent_3fbd6729-1c22-4df6-9169-0bb519cc302b"/>
    </subProcess>
    <startEvent id="startEvent_f59c6942-5997-4415-8421-bb03968def4b">
      <outgoing>sequenceFlow_bc04dda8-9ea9-48b6-8b83-48dec8fdcbf8</outgoing>
    </startEvent>
    <userTask id="B" name="B">
      <incoming>sequenceFlow_bc04dda8-9ea9-48b6-8b83-48dec8fdcbf8</incoming>
      <outgoing>sequenceFlow_db1bc086-f04d-45c7-ad96-4c8865139577</outgoing>
    </userTask>
    <sequenceFlow id="sequenceFlow_bc04dda8-9ea9-48b6-8b83-48dec8fdcbf8" sourceRef="startEvent_f59c6942-5997-4415-8421-bb03968def4b" targetRef="B"/>
    <subProcess id="subprocess" name="subprocess">
      <incoming>sequenceFlow_db1bc086-f04d-45c7-ad96-4c8865139577</incoming>
      <outgoing>sequenceFlow_81005242-1cc3-4152-b087-357a87a287bc</outgoing>
      <startEvent id="startEvent_397f89f8-a3b1-4439-b7a9-3e3807500ffd">
        <outgoing>sequenceFlow_dc7b5f05-12a1-4cd0-8d22-1ed06b2f2eeb</outgoing>
      </startEvent>
      <userTask id="C" name="C">
        <incoming>sequenceFlow_dc7b5f05-12a1-4cd0-8d22-1ed06b2f2eeb</incoming>
        <outgoing>sequenceFlow_e88c17e4-4d79-45fd-97c4-574893d11231</outgoing>
      </userTask>
      <sequenceFlow id="sequenceFlow_dc7b5f05-12a1-4cd0-8d22-1ed06b2f2eeb" sourceRef="startEvent_397f89f8-a3b1-4439-b7a9-3e3807500ffd" targetRef="C"/>
      <endEvent id="endEvent_3181c8ec-5d96-4260-ab25-bb3559d0c70c">
        <incoming>sequenceFlow_e88c17e4-4d79-45fd-97c4-574893d11231</incoming>
      </endEvent>
      <sequenceFlow id="sequenceFlow_e88c17e4-4d79-45fd-97c4-574893d11231" sourceRef="C" targetRef="endEvent_3181c8ec-5d96-4260-ab25-bb3559d0c70c"/>
    </subProcess>
    <sequenceFlow id="sequenceFlow_db1bc086-f04d-45c7-ad96-4c8865139577" sourceRef="B" targetRef="subprocess"/>
    <endEvent id="endEvent_95290af5-7e3a-4b36-b439-032c416cdb2e">
      <incoming>sequenceFlow_81005242-1cc3-4152-b087-357a87a287bc</incoming>
    </endEvent>
    <sequenceFlow id="sequenceFlow_81005242-1cc3-4152-b087-357a87a287bc" sourceRef="subprocess" targetRef="endEvent_95290af5-7e3a-4b36-b439-032c416cdb2e"/>
  </process>
  <message id="message_5260f7c4-e1d3-420f-a1fc-342494ce6805" name="interrupt">
    <extensionElements>
      <ns0:subscription correlationKey="=key"/>
    </extensionElements>
  </message>
  <bpmndi:BPMNDiagram id="BPMNDiagram_02e2e8da-51e0-4920-82fe-31c0ed6bf9e8">
    <bpmndi:BPMNPlane bpmnElement="process" id="BPMNPlane_b3ed0e53-1dcd-413b-9adb-cb8446d18578">
      <bpmndi:BPMNShape bpmnElement="event-subprocess" id="BPMNShape_270ca37b-7f61-4110-a8e5-2462691f2422" isExpanded="true">
        <dc:Bounds height="200.0" width="372.0" x="100.0" y="250.0"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="startEvent_dc4108c2-265a-4597-bb34-cb966f436214" id="BPMNShape_17d660a1-4983-4886-954e-8b9326ea004a">
        <dc:Bounds height="36.0" width="36.0" x="150.0" y="332.0"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="A" id="BPMNShape_3e0341a9-cea7-4d37-81e7-1bf2a92b4a9c">
        <dc:Bounds height="80.0" width="100.0" x="236.0" y="310.0"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="sequenceFlow_e1d2f999-c0d4-4d8d-9404-ad5363d27e30" id="BPMNEdge_6ad52a12-3250-465d-9c8c-e28ff27aa65b">
        <di:waypoint x="186.0" y="350.0"/>
        <di:waypoint x="236.0" y="350.0"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape bpmnElement="endEvent_3fbd6729-1c22-4df6-9169-0bb519cc302b" id="BPMNShape_364faadd-b958-46f4-93f9-460baf0103b3">
        <dc:Bounds height="36.0" width="36.0" x="386.0" y="332.0"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="sequenceFlow_8d4c9435-cfc0-45be-b6d3-3b53155a9dc6" id="BPMNEdge_00474f9d-b903-4155-bc17-90fd9d6e11f3">
        <di:waypoint x="336.0" y="350.0"/>
        <di:waypoint x="386.0" y="350.0"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape bpmnElement="startEvent_f59c6942-5997-4415-8421-bb03968def4b" id="BPMNShape_78c7fb55-82b9-4757-b8a7-cc2e603662f3">
        <dc:Bounds height="36.0" width="36.0" x="100.0" y="100.0"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="B" id="BPMNShape_e2a67fba-2ae7-461a-b910-99d5d5fa8b8e">
        <dc:Bounds height="80.0" width="100.0" x="186.0" y="78.0"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="sequenceFlow_bc04dda8-9ea9-48b6-8b83-48dec8fdcbf8" id="BPMNEdge_620bd811-7e0b-4fd6-82b7-8d8181e7527c">
        <di:waypoint x="136.0" y="118.0"/>
        <di:waypoint x="186.0" y="118.0"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape bpmnElement="subprocess" id="BPMNShape_59b6545b-c34f-4cf4-b798-ace76e631ac0" isExpanded="true">
        <dc:Bounds height="200.0" width="372.0" x="336.0" y="18.0"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="sequenceFlow_db1bc086-f04d-45c7-ad96-4c8865139577" id="BPMNEdge_5a2b4576-6026-4f85-9e68-1bc1060daa53">
        <di:waypoint x="286.0" y="118.0"/>
        <di:waypoint x="336.0" y="118.0"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape bpmnElement="startEvent_397f89f8-a3b1-4439-b7a9-3e3807500ffd" id="BPMNShape_fbe1a57c-9b9d-4473-9232-1d47e72677c4">
        <dc:Bounds height="36.0" width="36.0" x="386.0" y="100.0"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="C" id="BPMNShape_2a28fc5a-aac1-4c6a-a24e-34e697a98ab3">
        <dc:Bounds height="80.0" width="100.0" x="472.0" y="78.0"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="sequenceFlow_dc7b5f05-12a1-4cd0-8d22-1ed06b2f2eeb" id="BPMNEdge_77970d68-dd2d-4e4b-8a23-4c22d78e301f">
        <di:waypoint x="422.0" y="118.0"/>
        <di:waypoint x="472.0" y="118.0"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape bpmnElement="endEvent_3181c8ec-5d96-4260-ab25-bb3559d0c70c" id="BPMNShape_e4632127-599c-4031-a410-5805b3b8489f">
        <dc:Bounds height="36.0" width="36.0" x="622.0" y="100.0"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="sequenceFlow_e88c17e4-4d79-45fd-97c4-574893d11231" id="BPMNEdge_b68b476a-bef3-400d-84c1-5afb999234d2">
        <di:waypoint x="572.0" y="118.0"/>
        <di:waypoint x="622.0" y="118.0"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape bpmnElement="endEvent_95290af5-7e3a-4b36-b439-032c416cdb2e" id="BPMNShape_8a6f7a80-fc4e-4a91-8210-276861b3c7f5">
        <dc:Bounds height="36.0" width="36.0" x="758.0" y="100.0"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="sequenceFlow_81005242-1cc3-4152-b087-357a87a287bc" id="BPMNEdge_1847635c-df6f-4bc3-ad31-27b37c7ccacb">
        <di:waypoint x="708.0" y="118.0"/>
        <di:waypoint x="758.0" y="118.0"/>
      </bpmndi:BPMNEdge>
    </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
K22 <-> 2251799813685270

Environment:

  • OS:
  • Zeebe Version: 8.1.0
  • Configuration:
@saig0 saig0 added the kind/bug Categorizes an issue or PR as a bug label Sep 26, 2022
@saig0
Copy link
Member Author

saig0 commented Sep 26, 2022

Root causing

On processing the modification command, we write an activate command for the element that should be activated. But the command is rejected if an interrupting event subprocess was triggered in the same flow scope. The element instance of the flow scope (i.e. the process instance in the example) is marked as interrupted in the flow scope.

The modification works for a nested element because we create the flow scope of the element directly by writing an activating and activated event.

@saig0 saig0 added 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 area/ux Marks an issue as related to improving the user experience area/reliability Marks an issue as related to improving the reliability of our software (i.e. it behaves as expected) labels Sep 26, 2022
@remcowesterhoud remcowesterhoud self-assigned this Oct 4, 2022
@remcowesterhoud
Copy link
Contributor

I've discussed how we could solve this with @saig0.

The first question is whether we should allow this behavior at all. Using modification users could have an active element in the event subprocess as well as in the interrupted scope. This is something that would normally be impossible, yet it provides flexibility to users. I will check how this behaves in C7.

If we allow this behavior we have to figure out a solution tot his problem. One proposal was simply removing the interrupted state of an element instance once an event subprocess is activated. This proofs troublesome in other parts of the code, as we have a bunch of checks whether an element instance is interrupted or not. Most of these checks would have to be changed when we go ahead with this solution.
A different solution would be to keep track of the activate/terminated element keys in the modification record. We could introduce an event applier for the MODIFIED event. In this applier we could check if an instance is activated in an interrupted scope, and if this is the case remove the interrupted state.

@remcowesterhoud
Copy link
Contributor

I have checked C7. It is allowed there. When an event subprocess is active and a task in an interrupted scope gets activated nothing gets rejected:
image

zeebe-bors-camunda bot added a commit that referenced this issue Oct 10, 2022
10609: Remove interrupted state on event subprocess activation r=remcowesterhoud a=remcowesterhoud

## Description

<!-- Please explain the changes you made here. -->
When an interrupting event sub process gets triggered it will terminate all active element in its flow scope and mark the flow scope as interrupted. With process instance modification it should be possible to re-activate element within the interrupted scope. Because of the interrupted state any activate commands get rejected, making this currently impossible.

With this change we will check if any of the activated elements is currently in an interrupted state. If this is the case we will remove this state, allowing elements within to be activated through a modification.

## Related issues

<!-- Which issues are closed by this PR or are related -->

closes #10477 



10649: deps(maven): bump aws-java-sdk-core from 1.12.318 to 1.12.319 r=oleschoenburg a=dependabot[bot]

Bumps [aws-java-sdk-core](https://github.com/aws/aws-sdk-java) from 1.12.318 to 1.12.319.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/aws/aws-sdk-java/blob/master/CHANGELOG.md">aws-java-sdk-core's changelog</a>.</em></p>
<blockquote>
<h1><strong>1.12.319</strong> <strong>2022-10-07</strong></h1>
<h2><strong>AWS IoT Greengrass V2</strong></h2>
<ul>
<li>
<h3>Features</h3>
<ul>
<li>This release adds error status details for deployments and components that failed on a device and adds features to improve visibility into component installation.</li>
</ul>
</li>
</ul>
<h2><strong>Amazon CodeGuru Reviewer</strong></h2>
<ul>
<li>
<h3>Features</h3>
<ul>
<li>Documentation update to replace broken link.</li>
</ul>
</li>
</ul>
<h2><strong>Amazon QuickSight</strong></h2>
<ul>
<li>
<h3>Features</h3>
<ul>
<li>Amazon QuickSight now supports SecretsManager Secret ARN in place of CredentialPair for DataSource creation and update. This release also has some minor documentation updates and removes CountryCode as a required parameter in GeoSpatialColumnGroup</li>
</ul>
</li>
</ul>
<h2><strong>Elastic Load Balancing</strong></h2>
<ul>
<li>
<h3>Features</h3>
<ul>
<li>Gateway Load Balancer adds a new feature (target_failover) for customers to rebalance existing flows to a healthy target after marked unhealthy or deregistered. This allows graceful patching/upgrades of target appliances during maintenance windows, and helps reduce unhealthy target failover time.</li>
</ul>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/aws/aws-sdk-java/commit/e752d66f73b94f4c54d995b6bde56301ade507af"><code>e752d66</code></a> AWS SDK for Java 1.12.319</li>
<li><a href="https://github.com/aws/aws-sdk-java/commit/e176eb25613173ac59301716281018a837654589"><code>e176eb2</code></a> Update GitHub version number to 1.12.319-SNAPSHOT</li>
<li>See full diff in <a href="https://github.com/aws/aws-sdk-java/compare/1.12.318...1.12.319">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=com.amazonaws:aws-java-sdk-core&package-manager=maven&previous-version=1.12.318&new-version=1.12.319)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting ``@dependabot` rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- ``@dependabot` rebase` will rebase this PR
- ``@dependabot` recreate` will recreate this PR, overwriting any edits that have been made to it
- ``@dependabot` merge` will merge this PR after your CI passes on it
- ``@dependabot` squash and merge` will squash and merge this PR after your CI passes on it
- ``@dependabot` cancel merge` will cancel a previously requested merge and block automerging
- ``@dependabot` reopen` will reopen this PR if it is closed
- ``@dependabot` close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- ``@dependabot` ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

Co-authored-by: Remco Westerhoud <remco@westerhoud.nl>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
zeebe-bors-camunda bot added a commit that referenced this issue Oct 10, 2022
10609: Remove interrupted state on event subprocess activation r=remcowesterhoud a=remcowesterhoud

## Description

<!-- Please explain the changes you made here. -->
When an interrupting event sub process gets triggered it will terminate all active element in its flow scope and mark the flow scope as interrupted. With process instance modification it should be possible to re-activate element within the interrupted scope. Because of the interrupted state any activate commands get rejected, making this currently impossible.

With this change we will check if any of the activated elements is currently in an interrupted state. If this is the case we will remove this state, allowing elements within to be activated through a modification.

## Related issues

<!-- Which issues are closed by this PR or are related -->

closes #10477 



Co-authored-by: Remco Westerhoud <remco@westerhoud.nl>
zeebe-bors-camunda bot added a commit that referenced this issue Oct 10, 2022
10609: Remove interrupted state on event subprocess activation r=remcowesterhoud a=remcowesterhoud

## Description

<!-- Please explain the changes you made here. -->
When an interrupting event sub process gets triggered it will terminate all active element in its flow scope and mark the flow scope as interrupted. With process instance modification it should be possible to re-activate element within the interrupted scope. Because of the interrupted state any activate commands get rejected, making this currently impossible.

With this change we will check if any of the activated elements is currently in an interrupted state. If this is the case we will remove this state, allowing elements within to be activated through a modification.

## Related issues

<!-- Which issues are closed by this PR or are related -->

closes #10477 



10618: feat(engine): Apply output mappings for none end events r=remcowesterhoud a=skayliu

## Description

<!-- Please explain the changes you made here. -->

Support none end event outputs.

## Related issues

<!-- Which issues are closed by this PR or are related -->

closes #10613 



10629: test(qa): verify backup when partition is replicated r=deepthidevaki a=deepthidevaki

## Description

- Verify backup when the partition is replicated.

## Related issues

closes #10387 


10649: deps(maven): bump aws-java-sdk-core from 1.12.318 to 1.12.319 r=oleschoenburg a=dependabot[bot]

Bumps [aws-java-sdk-core](https://github.com/aws/aws-sdk-java) from 1.12.318 to 1.12.319.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/aws/aws-sdk-java/blob/master/CHANGELOG.md">aws-java-sdk-core's changelog</a>.</em></p>
<blockquote>
<h1><strong>1.12.319</strong> <strong>2022-10-07</strong></h1>
<h2><strong>AWS IoT Greengrass V2</strong></h2>
<ul>
<li>
<h3>Features</h3>
<ul>
<li>This release adds error status details for deployments and components that failed on a device and adds features to improve visibility into component installation.</li>
</ul>
</li>
</ul>
<h2><strong>Amazon CodeGuru Reviewer</strong></h2>
<ul>
<li>
<h3>Features</h3>
<ul>
<li>Documentation update to replace broken link.</li>
</ul>
</li>
</ul>
<h2><strong>Amazon QuickSight</strong></h2>
<ul>
<li>
<h3>Features</h3>
<ul>
<li>Amazon QuickSight now supports SecretsManager Secret ARN in place of CredentialPair for DataSource creation and update. This release also has some minor documentation updates and removes CountryCode as a required parameter in GeoSpatialColumnGroup</li>
</ul>
</li>
</ul>
<h2><strong>Elastic Load Balancing</strong></h2>
<ul>
<li>
<h3>Features</h3>
<ul>
<li>Gateway Load Balancer adds a new feature (target_failover) for customers to rebalance existing flows to a healthy target after marked unhealthy or deregistered. This allows graceful patching/upgrades of target appliances during maintenance windows, and helps reduce unhealthy target failover time.</li>
</ul>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/aws/aws-sdk-java/commit/e752d66f73b94f4c54d995b6bde56301ade507af"><code>e752d66</code></a> AWS SDK for Java 1.12.319</li>
<li><a href="https://github.com/aws/aws-sdk-java/commit/e176eb25613173ac59301716281018a837654589"><code>e176eb2</code></a> Update GitHub version number to 1.12.319-SNAPSHOT</li>
<li>See full diff in <a href="https://github.com/aws/aws-sdk-java/compare/1.12.318...1.12.319">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=com.amazonaws:aws-java-sdk-core&package-manager=maven&previous-version=1.12.318&new-version=1.12.319)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting ``@dependabot` rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- ``@dependabot` rebase` will rebase this PR
- ``@dependabot` recreate` will recreate this PR, overwriting any edits that have been made to it
- ``@dependabot` merge` will merge this PR after your CI passes on it
- ``@dependabot` squash and merge` will squash and merge this PR after your CI passes on it
- ``@dependabot` cancel merge` will cancel a previously requested merge and block automerging
- ``@dependabot` reopen` will reopen this PR if it is closed
- ``@dependabot` close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- ``@dependabot` ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

Co-authored-by: Remco Westerhoud <remco@westerhoud.nl>
Co-authored-by: skayliu <skay463@163.com>
Co-authored-by: Deepthi Devaki Akkoorath <deepthidevaki@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
zeebe-bors-camunda bot added a commit that referenced this issue Oct 10, 2022
10653: [Backport stable/8.1] Remove interrupted state on event subprocess activation r=remcowesterhoud a=backport-action

# Description
Backport of #10609 to `stable/8.1`.

relates to #10477

Co-authored-by: Remco Westerhoud <remco@westerhoud.nl>
@korthout korthout added the version:8.1.1 Marks an issue as being completely or in parts released in 8.1.1 label Oct 13, 2022
@korthout korthout added the version:8.2.0-alpha1 Marks an issue as being completely or in parts released in 8.2.0-alpha1 label Nov 1, 2022
@npepinpe npepinpe added the version:8.2.0 Marks an issue as being completely or in parts released in 8.2.0 label Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/reliability Marks an issue as related to improving the reliability of our software (i.e. it behaves as expected) area/ux Marks an issue as related to improving the user experience 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:8.1.1 Marks an issue as being completely or in parts released in 8.1.1 version:8.2.0-alpha1 Marks an issue as being completely or in parts released in 8.2.0-alpha1 version:8.2.0 Marks an issue as being completely or in parts released in 8.2.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants