cancel
Showing results for 
Search instead for 
Did you mean: 

timer events don't stop at process end

mokematt
Champ in-the-making
Champ in-the-making
Hi,
i got a problem with timer events in my process definition. I got 2 timer events, the first for sending an e-mail notification after 4 weeks, the second for stopping the process through a following cancel event after 8 weeks.

<intermediateCatchEvent id="CatchWait8Weeks" name="Warte 8 Wochen">
    <timerEventDefinition id="CatchWait8WeeksED">
        <timeDuration><![CDATA[PT4H]]></timeDuration>
    </timerEventDefinition>
</intermediateCatchEvent>
<sequenceFlow id="SF57" sourceRef="CatchWait8Weeks" targetRef="CancelStandardForm"/>
<endEvent id="CancelStandardForm" name="Cancel">
    <incoming>SF57</incoming>
        <cancelEventDefinition id="CancelStandardFormED"/>
</endEvent>


<boundaryEvent attachedToRef="StandardForm" cancelActivity="false" id="Wait4Weeks" name="Warte 4 Wochen">
    <timerEventDefinition id="Wait4Weeks_ED_1">
        <timeDuration><![CDATA[PT30M]]></timeDuration>
    </timerEventDefinition>
</boundaryEvent>
<sequenceFlow id="SF52" sourceRef="Wait4Weeks" targetRef="SendReminderNotification"/>
<serviceTask activiti:type="mail" completionQuantity="1" id="SendReminderNotification" implementation="##WebService" isForCompensation="false" name="Erinnerungsmail schicken" startQuantity="1">

</serviceTask>


When i start a process instance and end it through the default way so the end event is reached the process instance don't end. The timer jobs are allready there and the process instance isn't finished. Is there a problem in my bpmn xml?

thanks for help
6 REPLIES 6

frederikherema1
Star Contributor
Star Contributor
How is the intermediate catch-event modeled? Why use an intermediate catch-event, and not an boundary-event with "cancelActivity=true"?

Perhaps the full BPMN-file would help or a diagram image…

mokematt
Champ in-the-making
Champ in-the-making
After the intermediate event follows a cancel end event so i can throw compensation. But that is not the point. Both timer jobs, intermediate and boundary, are still active at the process is not finished.

here is the diagram: http://abload.de/image.php?img=pucco-standardformulafrsoy.png
here is the process code: (sorry for the wierd formatting, the code is modelled with yaoquiang modeler 😕 )
<code>
<process id="approval" name="DE:Beantragungsprozess;EN:Approval process" isClosed="false" processType="None">
    <documentation>
     DESmiley Tonguerozess zur Beantragung von Berechtigungen in PUcco mittels Formularen.;EN:A process for approval permissions in PUcco through forms.
    </documentation>
    <startEvent id="PutRequest" isInterrupting="true" name="Antragstellung" parallelMultiple="false">
      <extensionElements>
        <activiti:formProperty id="RequestId" name="AntragsID" required="true" type="string"/>
        <activiti:formProperty id="SuperiorId" name="VorgesetzerID" required="true" type="string"/>
        <activiti:formProperty id="WorkrelId" name="ArbeitsverhältnisID" required="true" type="string"/>
      </extensionElements>
      <outgoing>SF1</outgoing>
    </startEvent>
    <sequenceFlow id="SF1" sourceRef="PutRequest" targetRef="StandardForm"/>
    <transaction completionQuantity="1" id="StandardForm" isForCompensation="false" method="##Compensate" name="StandardFormular" startQuantity="1" triggeredByEvent="false">
      <incoming>SF1</incoming>
      <outgoing>SF50</outgoing>
      <serviceTask activiti:class="pucco.activiti.serviceTask.approval.SetBasicVariables" completionQuantity="1" id="SetBasicVariables" implementation="##WebService" isForCompensation="false" name="grundlegende Werte setzen" startQuantity="1">
        <extensionElements>
          <activiti:formProperty id="ProcInstId" name="ProcInstId" type="string" writable="true"/>
        </extensionElements>
        <incoming>SF55</incoming>
        <outgoing>SF3</outgoing>
      </serviceTask>
      <exclusiveGateway gatewayDirection="Unspecified" id="GW9">
        <incoming>SF47</incoming>
        <incoming>SF18</incoming>
        <outgoing>SF48</outgoing>
      </exclusiveGateway>
      <exclusiveGateway gatewayDirection="Unspecified" id="GW4" name="genehmigt?">
        <incoming>SF16</incoming>
        <outgoing>SF17</outgoing>
        <outgoing>SF18</outgoing>
      </exclusiveGateway>
      <endEvent id="EndStandardForm">
        <incoming>SF48</incoming>
        <incoming>SF49</incoming>
      </endEvent>
      <startEvent id="StartStandardForm" isInterrupting="true" parallelMultiple="false">
        <outgoing>SF2</outgoing>
      </startEvent>
      <transaction completionQuantity="1" id="Approval" isForCompensation="false" method="##Compensate" name="Genehmigung" startQuantity="1" triggeredByEvent="false">
        <incoming>SF3</incoming>
        <outgoing>SF16</outgoing>
        <inclusiveGateway gatewayDirection="Unspecified" id="GW2">
          <incoming>SF5</incoming>
          <outgoing>SF11</outgoing>
          <outgoing>SF10</outgoing>
          <outgoing>SF9</outgoing>
        </inclusiveGateway>
        <userTask activiti:assignee="${Superior}" activitiSmiley Tongueriority="50" completionQuantity="1" id="SUP_Approval" implementation="##unspecified" isForCompensation="false" name="DE:Genehmigung;EN:Approval" startQuantity="1">
         <documentation>
            DE:Bitte geben Sie Ihre Genehmigung, ob Ihr Mitarbeiter den angegebene Berechtigung bekommen darf oder nicht.;ENSmiley Tonguelease decide whether your colleague gets the permission or not.
     </documentation>
          <extensionElements>
            <activiti:formProperty id="SupHasApproved" name="Genehmigung" required="true" type="boolean"/>
          </extensionElements>
          <incoming>SF10</incoming>
          <outgoing>SF13</outgoing>
        </userTask>
        <userTask activiti:assignee="${ApplicationOwner}" activitiSmiley Tongueriority="50" completionQuantity="1" id="APPOWN_Approval" implementation="##unspecified" isForCompensation="false" name="DE:Genehmigung;EN:Approval" startQuantity="1">
         <documentation>
            DE:Bitte geben Sie Ihre Genehmigung, ob der angegebene Benutzer den angegebenen Zugriff auf Ihr System bekommen darf oder nicht.;ENSmiley Tonguelease decide whether the user gets the permission on your system or not.
     </documentation>
          <extensionElements>
            <activiti:formProperty id="AOHasApproved" name="Genehmigung" required="true" type="boolean"/>
          </extensionElements>
          <incoming>SF9</incoming>
          <outgoing>SF12</outgoing>
        </userTask>
        <inclusiveGateway gatewayDirection="Unspecified" id="GW3">
          <incoming>SF13</incoming>
          <incoming>SF12</incoming>
          <incoming>SF11</incoming>
          <outgoing>SF14</outgoing>
        </inclusiveGateway>
        <startEvent id="StartApproval" isInterrupting="true" parallelMultiple="false">
          <outgoing>SF4</outgoing>
        </startEvent>
        <endEvent id="EndApproval">
          <incoming>SF15</incoming>
        </endEvent>
        <serviceTask activiti:class="pucco.activiti.serviceTask.approval.EvaluateApprovalRequirements" completionQuantity="1" id="EvaluateApprovalRequirements" implementation="##WebService" isForCompensation="false" name="benötigte Genehmigungen ermitteln" startQuantity="1">
          <extensionElements>
            <activiti:formProperty id="AOApprovalRequired" type="boolean" writable="true"/>
            <activiti:formProperty id="SupApprovalRequired" type="boolean" writable="true"/>
            <activiti:formProperty id="SuperiorId" name="VorgesetzerID" readable="true" type="string"/>
            <activiti:formProperty id="Superior" type="string" writable="true"/>
            <activiti:formProperty id="ApplicationOwner" type="string" writable="true"/>
          </extensionElements>
          <incoming>SF4</incoming>
          <outgoing>SF5</outgoing>
        </serviceTask>
        <serviceTask activiti:class="pucco.activiti.serviceTask.approval.SetApprovalState" completionQuantity="1" id="SetApprovalState" implementation="##WebService" isForCompensation="false" name="Genehmigungs-status setzen" startQuantity="1">
          <extensionElements>
            <activiti:formProperty id="AOApprovalRequired" readable="true" type="boolean"/>
            <activiti:formProperty id="SupApprovalRequired" readable="true" type="boolean"/>
            <activiti:formProperty id="AOHasApproved" readable="true" type="boolean"/>
            <activiti:formProperty id="SupHasApproved" readable="true" type="boolean"/>
            <activiti:formProperty id="Approved" required="true" type="boolean"/>
          </extensionElements>
          <incoming>SF14</incoming>
          <outgoing>SF15</outgoing>
        </serviceTask>
        <sequenceFlow id="SF4" sourceRef="StartApproval" targetRef="EvaluateApprovalRequirements"/>
        <sequenceFlow id="SF14" sourceRef="GW3" targetRef="SetApprovalState"/>
        <sequenceFlow id="SF15" sourceRef="SetApprovalState" targetRef="EndApproval"/>
        <sequenceFlow id="SF13" sourceRef="SUP_Approval" targetRef="GW3"/>
        <sequenceFlow id="SF12" sourceRef="APPOWN_Approval" targetRef="GW3"/>
        <sequenceFlow id="SF11" name="autom. Gen. des AV  oder Stellvertreterantrag von Vorg  oder Ablehnung" sourceRef="GW2" targetRef="GW3">
          <conditionExpression><![CDATA[${AOApprovalRequired==false || SupApprovalRequired==false}]]></conditionExpression>
        </sequenceFlow>
        <sequenceFlow id="SF10" name="Genehmigung Führungskraft wird benötigt" sourceRef="GW2" targetRef="SUP_Approval">
          <conditionExpression><![CDATA[${SupApprovalRequired==true}]]></conditionExpression>
        </sequenceFlow>
        <sequenceFlow id="SF9" name="Einzelfallgenehmigung Applikationsverantwortlicher wird benötigt" sourceRef="GW2" targetRef="APPOWN_Approval">
          <conditionExpression><![CDATA[${AOApprovalRequired==true}]]></conditionExpression>
        </sequenceFlow>
        <sequenceFlow id="SF5" sourceRef="EvaluateApprovalRequirements" targetRef="GW2"/>
      </transaction>
      <sequenceFlow id="SF3" sourceRef="SetBasicVariables" targetRef="Approval"/>
      <transaction completionQuantity="1" id="Provisioning" isForCompensation="false" method="##Compensate" name="Einrichtung" startQuantity="1" triggeredByEvent="false">
        <extensionElements>
          <yaoqiang:style opacity="50"/>
        </extensionElements>
        <incoming>SF17</incoming>
        <outgoing>SF47</outgoing>
        <startEvent id="StartProvisioning" isInterrupting="true" parallelMultiple="false">
          <outgoing>SF19</outgoing>
        </startEvent>
        <endEvent id="EndProvisioning">
          <incoming>SF25</incoming>
        </endEvent>
        <serviceTask activiti:class="pucco.activiti.serviceTask.approval.EvaluateProvisioning" completionQuantity="1" id="EvaluateProvisioning" implementation="##WebService" isForCompensation="false" name="benötigte Einrichtungsarten analysieren" startQuantity="1">
          <extensionElements>
            <activiti:formProperty id="AutomaticUsermanagement" required="true" type="boolean" writable="true"/>
            <activiti:formProperty id="ManualUsermanagement" required="true" type="boolean" writable="true"/>
          </extensionElements>
          <incoming>SF19</incoming>
          <outgoing>SF20</outgoing>
        </serviceTask>
        <inclusiveGateway gatewayDirection="Unspecified" id="GW5">
          <incoming>SF20</incoming>
          <outgoing>SF21</outgoing>
          <outgoing>SF23</outgoing>
        </inclusiveGateway>
        <inclusiveGateway gatewayDirection="Unspecified" id="GW6">
          <incoming>SF22</incoming>
          <incoming>SF24</incoming>
          <outgoing>SF25</outgoing>
        </inclusiveGateway>
        <endEvent id="CancelProvisioning" name="Cancel">
          <incoming>SF29</incoming>
          <cancelEventDefinition id="CancelProvisioningED"/>
        </endEvent>
        <serviceTask activiti:class="pucco.activiti.serviceTask.approval.PrepareCancelNotification" completionQuantity="1" id="PrepareCancelApprovalNotification" implementation="##WebService" isForCompensation="false" name="Abbruch E-Mail vorbereiten" startQuantity="1">
          <incoming>SF27</incoming>
          <incoming>SF26</incoming>
          <outgoing>SF28</outgoing>
        </serviceTask>
        <serviceTask activiti:type="mail" completionQuantity="1" id="SendCancelApprovalNotification" implementation="##WebService" isForCompensation="false" name="E-Mail an alle  Beteiligte über  Abbruch schicken" startQuantity="1">
          <extensionElements>
            <activiti:field name="to" stringValue="${RecipientCancelNotification}"/>
            <activiti:field name="from" stringValue="address@mail.de"/>
            <activiti:field name="subject" stringValue="Auftrag ${ProcInstId} abgebrochen"/>
            <activiti:field name="cc" stringValue="${CCRecipientsCancelNotification}"/>
            <activiti:field name="html">
              <activiti:expression><![CDATA[<html>
              <body>
                  Cancel Notification
              </body>
               </html>]]></activiti:expression>
            </activiti:field>
          </extensionElements>
          <incoming>SF28</incoming>
          <outgoing>SF29</outgoing>
        </serviceTask>
        <sequenceFlow id="SF25" sourceRef="GW6" targetRef="EndProvisioning"/>
        <sequenceFlow id="SF20" sourceRef="EvaluateProvisioning" targetRef="GW5"/>
        <sequenceFlow id="SF29" sourceRef="SendCancelApprovalNotification" targetRef="CancelProvisioning"/>
        <sequenceFlow id="SF19" sourceRef="StartProvisioning" targetRef="EvaluateProvisioning"/>
        <sequenceFlow id="SF28" sourceRef="PrepareCancelApprovalNotification" targetRef="SendCancelApprovalNotification"/>
        <transaction completionQuantity="1" id="ManualProvisioning" isForCompensation="false" method="##Compensate" name="manuelle Einrichtung" startQuantity="1" triggeredByEvent="false">
          <incoming>SF21</incoming>
          <outgoing>SF22</outgoing>
          <serviceTask activiti:class="pucco.activiti.serviceTask.approval.SaveDataOREX" completionQuantity="1" id="SaveDataOREX" implementation="##WebService" isForCompensation="false" name="Benutzerdaten in OREX-DB schreiben" startQuantity="1">
            <incoming>SF32</incoming>
            <incoming>SF35</incoming>
            <incoming>SF30</incoming>
            <outgoing>SF60</outgoing>
          </serviceTask>
          <boundaryEvent attachedToRef="SaveDataOREX" cancelActivity="true" id="CatchCompensationSaveDataOREX" parallelMultiple="false">
            <compensateEventDefinition id="CatchCompensationSaveDataOREXED" waitForCompletion="true"/>
          </boundaryEvent>
          <boundaryEvent attachedToRef="SaveDataOREX" cancelActivity="true" id="CatchConnectivityErrorManualProvisioning" name="Erreichbarkeit" parallelMultiple="false">
            <outgoing>SF31</outgoing>
            <errorEventDefinition id="CatchConnectivityErrorManualProvisioningED"/>
          </boundaryEvent>
          <boundaryEvent attachedToRef="SaveDataOREX" cancelActivity="true" id="CatchUnspecificErrorManualProvisioning" name="unspezifischer Fehler" parallelMultiple="false">
            <outgoing>SF33</outgoing>
            <errorEventDefinition id="CatchUnspecificErrorManualProvisioningED"/>
          </boundaryEvent>
          <serviceTask activiti:class="pucco.activiti.serviceTask.approval.CompenseSaveDataOREX" completionQuantity="1" id="compenseSaveDataOREX" implementation="##WebService" isForCompensation="true" name="Eingetragene Benuterdaten aus OREX-DB löschen" startQuantity="1"/>
          <intermediateCatchEvent id="IE1" name="10 Minuten" parallelMultiple="false">
            <incoming>SF31</incoming>
            <outgoing>SF32</outgoing>
            <timerEventDefinition id="IE1ED">
              <timeDuration><![CDATA[PT10M]]></timeDuration>
            </timerEventDefinition>
          </intermediateCatchEvent>
          <sequenceFlow id="SF32" sourceRef="IE1" targetRef="SaveDataOREX"/>
          <sequenceFlow id="SF31" sourceRef="CatchConnectivityErrorManualProvisioning" targetRef="IE1"/>
          <userTask activitiSmiley Tongueriority="50" completionQuantity="1" id="AnalyseErrorManualProvisioning" implementation="##unspecified" isForCompensation="false" name="Fehler Manuelle Einrichtung" startQuantity="1">
            <extensionElements>
              <activiti:formProperty id="ErrorState" name="Fehlerstatus" required="true" type="enum">
                <activiti:value id="fixed" name="Fehler behoben"/>
                <activiti:value id="corrupt" name="Fehler irreparabel"/>
                <activiti:value id="retry" name="Datenspeicherung erneut versuchen"/>
              </activiti:formProperty>
            </extensionElements>
            <incoming>SF33</incoming>
            <outgoing>SF34</outgoing>
          </userTask>
          <sequenceFlow id="SF33" sourceRef="CatchUnspecificErrorManualProvisioning" targetRef="AnalyseErrorManualProvisioning"/>
          <exclusiveGateway gatewayDirection="Unspecified" id="GW8">
            <incoming>SF34</incoming>
            <outgoing>SF35</outgoing>
            <outgoing>SF37</outgoing>
            <outgoing>SF36</outgoing>
          </exclusiveGateway>
          <sequenceFlow id="SF34" sourceRef="AnalyseErrorManualProvisioning" targetRef="GW8"/>
          <sequenceFlow id="SF35" sourceRef="GW8" targetRef="SaveDataOREX">
            <conditionExpression><![CDATA[$(ErrorState==retry)]]></conditionExpression>
          </sequenceFlow>
          <endEvent id="EndManualProvisioning">
            <incoming>SF37</incoming>
            <incoming>SF60</incoming>
          </endEvent>
          <sequenceFlow id="SF60" sourceRef="SaveDataOREX" targetRef="EndManualProvisioning"/>
          <sequenceFlow id="SF37" sourceRef="GW8" targetRef="EndManualProvisioning">
            <conditionExpression><![CDATA[$(ErrorState==fixed)]]></conditionExpression>
          </sequenceFlow>
          <endEvent id="IrreparableStateEndManualProvisioning" name="irreparabler Fehler">
            <incoming>SF36</incoming>
            <errorEventDefinition errorRef="irreparableState" id="IrreparableStateEndManualProvisioningED"/>
          </endEvent>
          <sequenceFlow id="SF36" sourceRef="GW8" targetRef="IrreparableStateEndManualProvisioning">
            <conditionExpression><![CDATA[$(ErrorState==corrupt)]]></conditionExpression>
          </sequenceFlow>
          <startEvent id="StartManualProvisioning" isInterrupting="true" parallelMultiple="false">
            <outgoing>SF30</outgoing>
          </startEvent>
          <sequenceFlow id="SF30" sourceRef="StartManualProvisioning" targetRef="SaveDataOREX"/>
        </transaction>
        <sequenceFlow id="SF21" sourceRef="GW5" targetRef="ManualProvisioning">
          <conditionExpression><![CDATA[${ManualProvisioning==true}]]></conditionExpression>
        </sequenceFlow>
        <sequenceFlow id="SF22" sourceRef="ManualProvisioning" targetRef="GW6"/>
        <transaction completionQuantity="1" id="AutomaticPrivisioning" isForCompensation="false" method="##Compensate" name="automatische Einrichtung" startQuantity="1" triggeredByEvent="false">
          <incoming>SF23</incoming>
          <outgoing>SF24</outgoing>
          <startEvent id="StartAutomaticProvisioning" isInterrupting="true" parallelMultiple="false">
            <outgoing>SF38</outgoing>
          </startEvent>
          <serviceTask activiti:class="pucco.activiti.serviceTask.approval.SaveDataIAMDB" completionQuantity="1" id="SaveDataIAMDB" implementation="##WebService" isForCompensation="false" name="Benutzerdaten in IAMDB schreiben" startQuantity="1">
            <incoming>SF38</incoming>
            <incoming>SF40</incoming>
            <incoming>SF43</incoming>
            <outgoing>SF46</outgoing>
          </serviceTask>
          <boundaryEvent attachedToRef="SaveDataIAMDB" cancelActivity="true" id="CatchCompensationSaveDataIAMDB" parallelMultiple="false">
            <compensateEventDefinition id="CatchCompensationSaveDataIAMDBED" waitForCompletion="true"/>
          </boundaryEvent>
          <boundaryEvent attachedToRef="SaveDataIAMDB" cancelActivity="true" id="CatchConnectivityErrorAutomaticProvisioning" name="Erreichbarkeit" parallelMultiple="false">
            <outgoing>SF39</outgoing>
            <errorEventDefinition id="CatchConnectivityErrorAutomaticProvisioningED"/>
          </boundaryEvent>
          <boundaryEvent attachedToRef="SaveDataIAMDB" cancelActivity="true" id="CatchUnspecificErrorAutomaticProvisioning" name="Other" parallelMultiple="false">
            <outgoing>SF41</outgoing>
            <errorEventDefinition id="CatchUnspecificErrorAutomaticProvisioningED"/>
          </boundaryEvent>
          <sequenceFlow id="SF38" sourceRef="StartAutomaticProvisioning" targetRef="SaveDataIAMDB"/>
          <serviceTask activiti:class="pucco.activiti.serviceTask.approval.CompenseSaveDataIAMDB" completionQuantity="1" id="CompenseSaveDataIAMDB" implementation="##WebService" isForCompensation="true" name="Eingetragene Benutzerdaten aus IAMDB löschen" startQuantity="1"/>
          <endEvent id="EndAutomaticProvisioning">
            <incoming>SF46</incoming>
            <incoming>SF45</incoming>
          </endEvent>
          <sequenceFlow id="SF46" sourceRef="SaveDataIAMDB" targetRef="EndAutomaticProvisioning"/>
          <userTask activitiSmiley Tongueriority="50" completionQuantity="1" id="AnalyseErrorAutomatischeEinrichtung" implementation="##unspecified" isForCompensation="false" name="Fehler automatische Einrichtung" startQuantity="1">
            <extensionElements>
              <activiti:formProperty id="ErrorState" name="Fehlerstatus" required="true" type="enum">
                <activiti:value id="fixed" name="Fehler behoben"/>
                <activiti:value id="corrupt" name="Fehler irreparabel"/>
                <activiti:value id="retry" name="Datenspeicherung erneut versuchen"/>
              </activiti:formProperty>
            </extensionElements>
            <incoming>SF41</incoming>
            <outgoing>SF42</outgoing>
          </userTask>
          <sequenceFlow id="SF41" sourceRef="CatchUnspecificErrorAutomaticProvisioning" targetRef="AnalyseErrorAutomatischeEinrichtung"/>
          <intermediateCatchEvent id="IE2" name="10 Minuten" parallelMultiple="false">
            <incoming>SF39</incoming>
            <outgoing>SF40</outgoing>
            <timerEventDefinition id="IE2ED">
              <timeDuration><![CDATA[PT10M]]></timeDuration>
            </timerEventDefinition>
          </intermediateCatchEvent>
          <sequenceFlow id="SF39" sourceRef="CatchConnectivityErrorAutomaticProvisioning" targetRef="IE2"/>
          <sequenceFlow id="SF40" sourceRef="IE2" targetRef="SaveDataIAMDB"/>
          <exclusiveGateway gatewayDirection="Unspecified" id="GW7">
            <incoming>SF42</incoming>
            <outgoing>SF43</outgoing>
            <outgoing>SF44</outgoing>
            <outgoing>SF45</outgoing>
          </exclusiveGateway>
          <sequenceFlow id="SF42" sourceRef="AnalyseErrorAutomatischeEinrichtung" targetRef="GW7"/>
          <sequenceFlow id="SF43" sourceRef="GW7" targetRef="SaveDataIAMDB">
            <conditionExpression><![CDATA[$(ErrorState==retry)]]></conditionExpression>
          </sequenceFlow>
          <endEvent id="IrreparableStateEndAutomaticProvisioning" name="irreparabler Fehler">
            <incoming>SF44</incoming>
            <errorEventDefinition errorRef="irreparableState" id="IrreparableStateEndAutomaticProvisioningED"/>
          </endEvent>
          <sequenceFlow id="SF44" sourceRef="GW7" targetRef="IrreparableStateEndAutomaticProvisioning">
            <conditionExpression><![CDATA[$(ErrorState==corrupt)]]></conditionExpression>
          </sequenceFlow>
          <sequenceFlow id="SF45" sourceRef="GW7" targetRef="EndAutomaticProvisioning">
            <conditionExpression><![CDATA[$(ErrorState==fixed)]]></conditionExpression>
          </sequenceFlow>
        </transaction>
        <sequenceFlow id="SF23" sourceRef="GW5" targetRef="AutomaticPrivisioning">
          <conditionExpression><![CDATA[${AutomaticProvisioning==true}]]></conditionExpression>
        </sequenceFlow>
        <sequenceFlow id="SF24" sourceRef="AutomaticPrivisioning" targetRef="GW6"/>
        <boundaryEvent attachedToRef="AutomaticPrivisioning" cancelActivity="true" id="CatchIrreparableStateAutomaticProvisioning" name="irreparabler Fehler" parallelMultiple="false">
          <extensionElements>
            <yaoqiang:style align="center" labelPosition="center" verticalAlign="bottom" verticalLabelPosition="top"/>
          </extensionElements>
          <outgoing>SF26</outgoing>
          <errorEventDefinition id="CatchIrreparableStateAutomaticProvisioningED"/>
        </boundaryEvent>
        <boundaryEvent attachedToRef="ManualProvisioning" cancelActivity="true" id="CatchIrreparableStateManualProvisioning" name="irreparabler Fehler" parallelMultiple="false">
          <outgoing>SF27</outgoing>
          <errorEventDefinition id="CatchIrreparableStateManualProvisioningED"/>
        </boundaryEvent>
        <sequenceFlow id="SF27" sourceRef="CatchIrreparableStateManualProvisioning" targetRef="PrepareCancelApprovalNotification"/>
        <sequenceFlow id="SF26" sourceRef="CatchIrreparableStateAutomaticProvisioning" targetRef="PrepareCancelApprovalNotification"/>
      </transaction>
      <sequenceFlow id="SF17" sourceRef="GW4" targetRef="Provisioning">
        <conditionExpression><![CDATA[${Approved==true}]]></conditionExpression>
      </sequenceFlow>
      <sequenceFlow id="SF47" sourceRef="Provisioning" targetRef="GW9"/>
      <sequenceFlow id="SF18" sourceRef="GW4" targetRef="GW9">
       <conditionExpression><![CDATA[${Approved==false}]]></conditionExpression>
      </sequenceFlow>
      <sequenceFlow id="SF48" sourceRef="GW9" targetRef="EndStandardForm"/>
      <boundaryEvent attachedToRef="Provisioning" cancelActivity="true" id="CatchCancelProvisioning" parallelMultiple="false">
        <extensionElements>
          <yaoqiang:style align="left" labelPosition="right" verticalAlign="middle" verticalLabelPosition="middle"/>
        </extensionElements>
        <outgoing>SF49</outgoing>
        <cancelEventDefinition id="CatchCancelProvisioningED"/>
      </boundaryEvent>
      <sequenceFlow id="SF49" sourceRef="CatchCancelProvisioning" targetRef="EndStandardForm"/>
      <parallelGateway gatewayDirection="Unspecified" id="GW10">
        <incoming>SF2</incoming>
        <outgoing>SF55</outgoing>
        <outgoing>SF56</outgoing>
      </parallelGateway>
      <sequenceFlow id="SF2" sourceRef="StartStandardForm" targetRef="GW10"/>
      <sequenceFlow id="SF55" sourceRef="GW10" targetRef="SetBasicVariables"/>
      <intermediateCatchEvent id="CatchWait8Weeks" name="Warte 8 Wochen">
        <incoming>SF56</incoming>
        <outgoing>SF57</outgoing>
        <timerEventDefinition id="CatchWait8WeeksED">
          <timeDuration><![CDATA[PT4H]]></timeDuration>
        </timerEventDefinition>
      </intermediateCatchEvent>
      <sequenceFlow id="SF56" sourceRef="GW10" targetRef="CatchWait8Weeks"/>
      <sequenceFlow id="SF57" sourceRef="CatchWait8Weeks" targetRef="CancelStandardForm"/>
      <endEvent id="CancelStandardForm" name="Cancel">
        <incoming>SF57</incoming>
        <cancelEventDefinition id="CancelStandardFormED"/>
      </endEvent>
      <sequenceFlow id="SF16" sourceRef="Approval" targetRef="GW4"/>
    </transaction>
    <serviceTask activiti:type="mail" completionQuantity="1" id="SendReminderNotification" implementation="##WebService" isForCompensation="false" name="Erinnerungsmail schicken" startQuantity="1">
      <extensionElements>
        <activiti:field name="from" stringValue="address@mail.de"/>
        <activiti:field expression="${personMailAddress}" name="to"/>
        <activiti:field expression="Erinnerungsmail ${procInstId}" name="subject"/>
        <activiti:field name="html">
          <activiti:expression><![CDATA[<html>
             <body>
                 Erinnerung
             </body>
             </html>]]></activiti:expression>
        </activiti:field>
      </extensionElements>
      <incoming>SF52</incoming>
      <outgoing>SF54</outgoing>
    </serviceTask>
    <serviceTask activiti:type="mail" completionQuantity="1" id="SendDeletionNotification" implementation="##WebService" isForCompensation="false" name="Löschungsmail schicken" startQuantity="1">
      <extensionElements>
        <activiti:field name="from" stringValue="address@mail.de"/>
        <activiti:field expression="${personMailAddress}" name="to"/>
        <activiti:field expression="Löschungsmail ${procInstId}" name="subject"/>
        <activiti:field name="html">
          <activiti:expression><![CDATA[<html>
             <body>
                 L&ouml;schung
             </body>
             </html>]]></activiti:expression>
        </activiti:field>
      </extensionElements>
      <incoming>SF51</incoming>
      <outgoing>SF53</outgoing>
    </serviceTask>
    <sequenceFlow id="SF53" sourceRef="SendDeletionNotification" targetRef="EndStandardFormular"/>
    <endEvent id="EndStandardFormular">
      <incoming>SF53</incoming>
      <incoming>SF54</incoming>
      <incoming>SF50</incoming>
    </endEvent>
    <sequenceFlow id="SF54" sourceRef="SendReminderNotification" targetRef="EndStandardFormular"/>
    <sequenceFlow id="SF50" sourceRef="StandardForm" targetRef="EndStandardFormular"/>
    <boundaryEvent attachedToRef="StandardForm" cancelActivity="true" id="CatchCancelStandardForm" name="Cancel" parallelMultiple="false">
      <extensionElements>
        <yaoqiang:style align="left" labelPosition="right" verticalAlign="middle" verticalLabelPosition="middle"/>
      </extensionElements>
      <outgoing>SF51</outgoing>
      <cancelEventDefinition id="CatchCancelStandardFormED"/>
    </boundaryEvent>
    <boundaryEvent attachedToRef="StandardForm" cancelActivity="false" id="Wait4Weeks" name="Warte 4 Wochen" parallelMultiple="false">
      <extensionElements>
        <yaoqiang:style align="left" labelPosition="right" verticalAlign="middle" verticalLabelPosition="middle"/>
      </extensionElements>
      <outgoing>SF52</outgoing>
      <timerEventDefinition id="Wait4Weeks_ED_1">
        <timeDuration><![CDATA[PT30M]]></timeDuration>
      </timerEventDefinition>
    </boundaryEvent>
    <sequenceFlow id="SF51" sourceRef="CatchCancelStandardForm" targetRef="SendDeletionNotification"/>
    <sequenceFlow id="SF52" sourceRef="Wait4Weeks" targetRef="SendReminderNotification"/>
    <association associationDirection="One" id="AS1" sourceRef="CatchCompensationSaveDataOREX" targetRef="compenseSaveDataOREX"/>
    <association associationDirection="One" id="AS2" sourceRef="CatchCompensationSaveDataIAMDB" targetRef="CompenseSaveDataIAMDB"/>
  </process>
</code>

mokematt
Champ in-the-making
Champ in-the-making
no idea, why the timer events will not be deleted?

jbarrez
Star Contributor
Star Contributor
Jobs (times) should be remove on process instance end.

Did you check the db: is the process instance actually removed from the table?

mokematt
Champ in-the-making
Champ in-the-making
I have checked the database and find out that the Process Instance was not ended.
The problem was in the bpmn xml code. I used a parallel gateway at the beginning, but that means both ways of the parallel gateway have to be finished successfully for ending the process instance.
I changed it into boundary events and removed the parallel gatway so now it works.

greets

mghb2009
Champ in-the-making
Champ in-the-making
the attachedToRef value?