cancel
Showing results for 
Search instead for 
Did you mean: 

User task Boundary timer not working In Activi-Explorer-5.12

kasit
Champ in-the-making
Champ in-the-making
I used a boundary timer to escalate a process from one task to another.The flow process works fine in activiti-explorer-5.11.In explorer-5.12 the timer does not wait for specified time duration and the escalation occurs right away.  I have set the bean property  jobExecutorActivate to true in activiti-standalone-context.xml file.Am I missing out something ? Kindly assist me on this.

Thankyou.
3 REPLIES 3

frederikherema1
Star Contributor
Star Contributor
Can you share the relevant portion of the BPMN-file here, in a code-block?

kasit
Champ in-the-making
Champ in-the-making
The boundary timer generates the BPMN as :

<boundaryEvent id="tasktimer" name="Timer" attachedToRef="Approve" cancelActivity="true">
      <timerEventDefinition>
        <timeDuration>PT3M</timeDuration>
      </timerEventDefinition>
    </boundaryEvent>


The full BPMN file is :

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlnsSmiley Surprisedmgdc="http://www.omg.org/spec/DD/20100524/DC" xmlnsSmiley Surprisedmgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
  <process id="tourProcess" name="Tour process" isExecutable="true">
    <startEvent id="start" name="Start" activiti:initiator="kermit">
      <extensionElements>
        <activiti:formProperty id="purpose" name="Purpose" type="string"></activiti:formProperty>
        <activiti:formProperty id="days" name="No Of Days" type="long"></activiti:formProperty>
      </extensionElements>
    </startEvent>
    <userTask id="Approve" name="Approve" activiti:assignee="gonzo">
      <extensionElements>
        <activiti:formProperty id="purpose1" name="purpose1" type="string" expression="${purpose}" readable="false" writable="false"></activiti:formProperty>
        <activiti:formProperty id="approve" name="Do You Approve" type="enum" required="true">
          <activiti:value id="true" name="Yes"></activiti:value>
          <activiti:value id="false" name="No"></activiti:value>
        </activiti:formProperty>
      </extensionElements>
    </userTask>
    <sequenceFlow id="flow1" sourceRef="start" targetRef="Approve"></sequenceFlow>
    <exclusiveGateway id="exclusivegateway1" name="Exclusive Gateway"></exclusiveGateway>
    <sequenceFlow id="flow3" sourceRef="exclusivegateway1" targetRef="mailrjctd">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${approve == false}]]></conditionExpression>
    </sequenceFlow>
    <serviceTask id="mailrjctd" name="User Taskrej" activiti:type="mail">
      <extensionElements>
        <activiti:field name="to">
          <activiti:string>asitsmoky02@gmail.com</activiti:string>
        </activiti:field>
        <activiti:field name="subject">
          <activiti:string>Tour Rejected</activiti:string>
        </activiti:field>
        <activiti:field name="charset">
          <activiti:string>UTF-8</activiti:string>
        </activiti:field>
        <activiti:field name="html">
          <activiti:string>&lt;body&gt;
Dear employee,

Your tour request has been rejected by your approving authority.           
&lt;/body&gt;</activiti:string>
        </activiti:field>
      </extensionElements>
    </serviceTask>
    <endEvent id="end" name="End"></endEvent>
    <sequenceFlow id="flow4" sourceRef="mailrjctd" targetRef="end"></sequenceFlow>
    <sequenceFlow id="flow5" sourceRef="exclusivegateway1" targetRef="mailapprvd">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${approve == true}]]></conditionExpression>
    </sequenceFlow>
    <serviceTask id="mailapprvd" name="User Taskapvd" activiti:type="mail">
      <extensionElements>
        <activiti:field name="to">
          <activiti:string>asitsmoky02@gmail.com</activiti:string>
        </activiti:field>
        <activiti:field name="subject">
          <activiti:string>Tour Approved</activiti:string>
        </activiti:field>
        <activiti:field name="charset">
          <activiti:string>UTF-8</activiti:string>
        </activiti:field>
        <activiti:field name="html">
          <activiti:string>&lt;body&gt;
Dear employee,

Your tour request has been approved by your approving authority.           
&lt;/body&gt;</activiti:string>
        </activiti:field>
      </extensionElements>
    </serviceTask>
    <sequenceFlow id="flow6" sourceRef="mailapprvd" targetRef="end"></sequenceFlow>
    <boundaryEvent id="tasktimer" name="Timer" attachedToRef="Approve" cancelActivity="true">
      <timerEventDefinition>
        <timeDuration>PT3M</timeDuration>
      </timerEventDefinition>
    </boundaryEvent>
    <userTask id="slapprove" name="SLA Approve" activiti:assignee="fozzie">
      <extensionElements>
        <activiti:formProperty id="purpose2" name="purpose2" type="${purpose1}" readable="false" writable="false"></activiti:formProperty>
        <activiti:formProperty id="approve" name="Do You Approve" type="enum" required="true">
          <activiti:value id="false" name="No"></activiti:value>
          <activiti:value id="true" name="Yes"></activiti:value>
        </activiti:formProperty>
      </extensionElements>
    </userTask>
    <sequenceFlow id="flow7" sourceRef="tasktimer" targetRef="slapprove"></sequenceFlow>
    <sequenceFlow id="flow8" sourceRef="slapprove" targetRef="exclusivegateway1"></sequenceFlow>
    <sequenceFlow id="flow9" sourceRef="Approve" targetRef="exclusivegateway1"></sequenceFlow>
  </process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_tourProcess">
    <bpmndi:BPMNPlane bpmnElement="tourProcess" id="BPMNPlane_tourProcess">
      <bpmndi:BPMNShape bpmnElement="start" id="BPMNShape_start">
        <omgdc:Bounds height="35.0" width="35.0" x="30.0" y="190.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="exclusivegateway1" id="BPMNShape_exclusivegateway1">
        <omgdc:Bounds height="40.0" width="40.0" x="290.0" y="127.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="end" id="BPMNShape_end">
        <omgdc:Bounds height="35.0" width="35.0" x="535.0" y="130.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="mailapprvd" id="BPMNShape_mailapprvd">
        <omgdc:Bounds height="55.0" width="105.0" x="370.0" y="200.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="mailrjctd" id="BPMNShape_mailrjctd">
        <omgdc:Bounds height="55.0" width="105.0" x="370.0" y="40.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="Approve" id="BPMNShape_Approve">
        <omgdc:Bounds height="55.0" width="105.0" x="130.0" y="180.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="slapprove" id="BPMNShape_slapprove">
        <omgdc:Bounds height="55.0" width="105.0" x="130.0" y="60.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="tasktimer" id="BPMNShape_tasktimer">
        <omgdc:Bounds height="30.0" width="30.0" x="168.0" y="166.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
        <omgdi:waypoint x="65.0" y="207.0"></omgdi:waypoint>
        <omgdi:waypoint x="130.0" y="207.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
        <omgdi:waypoint x="310.0" y="127.0"></omgdi:waypoint>
        <omgdi:waypoint x="422.0" y="95.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">
        <omgdi:waypoint x="475.0" y="67.0"></omgdi:waypoint>
        <omgdi:waypoint x="552.0" y="67.0"></omgdi:waypoint>
        <omgdi:waypoint x="552.0" y="130.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">
        <omgdi:waypoint x="310.0" y="167.0"></omgdi:waypoint>
        <omgdi:waypoint x="422.0" y="200.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">
        <omgdi:waypoint x="475.0" y="227.0"></omgdi:waypoint>
        <omgdi:waypoint x="552.0" y="227.0"></omgdi:waypoint>
        <omgdi:waypoint x="552.0" y="165.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7">
        <omgdi:waypoint x="183.0" y="166.0"></omgdi:waypoint>
        <omgdi:waypoint x="182.0" y="115.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow8" id="BPMNEdge_flow8">
        <omgdi:waypoint x="235.0" y="87.0"></omgdi:waypoint>
        <omgdi:waypoint x="310.0" y="87.0"></omgdi:waypoint>
        <omgdi:waypoint x="310.0" y="127.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow9" id="BPMNEdge_flow9">
        <omgdi:waypoint x="235.0" y="207.0"></omgdi:waypoint>
        <omgdi:waypoint x="310.0" y="207.0"></omgdi:waypoint>
        <omgdi:waypoint x="310.0" y="167.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>

frederikherema1
Star Contributor
Star Contributor
I don't really see anything wrong with your process. Can you check the ACT_HI_ACTINST table for the activity-trace, so you can see what chain of events occurred for the started process-instance. This may enlighten us…