cancel
Showing results for 
Search instead for 
Did you mean: 

Timer Start Event behaviour

smirzai
Champ on-the-rise
Champ on-the-rise
Hi
I am not sure if this is the normal behavior or a bug.

I have attached the sample.

I assume it should execute the service task after 1 second  and not before. Am I right ?


Saeid
14 REPLIES 14

frederikherema1
Star Contributor
Star Contributor
That's just the way it should work. In BPMN, a timer-start event is triggered by the timer, not by actually starting the process…

If you want a process to do something after it is explicitally started using startProcess (a non start-event) after some time, use a receiveTask with a boundry-timer event attached to it as first step of your process…

smirzai
Champ on-the-rise
Champ on-the-rise
please also see more detailed comments in: http://jira.codehaus.org/browse/ACT-907

sudarshan
Champ in-the-making
Champ in-the-making
Hi,

We are using Activiti 5.13, have a process that executes every hour. Only when i deploy this definition, job executor starts.

But when I restart the server (tomcat), no job executor is getting created. I tried checking the same for a whole day.. could not find any job executors.. Is it a Bug or any solution ?

<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="schedulerProc" name="Scheduler" isExecutable="true">
    <serviceTask id="servicetask1" name="UnSuspender" activiti:expression=".."></serviceTask>
    <startEvent id="timerstartevent1" name="Timer start">
      <timerEventDefinition>
        <timeCycle>R24/PT1M</timeCycle>
      </timerEventDefinition>
    </startEvent>
    <sequenceFlow id="flow1" sourceRef="timerstartevent1" targetRef="servicetask1"></sequenceFlow>
    <endEvent id="endevent1" name="End"></endEvent>
    <sequenceFlow id="flow2" sourceRef="servicetask1" targetRef="endevent1"></sequenceFlow>
  </process>
…..

houstoniasian
Champ in-the-making
Champ in-the-making
I agree with Sudarshan (I use 5.13 as well).  However, the behavior is not consistent.  I have two process definitions that would start with a timer.  One seems to always starts as soon as the server (Tomcat) starts.  The other one, I have to manually start the timer job (Manager - Jobs - Execute).  I don't know why Activiti-Explorer starts the first process but not the 2nd one even though both have the timerstartevent at the beginning of the process.

jbarrez
Star Contributor
Star Contributor
The job executor will not pick up the job if three failures have happened. Maybe you see that: check the ACT_RU_JOB table and see how many retries are in there. If > 3, the job executor wont pick up the job anymore.