Start Timer Event doesn't start

I have this xml definition file:

<process id="CattolicaChron" name="CattolicaChron" isExecutable="true">
    <serviceTask id="sid-0623741D-2AE1-4DBB-98D5-996B96C10548" flowable:type="http">
      <extensionElements>
        <flowable:field name="requestMethod">
          <flowable:string><![CDATA[POST]]></flowable:string>
        </flowable:field>
        <flowable:field name="requestUrl">
          <flowable:string><![CDATA[https://ssocli-coll.gruppocattolica.it/ms_oauth/oauth2/endpoints/oauthservice/tokens]]></flowable:string>
        </flowable:field>
        <flowable:field name="requestHeaders">
          <flowable:string><![CDATA[Authorization: Basic YXBpZy1jb2xsOnZFODdyYklta1RM
Content-type: application/x-www-form-urlencoded]]></flowable:string>
        </flowable:field>
        <flowable:field name="requestBody">
          <flowable:expression><![CDATA[${mybody}]]></flowable:expression>
        </flowable:field>
        <flowable:field name="responseVariableName">
          <flowable:string><![CDATA[httpresult]]></flowable:string>
        </flowable:field>
      </extensionElements>
    </serviceTask>
    <sequenceFlow id="sid-1DF867C9-49A3-4138-A4ED-92393B805ABE" sourceRef="sid-9D9CE2BF-AA34-4D72-9999-4253E31F6263" targetRef="sid-0623741D-2AE1-4DBB-98D5-996B96C10548"></sequenceFlow>
    <serviceTask id="sid-B3216512-7364-41D5-9803-FF8BD2886950" flowable:class="it.sysdata.helios_backend_admin.delegates.HttpProcessVariablesManagerDelegate"></serviceTask>
    <sequenceFlow id="sid-70EDCB39-227D-4666-AFB0-68B23C170D1A" sourceRef="sid-0623741D-2AE1-4DBB-98D5-996B96C10548" targetRef="sid-B3216512-7364-41D5-9803-FF8BD2886950"></sequenceFlow>
    <sequenceFlow id="sid-3EA69F7E-FB37-41C9-8456-2C1108DF8632" sourceRef="sid-B3216512-7364-41D5-9803-FF8BD2886950" targetRef="sid-BB30B129-3CA0-4853-82EA-36BA66895A6D"></sequenceFlow>
    <serviceTask id="sid-BB30B129-3CA0-4853-82EA-36BA66895A6D" flowable:type="http">
      <extensionElements>
        <flowable:field name="requestMethod">
          <flowable:string><![CDATA[GET]]></flowable:string>
        </flowable:field>
        <flowable:field name="requestUrl">
          <flowable:string><![CDATA[http://api.test.gca.net/app/v2/subjects/me]]></flowable:string>
        </flowable:field>
        <flowable:field name="requestHeaders">
          <flowable:expression><![CDATA[Authorization: ${access_token}
Content-Type: application/json
secret: secret]]></flowable:expression>
        </flowable:field>
        <flowable:field name="saveResponseParameters">
          <flowable:string><![CDATA[true]]></flowable:string>
        </flowable:field>
      </extensionElements>
    </serviceTask>
    <sequenceFlow id="sid-70CE6C72-23FF-42F6-AA5B-9CC4D1FC239A" sourceRef="sid-BB30B129-3CA0-4853-82EA-36BA66895A6D" targetRef="sid-A7A4964F-E812-4972-A437-6B8D22795EEC"></sequenceFlow>
    <serviceTask id="sid-A7A4964F-E812-4972-A437-6B8D22795EEC" flowable:class="it.sysdata.helios_backend_admin.delegates.HttpOperationDelegate"></serviceTask>
    <endEvent id="sid-7DDE0A9F-8A5E-455C-92CB-D92FBAE2AC50"></endEvent>
    <sequenceFlow id="sid-E0049532-675E-4845-8211-9A6F68A32A4D" sourceRef="sid-A7A4964F-E812-4972-A437-6B8D22795EEC" targetRef="sid-7DDE0A9F-8A5E-455C-92CB-D92FBAE2AC50"></sequenceFlow>
    <startEvent id="sid-9D9CE2BF-AA34-4D72-9999-4253E31F6263" isInterrupting="false">
      <timerEventDefinition>
        <timeCycle>0 0/1 * * * ?</timeCycle>
      </timerEventDefinition>
    </startEvent>
  </process>

The process is run correctly first time but does not repeat after 1 minute. Are the configurations all right? I’ve generated the xml directly from Flowable Modeler

I’ve taken your process and replaced the detail tasks with a simple email task, leaving the timer start event and it sent emails every minute as expected.

Locate the process instance as well as the timer job that should have been created in the flowable-admin app and see if it can provide any more detail.

Hi @Dandoucet thank you for the tip.
There’s something not clear to me. If I just deploy my process, the start timer event works well and it calls my delegate every minute. But if I start the process instance with the start action, it works just the first time and then is not repeated.

In the docs it is said:

a start timer event is scheduled as soon as process is deployed. There is no need to call startProcessInstanceByXXX, although calling start process methods is not restricted and will cause one more starting of the process at the time of startProcessInstanceByXXX invocation.

So does this mean that with startProcessInstanceByXXX starts one and only one additional execution? Or should it also work with the start timer event, and so repeat every, in this case, 1 minute?

Hi,

When I fill-in your expression here:

https://www.freeformatter.com/cron-expression-generator-quartz.html

Then I see that it executes every hour at minute 00. Did you validate if this is the case?

Best regards,

Tijs

Hi,
I thought it should start every minute since I start it.

Anyway, I deployed the process at 10:25 and it started right away, and repeated every minute since then. Did the same with process instance and it execute just once, right away. If it executes every hour every minute starting from :00 of hour, then why with the deployment it started at 10:25 and repeated every minute like I wanted? And why with process instance doesn’t work?

EDIT
I’ve tried changing my cron expression to

0 0-59 * * * ? 
At second :00, every minute between :00 and :59, of every hour

but my process instance doesn’t run every minute

EDIT 2

So do I have to assume that in

So does this mean that with startProcessInstanceByXXX starts one and only one additional execution? Or should it also work with the start timer event, and so repeat every, in this case, 1 minute?

the second sentence is correct?