Search code examples
javaexceptionquarkusjbpmkogito

jbpm - cannot handle exceptions in subprocess as it immediately throws and exits


I am using jbpm on quarkus with dependency kogito-quarkus. I have a flow consists of ten steps and three of them may throw an exception called ApplicationException. So I added these three steps compensations so when there is an exception thrown, I wanted to redo another operations below these operations. In order to catch exceptions on bpmn2 file, I created a subprocess Handle Error and tried to catch the exception and after I put End Compensation event that will trigger other compensation events(I hoped), but it did not work. When the exception thrown, process immediately stops and does not enter the subprocess. I am sure that ApplicationException path is correct. I am sharing my bpmn2 file, all comments appreciated. Please note that I throw new ApplicationException("..."); when a problem occurs, and I was hoping to see the subprocess start when the exception thrown. But It returns the exception logs and stops the process.

<?xml version="1.0" encoding="UTF-8"?>
<bpmn2:definitions xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:bpsim="http://www.bpsim.org/schemas/1.0" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:drools="http://www.jboss.org/drools" xmlns:xsi="xsi" id="_yYuL4B2fEDuQ4oFmmBrvbQ" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd http://www.jboss.org/drools drools.xsd http://www.bpsim.org/schemas/1.0 bpsim.xsd http://www.omg.org/spec/DD/20100524/DC DC.xsd http://www.omg.org/spec/DD/20100524/DI DI.xsd " exporter="jBPM Process Modeler" exporterVersion="2.0" targetNamespace="http://www.omg.org/bpmn20">
  <bpmn2:itemDefinition id="_userItem" structureRef="org.robolaunch.models.User"/>
  <bpmn2:itemDefinition id="_passwordItem" structureRef="String"/>
  <bpmn2:itemDefinition id="_defaultOrgNameItem" structureRef="String"/>
  <bpmn2:itemDefinition id="_organizationItem" structureRef="org.robolaunch.models.Organization"/>
  <bpmn2:itemDefinition id="__B0DC523D-693D-4C46-BE8A-1AC9A8AE456C_userInputXItem" structureRef="org.robolaunch.models.User"/>
  <bpmn2:itemDefinition id="__B0DC523D-693D-4C46-BE8A-1AC9A8AE456C_passwordOutputXItem" structureRef="String"/>
  <bpmn2:itemDefinition id="__3D2BA8B5-E4DC-4CE4-8397-D639987E4992_defaultOrgNameInputXItem" structureRef="String"/>
  <bpmn2:itemDefinition id="__3D2BA8B5-E4DC-4CE4-8397-D639987E4992_organizationOutputXItem" structureRef="org.robolaunch.models.Organization"/>
  <bpmn2:itemDefinition id="__D9B7ACD2-5403-4592-A677-326118CE2272_userInputXItem" structureRef="org.robolaunch.models.User"/>
  <bpmn2:itemDefinition id="__BF23925A-0E27-4245-918E-DDB4D416FC9E_defaultOrgNameInputXItem" structureRef="String"/>
  <bpmn2:interface id="_F1374136-CEB8-45D3-89ED-CEFAE9B80C3D_ServiceInterface" name="org.robolaunch.service.AccountService" implementationRef="org.robolaunch.service.AccountService">
    <bpmn2:operation id="_F1374136-CEB8-45D3-89ED-CEFAE9B80C3D_ServiceOperation" name="errorHandler" implementationRef="errorHandler"/>
  </bpmn2:interface>
  <bpmn2:error id="org.robolaunch.exception.ApplicationException" errorCode="org.robolaunch.exception.ApplicationException"/>
  <bpmn2:interface id="_B0DC523D-693D-4C46-BE8A-1AC9A8AE456C_ServiceInterface" name="org.robolaunch.service.AccountService" implementationRef="org.robolaunch.service.AccountService">
    <bpmn2:operation id="_B0DC523D-693D-4C46-BE8A-1AC9A8AE456C_ServiceOperation" name="createRegisteredUserWithPassword" implementationRef="createRegisteredUserWithPassword"/>
  </bpmn2:interface>
  <bpmn2:interface id="_3D2BA8B5-E4DC-4CE4-8397-D639987E4992_ServiceInterface" name="org.robolaunch.service.KeycloakService" implementationRef="org.robolaunch.service.KeycloakService">
    <bpmn2:operation id="_3D2BA8B5-E4DC-4CE4-8397-D639987E4992_ServiceOperation" name="createRealmForDefaultOrganization" implementationRef="createRealmForDefaultOrganization"/>
  </bpmn2:interface>
  <bpmn2:interface id="_D9B7ACD2-5403-4592-A677-326118CE2272_ServiceInterface" name="org.robolaunch.service.AccountService" implementationRef="org.robolaunch.service.AccountService">
    <bpmn2:operation id="_D9B7ACD2-5403-4592-A677-326118CE2272_ServiceOperation" name="deleteUserFromFreeIPA" implementationRef="deleteUserFromFreeIPA"/>
  </bpmn2:interface>
  <bpmn2:interface id="_BF23925A-0E27-4245-918E-DDB4D416FC9E_ServiceInterface" name="org.robolaunch.service.KeycloakService" implementationRef="org.robolaunch.service.KeycloakService">
    <bpmn2:operation id="_BF23925A-0E27-4245-918E-DDB4D416FC9E_ServiceOperation" name="deleteRealmForDefaultOrganization" implementationRef="deleteRealmForDefaultOrganization"/>
  </bpmn2:interface>
  <bpmn2:collaboration id="_FFD70CE4-A6A4-45FA-BF49-4DA11F162E4F" name="Default Collaboration">
    <bpmn2:participant id="_35C47359-BB9D-4BAE-9018-5E828230916F" name="Pool Participant" processRef="userRegistration"/>
  </bpmn2:collaboration>
  <bpmn2:process id="userRegistration" drools:packageName="org.robolaunch.kogito.user.userRegistration" drools:version="1.0" drools:adHoc="false" name="userRegistration" isExecutable="true" processType="Public">
    <bpmn2:property id="user" itemSubjectRef="_userItem" name="user"/>
    <bpmn2:property id="password" itemSubjectRef="_passwordItem" name="password">
      <bpmn2:extensionElements>
        <drools:metaData name="customTags">
          <drools:metaValue><![CDATA[internal]]></drools:metaValue>
        </drools:metaData>
      </bpmn2:extensionElements>
    </bpmn2:property>
    <bpmn2:property id="defaultOrgName" itemSubjectRef="_defaultOrgNameItem" name="defaultOrgName">
      <bpmn2:extensionElements>
        <drools:metaData name="customTags">
          <drools:metaValue><![CDATA[internal]]></drools:metaValue>
        </drools:metaData>
      </bpmn2:extensionElements>
    </bpmn2:property>
    <bpmn2:property id="organization" itemSubjectRef="_organizationItem" name="organization">
      <bpmn2:extensionElements>
        <drools:metaData name="customTags">
          <drools:metaValue><![CDATA[internal]]></drools:metaValue>
        </drools:metaData>
      </bpmn2:extensionElements>
    </bpmn2:property>
    <bpmn2:sequenceFlow id="_D3B87383-C667-4CB8-869B-26E8CDBF1FE5" sourceRef="_3D2BA8B5-E4DC-4CE4-8397-D639987E4992" targetRef="_91203359-7134-4E11-9BBD-7A813038CDE0">
      <bpmn2:extensionElements>
        <drools:metaData name="isAutoConnection.target">
          <drools:metaValue><![CDATA[true]]></drools:metaValue>
        </drools:metaData>
      </bpmn2:extensionElements>
    </bpmn2:sequenceFlow>
    <bpmn2:sequenceFlow id="_0D4CE231-1EE5-4E8F-8074-7790E613F17F" sourceRef="_B0DC523D-693D-4C46-BE8A-1AC9A8AE456C" targetRef="_3D2BA8B5-E4DC-4CE4-8397-D639987E4992"/>
    <bpmn2:sequenceFlow id="_125FB73D-556C-4D70-AFE6-754475F76924" sourceRef="_BA24F379-902A-4417-BC75-93246128397D" targetRef="_B0DC523D-693D-4C46-BE8A-1AC9A8AE456C">
      <bpmn2:extensionElements>
        <drools:metaData name="isAutoConnection.target">
          <drools:metaValue><![CDATA[true]]></drools:metaValue>
        </drools:metaData>
      </bpmn2:extensionElements>
    </bpmn2:sequenceFlow>
    <bpmn2:endEvent id="_91203359-7134-4E11-9BBD-7A813038CDE0">
      <bpmn2:incoming>_D3B87383-C667-4CB8-869B-26E8CDBF1FE5</bpmn2:incoming>
    </bpmn2:endEvent>
    <bpmn2:serviceTask id="_BF23925A-0E27-4245-918E-DDB4D416FC9E" drools:serviceimplementation="Java" drools:serviceinterface="org.robolaunch.service.KeycloakService" drools:serviceoperation="deleteRealmForDefaultOrganization" name="Delete Default organization's realm" isForCompensation="true" implementation="Java" operationRef="_BF23925A-0E27-4245-918E-DDB4D416FC9E_ServiceOperation">
      <bpmn2:extensionElements>
        <drools:metaData name="elementname">
          <drools:metaValue><![CDATA[Delete Default organization's realm]]></drools:metaValue>
        </drools:metaData>
      </bpmn2:extensionElements>
      <bpmn2:ioSpecification>
        <bpmn2:dataInput id="_BF23925A-0E27-4245-918E-DDB4D416FC9E_defaultOrgNameInputX" drools:dtype="String" itemSubjectRef="__BF23925A-0E27-4245-918E-DDB4D416FC9E_defaultOrgNameInputXItem" name="defaultOrgName"/>
        <bpmn2:inputSet>
          <bpmn2:dataInputRefs>_BF23925A-0E27-4245-918E-DDB4D416FC9E_defaultOrgNameInputX</bpmn2:dataInputRefs>
        </bpmn2:inputSet>
      </bpmn2:ioSpecification>
      <bpmn2:dataInputAssociation>
        <bpmn2:sourceRef>defaultOrgName</bpmn2:sourceRef>
        <bpmn2:targetRef>_BF23925A-0E27-4245-918E-DDB4D416FC9E_defaultOrgNameInputX</bpmn2:targetRef>
      </bpmn2:dataInputAssociation>
    </bpmn2:serviceTask>
    <bpmn2:serviceTask id="_D9B7ACD2-5403-4592-A677-326118CE2272" drools:serviceimplementation="Java" drools:serviceinterface="org.robolaunch.service.AccountService" drools:serviceoperation="deleteUserFromFreeIPA" name="Delete User From FreeIPA" isForCompensation="true" implementation="Java" operationRef="_D9B7ACD2-5403-4592-A677-326118CE2272_ServiceOperation">
      <bpmn2:extensionElements>
        <drools:metaData name="elementname">
          <drools:metaValue><![CDATA[Delete User From FreeIPA]]></drools:metaValue>
        </drools:metaData>
      </bpmn2:extensionElements>
      <bpmn2:ioSpecification>
        <bpmn2:dataInput id="_D9B7ACD2-5403-4592-A677-326118CE2272_userInputX" drools:dtype="org.robolaunch.models.User" itemSubjectRef="__D9B7ACD2-5403-4592-A677-326118CE2272_userInputXItem" name="user"/>
        <bpmn2:inputSet>
          <bpmn2:dataInputRefs>_D9B7ACD2-5403-4592-A677-326118CE2272_userInputX</bpmn2:dataInputRefs>
        </bpmn2:inputSet>
      </bpmn2:ioSpecification>
      <bpmn2:dataInputAssociation>
        <bpmn2:sourceRef>user</bpmn2:sourceRef>
        <bpmn2:targetRef>_D9B7ACD2-5403-4592-A677-326118CE2272_userInputX</bpmn2:targetRef>
      </bpmn2:dataInputAssociation>
    </bpmn2:serviceTask>
    <bpmn2:serviceTask id="_3D2BA8B5-E4DC-4CE4-8397-D639987E4992" drools:serviceimplementation="Java" drools:serviceinterface="org.robolaunch.service.KeycloakService" drools:serviceoperation="createRealmForDefaultOrganization" name="Create default organization's realm on keycloak" implementation="Java" operationRef="_3D2BA8B5-E4DC-4CE4-8397-D639987E4992_ServiceOperation">
      <bpmn2:extensionElements>
        <drools:metaData name="elementname">
          <drools:metaValue><![CDATA[Create default organization's realm on keycloak]]></drools:metaValue>
        </drools:metaData>
      </bpmn2:extensionElements>
      <bpmn2:incoming>_0D4CE231-1EE5-4E8F-8074-7790E613F17F</bpmn2:incoming>
      <bpmn2:outgoing>_D3B87383-C667-4CB8-869B-26E8CDBF1FE5</bpmn2:outgoing>
      <bpmn2:ioSpecification>
        <bpmn2:dataInput id="_3D2BA8B5-E4DC-4CE4-8397-D639987E4992_defaultOrgNameInputX" drools:dtype="String" itemSubjectRef="__3D2BA8B5-E4DC-4CE4-8397-D639987E4992_defaultOrgNameInputXItem" name="defaultOrgName"/>
        <bpmn2:dataOutput id="_3D2BA8B5-E4DC-4CE4-8397-D639987E4992_organizationOutputX" drools:dtype="org.robolaunch.models.Organization" itemSubjectRef="__3D2BA8B5-E4DC-4CE4-8397-D639987E4992_organizationOutputXItem" name="organization"/>
        <bpmn2:inputSet>
          <bpmn2:dataInputRefs>_3D2BA8B5-E4DC-4CE4-8397-D639987E4992_defaultOrgNameInputX</bpmn2:dataInputRefs>
        </bpmn2:inputSet>
        <bpmn2:outputSet>
          <bpmn2:dataOutputRefs>_3D2BA8B5-E4DC-4CE4-8397-D639987E4992_organizationOutputX</bpmn2:dataOutputRefs>
        </bpmn2:outputSet>
      </bpmn2:ioSpecification>
      <bpmn2:dataInputAssociation>
        <bpmn2:sourceRef>defaultOrgName</bpmn2:sourceRef>
        <bpmn2:targetRef>_3D2BA8B5-E4DC-4CE4-8397-D639987E4992_defaultOrgNameInputX</bpmn2:targetRef>
      </bpmn2:dataInputAssociation>
      <bpmn2:dataOutputAssociation>
        <bpmn2:sourceRef>_3D2BA8B5-E4DC-4CE4-8397-D639987E4992_organizationOutputX</bpmn2:sourceRef>
        <bpmn2:targetRef>organization</bpmn2:targetRef>
      </bpmn2:dataOutputAssociation>
    </bpmn2:serviceTask>
    <bpmn2:serviceTask id="_B0DC523D-693D-4C46-BE8A-1AC9A8AE456C" drools:serviceimplementation="Java" drools:serviceinterface="org.robolaunch.service.AccountService" drools:serviceoperation="createRegisteredUserWithPassword" name="Create User on FreeIPA" implementation="Java" operationRef="_B0DC523D-693D-4C46-BE8A-1AC9A8AE456C_ServiceOperation">
      <bpmn2:extensionElements>
        <drools:metaData name="elementname">
          <drools:metaValue><![CDATA[Create User on FreeIPA]]></drools:metaValue>
        </drools:metaData>
      </bpmn2:extensionElements>
      <bpmn2:incoming>_125FB73D-556C-4D70-AFE6-754475F76924</bpmn2:incoming>
      <bpmn2:outgoing>_0D4CE231-1EE5-4E8F-8074-7790E613F17F</bpmn2:outgoing>
      <bpmn2:ioSpecification>
        <bpmn2:dataInput id="_B0DC523D-693D-4C46-BE8A-1AC9A8AE456C_userInputX" drools:dtype="org.robolaunch.models.User" itemSubjectRef="__B0DC523D-693D-4C46-BE8A-1AC9A8AE456C_userInputXItem" name="user"/>
        <bpmn2:dataOutput id="_B0DC523D-693D-4C46-BE8A-1AC9A8AE456C_passwordOutputX" drools:dtype="String" itemSubjectRef="__B0DC523D-693D-4C46-BE8A-1AC9A8AE456C_passwordOutputXItem" name="password"/>
        <bpmn2:inputSet>
          <bpmn2:dataInputRefs>_B0DC523D-693D-4C46-BE8A-1AC9A8AE456C_userInputX</bpmn2:dataInputRefs>
        </bpmn2:inputSet>
        <bpmn2:outputSet>
          <bpmn2:dataOutputRefs>_B0DC523D-693D-4C46-BE8A-1AC9A8AE456C_passwordOutputX</bpmn2:dataOutputRefs>
        </bpmn2:outputSet>
      </bpmn2:ioSpecification>
      <bpmn2:dataInputAssociation>
        <bpmn2:sourceRef>user</bpmn2:sourceRef>
        <bpmn2:targetRef>_B0DC523D-693D-4C46-BE8A-1AC9A8AE456C_userInputX</bpmn2:targetRef>
      </bpmn2:dataInputAssociation>
      <bpmn2:dataOutputAssociation>
        <bpmn2:sourceRef>_B0DC523D-693D-4C46-BE8A-1AC9A8AE456C_passwordOutputX</bpmn2:sourceRef>
        <bpmn2:targetRef>password</bpmn2:targetRef>
      </bpmn2:dataOutputAssociation>
    </bpmn2:serviceTask>
    <bpmn2:startEvent id="_BA24F379-902A-4417-BC75-93246128397D">
      <bpmn2:outgoing>_125FB73D-556C-4D70-AFE6-754475F76924</bpmn2:outgoing>
    </bpmn2:startEvent>
    <bpmn2:subProcess id="_168B5492-3A73-4D64-947B-3A5526A435DB" name="Handle Error" triggeredByEvent="true">
      <bpmn2:extensionElements>
        <drools:metaData name="elementname">
          <drools:metaValue><![CDATA[Handle Error]]></drools:metaValue>
        </drools:metaData>
      </bpmn2:extensionElements>
      <bpmn2:sequenceFlow id="_A54BD2CA-81D2-421E-8A7E-9AD841BF692A" sourceRef="_205B4BBD-DE3D-48CA-95DD-94E295778A2D" targetRef="_F1374136-CEB8-45D3-89ED-CEFAE9B80C3D"/>
      <bpmn2:sequenceFlow id="_8DDE6585-0B51-465B-9C80-AAFF2E782B10" sourceRef="_F1374136-CEB8-45D3-89ED-CEFAE9B80C3D" targetRef="_E5529222-60EC-4824-AAB5-0C4C1A83AA2D">
        <bpmn2:extensionElements>
          <drools:metaData name="isAutoConnection.target">
            <drools:metaValue><![CDATA[true]]></drools:metaValue>
          </drools:metaData>
        </bpmn2:extensionElements>
      </bpmn2:sequenceFlow>
      <bpmn2:startEvent id="_205B4BBD-DE3D-48CA-95DD-94E295778A2D" name="Application Exception">
        <bpmn2:extensionElements>
          <drools:metaData name="elementname">
            <drools:metaValue><![CDATA[Application Exception]]></drools:metaValue>
          </drools:metaData>
        </bpmn2:extensionElements>
        <bpmn2:outgoing>_A54BD2CA-81D2-421E-8A7E-9AD841BF692A</bpmn2:outgoing>
        <bpmn2:errorEventDefinition drools:erefname="org.robolaunch.exception.ApplicationException" errorRef="org.robolaunch.exception.ApplicationException"/>
      </bpmn2:startEvent>
      <bpmn2:serviceTask id="_F1374136-CEB8-45D3-89ED-CEFAE9B80C3D" drools:serviceimplementation="Java" drools:serviceinterface="org.robolaunch.service.AccountService" drools:serviceoperation="errorHandler" name="Service Task" implementation="Java" operationRef="_F1374136-CEB8-45D3-89ED-CEFAE9B80C3D_ServiceOperation">
        <bpmn2:extensionElements>
          <drools:metaData name="elementname">
            <drools:metaValue><![CDATA[Service Task]]></drools:metaValue>
          </drools:metaData>
        </bpmn2:extensionElements>
        <bpmn2:incoming>_A54BD2CA-81D2-421E-8A7E-9AD841BF692A</bpmn2:incoming>
        <bpmn2:outgoing>_8DDE6585-0B51-465B-9C80-AAFF2E782B10</bpmn2:outgoing>
      </bpmn2:serviceTask>
      <bpmn2:endEvent id="_E5529222-60EC-4824-AAB5-0C4C1A83AA2D">
        <bpmn2:incoming>_8DDE6585-0B51-465B-9C80-AAFF2E782B10</bpmn2:incoming>
        <bpmn2:compensateEventDefinition activityRef="_3D2BA8B5-E4DC-4CE4-8397-D639987E4992"/>
      </bpmn2:endEvent>
    </bpmn2:subProcess>
    <bpmn2:boundaryEvent id="_2AC856AB-AEAC-4FB2-A07D-E7F3AE334A9A" drools:dockerinfo="62.5934065934066^69|" attachedToRef="_B0DC523D-693D-4C46-BE8A-1AC9A8AE456C">
      <bpmn2:compensateEventDefinition/>
    </bpmn2:boundaryEvent>
    <bpmn2:boundaryEvent id="_95B33EFD-1FFE-4634-B9F6-B152CC485DC9" drools:dockerinfo="73.88235294117646^55|" attachedToRef="_3D2BA8B5-E4DC-4CE4-8397-D639987E4992">
      <bpmn2:compensateEventDefinition/>
    </bpmn2:boundaryEvent>
    <bpmn2:association id="_175CFB83-1169-46BD-9758-A356DEAF21D2" associationDirection="One" sourceRef="_2AC856AB-AEAC-4FB2-A07D-E7F3AE334A9A" targetRef="_D9B7ACD2-5403-4592-A677-326118CE2272"/>
    <bpmn2:association id="_EEF0E368-FFB3-4CA1-B181-4DC5BA047F41" associationDirection="One" sourceRef="_95B33EFD-1FFE-4634-B9F6-B152CC485DC9" targetRef="_BF23925A-0E27-4245-918E-DDB4D416FC9E"/>
  </bpmn2:process>
  <bpmndi:BPMNDiagram>
    <bpmndi:BPMNPlane bpmnElement="userRegistration">
      <bpmndi:BPMNShape id="shape__168B5492-3A73-4D64-947B-3A5526A435DB" bpmnElement="_168B5492-3A73-4D64-947B-3A5526A435DB" isExpanded="true">
        <dc:Bounds height="253" width="653" x="596.5" y="618"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="shape__E5529222-60EC-4824-AAB5-0C4C1A83AA2D" bpmnElement="_E5529222-60EC-4824-AAB5-0C4C1A83AA2D">
        <dc:Bounds height="56" width="56" x="1060" y="717"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="shape__F1374136-CEB8-45D3-89ED-CEFAE9B80C3D" bpmnElement="_F1374136-CEB8-45D3-89ED-CEFAE9B80C3D">
        <dc:Bounds height="102" width="154" x="832" y="694"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="shape__205B4BBD-DE3D-48CA-95DD-94E295778A2D" bpmnElement="_205B4BBD-DE3D-48CA-95DD-94E295778A2D">
        <dc:Bounds height="56" width="56" x="681.5" y="717"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="edge_shape__F1374136-CEB8-45D3-89ED-CEFAE9B80C3D_to_shape__E5529222-60EC-4824-AAB5-0C4C1A83AA2D" bpmnElement="_8DDE6585-0B51-465B-9C80-AAFF2E782B10">
        <di:waypoint x="909" y="745"/>
        <di:waypoint x="1088" y="717"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge_shape__205B4BBD-DE3D-48CA-95DD-94E295778A2D_to_shape__F1374136-CEB8-45D3-89ED-CEFAE9B80C3D" bpmnElement="_A54BD2CA-81D2-421E-8A7E-9AD841BF692A">
        <di:waypoint x="709.5" y="745"/>
        <di:waypoint x="909" y="745"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="shape__2AC856AB-AEAC-4FB2-A07D-E7F3AE334A9A" bpmnElement="_2AC856AB-AEAC-4FB2-A07D-E7F3AE334A9A">
        <dc:Bounds height="56" width="56" x="425.5934065934066" y="315"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="shape__95B33EFD-1FFE-4634-B9F6-B152CC485DC9" bpmnElement="_95B33EFD-1FFE-4634-B9F6-B152CC485DC9">
        <dc:Bounds height="56" width="56" x="818.8823529411765" y="294"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="shape__BA24F379-902A-4417-BC75-93246128397D" bpmnElement="_BA24F379-902A-4417-BC75-93246128397D">
        <dc:Bounds height="56" width="56" x="229" y="269"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="shape__B0DC523D-693D-4C46-BE8A-1AC9A8AE456C" bpmnElement="_B0DC523D-693D-4C46-BE8A-1AC9A8AE456C">
        <dc:Bounds height="97" width="162" x="363" y="246"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="shape__3D2BA8B5-E4DC-4CE4-8397-D639987E4992" bpmnElement="_3D2BA8B5-E4DC-4CE4-8397-D639987E4992">
        <dc:Bounds height="83" width="194" x="745" y="239"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="shape__D9B7ACD2-5403-4592-A677-326118CE2272" bpmnElement="_D9B7ACD2-5403-4592-A677-326118CE2272">
        <dc:Bounds height="102" width="154" x="377" y="401"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="shape__BF23925A-0E27-4245-918E-DDB4D416FC9E" bpmnElement="_BF23925A-0E27-4245-918E-DDB4D416FC9E">
        <dc:Bounds height="95" width="172" x="756" y="389"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="shape__91203359-7134-4E11-9BBD-7A813038CDE0" bpmnElement="_91203359-7134-4E11-9BBD-7A813038CDE0">
        <dc:Bounds height="56" width="56" x="1014" y="288"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="edge_shape__2AC856AB-AEAC-4FB2-A07D-E7F3AE334A9A_to_shape__D9B7ACD2-5403-4592-A677-326118CE2272" bpmnElement="_175CFB83-1169-46BD-9758-A356DEAF21D2">
        <di:waypoint x="453.5934065934066" y="343"/>
        <di:waypoint x="454" y="401"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge_shape__95B33EFD-1FFE-4634-B9F6-B152CC485DC9_to_shape__BF23925A-0E27-4245-918E-DDB4D416FC9E" bpmnElement="_EEF0E368-FFB3-4CA1-B181-4DC5BA047F41">
        <di:waypoint x="846.8823529411765" y="322"/>
        <di:waypoint x="842" y="389"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge_shape__BA24F379-902A-4417-BC75-93246128397D_to_shape__B0DC523D-693D-4C46-BE8A-1AC9A8AE456C" bpmnElement="_125FB73D-556C-4D70-AFE6-754475F76924">
        <di:waypoint x="257" y="297"/>
        <di:waypoint x="363" y="294.5"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge_shape__B0DC523D-693D-4C46-BE8A-1AC9A8AE456C_to_shape__3D2BA8B5-E4DC-4CE4-8397-D639987E4992" bpmnElement="_0D4CE231-1EE5-4E8F-8074-7790E613F17F">
        <di:waypoint x="444" y="294.5"/>
        <di:waypoint x="842" y="280.5"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge_shape__3D2BA8B5-E4DC-4CE4-8397-D639987E4992_to_shape__91203359-7134-4E11-9BBD-7A813038CDE0" bpmnElement="_D3B87383-C667-4CB8-869B-26E8CDBF1FE5">
        <di:waypoint x="842" y="280.5"/>
        <di:waypoint x="1014" y="316"/>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
  <bpmn2:relationship type="BPSimData">
    <bpmn2:extensionElements>
      <bpsim:BPSimData>
        <bpsim:Scenario id="default" name="Simulationscenario">
          <bpsim:ScenarioParameters/>
          <bpsim:ElementParameters elementRef="_BA24F379-902A-4417-BC75-93246128397D">
            <bpsim:TimeParameters>
              <bpsim:ProcessingTime>
                <bpsim:NormalDistribution mean="0" standardDeviation="0"/>
              </bpsim:ProcessingTime>
            </bpsim:TimeParameters>
          </bpsim:ElementParameters>
          <bpsim:ElementParameters elementRef="_B0DC523D-693D-4C46-BE8A-1AC9A8AE456C">
            <bpsim:TimeParameters>
              <bpsim:ProcessingTime>
                <bpsim:NormalDistribution mean="0" standardDeviation="0"/>
              </bpsim:ProcessingTime>
            </bpsim:TimeParameters>
            <bpsim:ResourceParameters>
              <bpsim:Availability>
                <bpsim:FloatingParameter value="0"/>
              </bpsim:Availability>
              <bpsim:Quantity>
                <bpsim:FloatingParameter value="0"/>
              </bpsim:Quantity>
            </bpsim:ResourceParameters>
            <bpsim:CostParameters>
              <bpsim:UnitCost>
                <bpsim:FloatingParameter value="0"/>
              </bpsim:UnitCost>
            </bpsim:CostParameters>
          </bpsim:ElementParameters>
          <bpsim:ElementParameters elementRef="_3D2BA8B5-E4DC-4CE4-8397-D639987E4992">
            <bpsim:TimeParameters>
              <bpsim:ProcessingTime>
                <bpsim:NormalDistribution mean="0" standardDeviation="0"/>
              </bpsim:ProcessingTime>
            </bpsim:TimeParameters>
            <bpsim:ResourceParameters>
              <bpsim:Availability>
                <bpsim:FloatingParameter value="0"/>
              </bpsim:Availability>
              <bpsim:Quantity>
                <bpsim:FloatingParameter value="0"/>
              </bpsim:Quantity>
            </bpsim:ResourceParameters>
            <bpsim:CostParameters>
              <bpsim:UnitCost>
                <bpsim:FloatingParameter value="0"/>
              </bpsim:UnitCost>
            </bpsim:CostParameters>
          </bpsim:ElementParameters>
          <bpsim:ElementParameters elementRef="_D9B7ACD2-5403-4592-A677-326118CE2272">
            <bpsim:TimeParameters>
              <bpsim:ProcessingTime>
                <bpsim:NormalDistribution mean="0" standardDeviation="0"/>
              </bpsim:ProcessingTime>
            </bpsim:TimeParameters>
            <bpsim:ResourceParameters>
              <bpsim:Availability>
                <bpsim:FloatingParameter value="0"/>
              </bpsim:Availability>
              <bpsim:Quantity>
                <bpsim:FloatingParameter value="0"/>
              </bpsim:Quantity>
            </bpsim:ResourceParameters>
            <bpsim:CostParameters>
              <bpsim:UnitCost>
                <bpsim:FloatingParameter value="0"/>
              </bpsim:UnitCost>
            </bpsim:CostParameters>
          </bpsim:ElementParameters>
          <bpsim:ElementParameters elementRef="_BF23925A-0E27-4245-918E-DDB4D416FC9E">
            <bpsim:TimeParameters>
              <bpsim:ProcessingTime>
                <bpsim:NormalDistribution mean="0" standardDeviation="0"/>
              </bpsim:ProcessingTime>
            </bpsim:TimeParameters>
            <bpsim:ResourceParameters>
              <bpsim:Availability>
                <bpsim:FloatingParameter value="0"/>
              </bpsim:Availability>
              <bpsim:Quantity>
                <bpsim:FloatingParameter value="0"/>
              </bpsim:Quantity>
            </bpsim:ResourceParameters>
            <bpsim:CostParameters>
              <bpsim:UnitCost>
                <bpsim:FloatingParameter value="0"/>
              </bpsim:UnitCost>
            </bpsim:CostParameters>
          </bpsim:ElementParameters>
        </bpsim:Scenario>
      </bpsim:BPSimData>
    </bpmn2:extensionElements>
    <bpmn2:source>_yYuL4B2fEDuQ4oFmmBrvbQ</bpmn2:source>
    <bpmn2:target>_yYuL4B2fEDuQ4oFmmBrvbQ</bpmn2:target>
  </bpmn2:relationship>
</bpmn2:definitions>

Solution

  • Is the service task in the Handle Error subprocess executed? The issue is just that the compensations are not executed after the End Compensation node, or does after the exception is thrown the subprocess is not started?

    It seems you followed the pattern in https://blog.kie.org/2022/02/saga-pattern-with-processes-and-kogito-part-2.html.