AnsweredAssumed Answered

TimerBoundaryEvent not stable.

Question asked by solutions on Feb 16, 2012
:oops:
I am using TimerBoundaryEvent attaching to a UserTask on Activiti 5.8. I test it using Activiti-Explorer. However, I found the TimerBoundaryEvent is not stable on Activiti Engine. Sometime (50% of chance) it throw exception as:

org.activiti.engine.impl.javax.el.PropertyNotFoundException: Cannot resolve identifier 'printerBean'

I am using Spring bean named "printerBean" of Java class to print out log message, it configured in the Process Engine configuration:
<bean id="printerBean" class="hc.gc.ca.LogPrinter" />

And my process definition (SimpleTimerProcess.bpmn20.xml) is below:
<?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" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="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="SimpleTimerProcess" name="SimpleTimerProcess">
    <documentation>Place documentation for the 'SimpleTimerProcess' process here.</documentation>
    <startEvent id="startevent1" name="Start"></startEvent>
    <userTask id="usertask1" name="UserTask01" activiti:candidateGroups="ManagerGroup"></userTask>
    <boundaryEvent id="boundarytimer1" name="" cancelActivity="true" attachedToRef="usertask1">
      <timerEventDefinition>
        <timeDuration>PT2S</timeDuration>
      </timerEventDefinition>
    </boundaryEvent>
    <serviceTask id="servicetask3" name="TimerEvent01" activiti:expression="#{printerBean.printMessage(execution, 'TimerEvent01good01')}"></serviceTask>
    <sequenceFlow id="flow4" name="" sourceRef="boundarytimer1" targetRef="servicetask3"></sequenceFlow>
    <endEvent id="endevent1" name="End"></endEvent>
    <endEvent id="endevent2" name="End"></endEvent>
    <sequenceFlow id="flow6" name="" sourceRef="servicetask3" targetRef="endevent2"></sequenceFlow>
    <sequenceFlow id="flow7" name="" sourceRef="startevent1" targetRef="usertask1"></sequenceFlow>
    <sequenceFlow id="flow8" name="" sourceRef="usertask1" targetRef="endevent1"></sequenceFlow>
  </process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_SimpleTimerProcess">
    <bpmndi:BPMNPlane bpmnElement="SimpleTimerProcess" id="BPMNPlane_SimpleTimerProcess">
      <bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
        <omgdc:Bounds height="35" width="35" x="340" y="270"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1">
        <omgdc:Bounds height="55" width="105" x="530" y="260"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="servicetask3" id="BPMNShape_servicetask3">
        <omgdc:Bounds height="55" width="105" x="660" y="410"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="boundarytimer1" id="BPMNShape_boundarytimer1">
        <omgdc:Bounds height="30" width="30" x="580" y="300"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
        <omgdc:Bounds height="35" width="35" x="775" y="270"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="endevent2" id="BPMNShape_endevent2">
        <omgdc:Bounds height="35" width="35" x="830" y="420"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">
        <omgdi:waypoint x="595" y="330"></omgdi:waypoint>
        <omgdi:waypoint x="594" y="437"></omgdi:waypoint>
        <omgdi:waypoint x="660" y="437"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">
        <omgdi:waypoint x="765" y="437"></omgdi:waypoint>
        <omgdi:waypoint x="830" y="437"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7">
        <omgdi:waypoint x="375" y="287"></omgdi:waypoint>
        <omgdi:waypoint x="530" y="287"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow8" id="BPMNEdge_flow8">
        <omgdi:waypoint x="635" y="287"></omgdi:waypoint>
        <omgdi:waypoint x="775" y="287"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>


Has anyone had the problem of TimerBoundaryEvent is not stable? How to resolve it? Thanks!

-Activiti Developer.

Attachments

Outcomes