AnsweredAssumed Answered

Time cycle bad behaviour

Question asked by ejyanezp on Oct 22, 2014
Latest reply on Oct 24, 2014 by ejyanezp
Hi Activiti developers,

I think I bump into an engine's bug.

I have the following process (i'll put only the semantic part):

  <process id="enviarRecordatorios" name="Enviar Recordatorios" isExecutable="true">
    <startEvent id="startevent1" name="Start"></startEvent>
    <userTask id="usertask1" name="Perform Service"></userTask>
    <sequenceFlow id="flow1" sourceRef="startevent1" targetRef="usertask1"></sequenceFlow>
    <boundaryEvent id="boundarytimer1" name="Timer" attachedToRef="usertask1" cancelActivity="false">
      <timerEventDefinition>
        <timeCycle>R10/PT5S</timeCycle>
      </timerEventDefinition>
    </boundaryEvent>
    <sequenceFlow id="flow2" sourceRef="usertask1" targetRef="scripttask1"></sequenceFlow>
    <scriptTask id="scripttask1" name="Send Invoice" scriptFormat="groovy" activiti:autoStoreVariables="false">
      <script>def theTime = new Date()
println "Invoice sent at: $thetime"</script>
    </scriptTask>
    <sequenceFlow id="flow3" sourceRef="boundarytimer1" targetRef="scripttask2"></sequenceFlow>
    <scriptTask id="scripttask2" name="Notify Manager" scriptFormat="groovy" activiti:autoStoreVariables="false">
      <script>def theTime = new Date()
println "Manager Notified at: $theTime"</script>
    </scriptTask>
    <endEvent id="endevent1" name="End"></endEvent>
    <sequenceFlow id="flow4" sourceRef="scripttask1" targetRef="endevent1"></sequenceFlow>
    <sequenceFlow id="flow5" sourceRef="scripttask2" targetRef="endevent1"></sequenceFlow>
  </process>

The output is the following:

id 5 enviarRecordatorios:1:4
Manager Notified at: Tue Oct 21 22:01:36 VET 2014
Manager Notified at: Tue Oct 21 22:01:45 VET 2014
Manager Notified at: Tue Oct 21 22:01:50 VET 2014
Manager Notified at: Tue Oct 21 22:01:56 VET 2014
Manager Notified at: Tue Oct 21 22:01:56 VET 2014
Manager Notified at: Tue Oct 21 22:01:56 VET 2014
Manager Notified at: Tue Oct 21 22:01:56 VET 2014
Manager Notified at: Tue Oct 21 22:01:56 VET 2014
Manager Notified at: Tue Oct 21 22:01:56 VET 2014
Manager Notified at: Tue Oct 21 22:01:56 VET 2014

As you can see not all the time cycles are of 5 seconds. Is it a problem with the Job Executor?.
Thanks or the attention.

Regards,
Eduardo Yánez.

Outcomes