failedJobRetryTimeCycle not being honored / validated

1,169 views
Skip to first unread message

galen...@gmail.com

unread,
Nov 22, 2013, 2:06:34 PM11/22/13
to camunda-...@googlegroups.com
Hi,

I have this process:
http://camunda.org/share/#/process/bfc2ed5f-02a6-44a9-b6da-09f74f0f28af

but the camunda:failedJobRetryTimeCycle setting as described here:

http://docs.camunda.org/latest/guides/user-guide/#failed-jobs

does not seem to be working (it's not honoring the 1 second cycles I set up, but instead is doing 5 minute retries).


Additionally, I put 'foo' in there for one of the settings, and I don't get any parse errors:

<camunda:failedJobRetryTimeCycle>foo</camunda:failedJobRetryTimeCycle>

Am I doing something wrong, or is there a bug?

I'm on
<camunda.version>7.0.0-Final</camunda.version>

Thanks,
Galen

Bernd Rücker (camunda)

unread,
Nov 25, 2013, 4:20:21 AM11/25/13
to camunda-...@googlegroups.com
Hi Galen.

What environment do you have? You might have to configure this to work
correctly - but it should be done in the pre-packages shared engine
distros.

Cheers
Bernd

-----Urspr�ngliche Nachricht-----
Von: camunda-...@googlegroups.com
[mailto:camunda-...@googlegroups.com] Im Auftrag von
galen...@gmail.com
Gesendet: Freitag, 22. November 2013 20:07
An: camunda-...@googlegroups.com
Betreff: [camunda-bpm-users] failedJobRetryTimeCycle not being honored /
validated
--
You received this message because you are subscribed to the Google Groups
"camunda BPM users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to camunda-bpm-us...@googlegroups.com.
To post to this group, send email to camunda-...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/camunda-bpm-users/c4804f4e-84dc-4b98-b2f
a-11c1136114ec%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Daniel Meyer

unread,
Nov 25, 2013, 7:43:57 AM11/25/13
to camunda-...@googlegroups.com
Hi Bernd, Galen,

If you configure the process engine using spring configuration ,you have to use the following configuration additions:


  <bean id="processEngineConfiguration" class="org.camunda.bpm.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration">
  ...  
    <property name="customPostBPMNParseListeners">
<list>
<bean class="org.camunda.bpm.engine.impl.bpmn.parser.FoxFailedJobParseListener" />
</list>
</property>
<property name="failedJobCommandFactory" class="org.camunda.bpm.engine.impl.jobexecutor.FoxFailedJobCommandFactory" />
  </bean>  
</beans>

Cheers,
Daniel Meyer

galen...@gmail.com

unread,
Nov 25, 2013, 12:39:17 PM11/25/13
to camunda-...@googlegroups.com
Hi Daniel,

I had to tweak the syntax slightly to this:

<font face="courier new, monospace">
<bean id="processEngineConfiguration" class="org.camunda.bpm.engine.spring.SpringProcessEngineConfiguration">


...
<property name="customPostBPMNParseListeners">
<list>
<bean class="org.camunda.bpm.engine.impl.bpmn.parser.FoxFailedJobParseListener" />
</list>
</property>

<property name="failedJobCommandFactory" ref="foxFailedJobCommandFactory" />
</bean>

<bean id="foxFailedJobCommandFactory" class="org.camunda.bpm.engine.impl.jobexecutor.FoxFailedJobCommandFactory" />
</font>

However, it still does not appear to be working (no parse error, and still the 5 minute timeouts).

The link you gave me in another post was:

http://stage.docs.camunda.org/guides/user-guide/#failed-jobs

which mentions "fox:failedJobRetryTimeCycle".

The documentation I am currently working off of is:

http://docs.camunda.org/latest/guides/user-guide/#failed-jobs

which says: "camunda:failedJobRetryTimeCycle".

I'm supposed to use "camunda" as the namespace, right?

Thanks,
Galen

galen...@gmail.com

unread,
Nov 25, 2013, 1:04:36 PM11/25/13
to camunda-...@googlegroups.com, galen...@gmail.com
Here is the latest process I'm working with, if it helps:

http://camunda.org/share/#/process/28df3cf7-bcce-41c7-8486-5577b68e0321

NOTE: See my comments on the task nodes about how many seconds they wait. The tokens should hit the joining gateway about 9 seconds apart in this example. This is the exception I get:

org.camunda.bpm.engine.OptimisticLockingException: ExecutionEntity[28] was updated by another transaction concurrently

and this is what gets inserted in the database at that moment:

mysql> select * from ACT_RU_JOB;
+-----+------+---------+---------------------+--------------------------------------+------------+---------------+----------------------+----------+---------------------+----------------+----------+---------+--------------------+-------------------------+----------------+
| ID_ | REV_ | TYPE_ | LOCK_EXP_TIME_ | LOCK_OWNER_ | EXCLUSIVE_ | EXECUTION_ID_ | PROCESS_INSTANCE_ID_ | RETRIES_ | EXCEPTION_STACK_ID_ | EXCEPTION_MSG_ | DUEDATE_ | REPEAT_ | HANDLER_TYPE_ | HANDLER_CFG_ | DEPLOYMENT_ID_ |
+-----+------+---------+---------------------+--------------------------------------+------------+---------------+----------------------+----------+---------------------+----------------+----------+---------+--------------------+-------------------------+----------------+
| 37 | 2 | message | 2013-11-25 09:54:19 | cd656092-9d0d-4ba9-ace2-23bdefd1b14d | 0 | 32 | 28 | 3 | NULL | NULL | NULL | NULL | async-continuation | transition-create-scope | 1 |
+-----+------+---------+---------------------+--------------------------------------+------------+---------------+----------------------+----------+---------------------+----------------+----------+---------+--------------------+-------------------------+----------------+
1 row in set (0.00 sec)

Christian Lipphardt

unread,
Nov 26, 2013, 8:42:34 AM11/26/13
to camunda-...@googlegroups.com, galen...@gmail.com
Hi Galen,

the FoxFailedJobParseListener checks if the extension element belongs to the namespace "http://www.camunda.com/fox", so you must use a prefix bound to the correct namespace, e.g. xmlns:fox="http://www.camunda.com/fox". Otherwise the extension element is ignored. The documentation on stage.docs.camunda.org is the correct one.

galen...@gmail.com

unread,
Nov 26, 2013, 12:56:37 PM11/26/13
to camunda-...@googlegroups.com, galen...@gmail.com
Hi Christian,

I changed it all to use the "fox" namespace, and still no luck.

Here's my updated BPMN:
http://www.camunda.org/share/#/process/9eb0cf32-242b-4394-ae90-5ebbe253a036

The main website points to "http://docs.camunda.org/latest/guides/user-guide/". I'm not sure what "stage" is, but Camunda might want to re-link the main website.

Thanks,
Galen

Christian Lipphardt

unread,
Nov 26, 2013, 1:13:00 PM11/26/13
to camunda-...@googlegroups.com, galen...@gmail.com
Hi Galen,

http://stage.docs.camunda.com is the preview site for the next documentation release.

Regarding your issue, maybe you can debug into org.camunda.bpm.engine.impl.bpmn.parser.FoxFailedJobParseListener#setFailedJobRetryTimeCycleValue and see if it is invoked at all or into org.camunda.bpm.engine.impl.cmd.ExecuteJobsCmd:76 to see which FailedJobCmd the FailedJobListener executes.

Best regards,
Christian

Daniel Meyer

unread,
Nov 27, 2013, 7:24:01 AM11/27/13
to camunda-...@googlegroups.com, galen...@gmail.com
Hi Galen,

could you make this work? Here is an example from our testsuite which should work in combination with the configuration I posted earlier:

It is important to reference the correct namespace: 

<definitions id="definitions"
        xmlns:camunda="http://activiti.org/bpmn"
        xmlns:fox="http://www.camunda.com/fox"
        targetNamespace="Examples">

              <task id="failingTask" camunda:async="true">
                        <extensionElements>
                         <fox:failedJobRetryTimeCycle>R5/PT5M</fox:failedJobRetryTimeCycle>
                 </extensionElements>
                </task>

Cheers,
Daniel Meyer

galen...@gmail.com

unread,
Dec 2, 2013, 7:55:51 PM12/2/13
to camunda-...@googlegroups.com, galen...@gmail.com
Hi Daniel,

I got your test suite to work, but for some reason mine still doesn't work. I think there may be a difference like:

-- Parallel execution / parallel gateway / concurrent execution is involved in my case
-- I have a mixed set of namespaces in my extensionElements:

<bpmn2:extensionElements>
<fox:failedJobRetryTimeCycle>R4/PT1S</fox:failedJobRetryTimeCycle>
<camunda:field name="durationMillis" stringValue="10000"/>
</bpmn2:extensionElements>

Anyway, if I get some time, I can try to simplify my case to a simpler, failing test case.

Thanks,
Galen

matthias...@gmail.com

unread,
Jan 24, 2014, 5:48:03 AM1/24/14
to camunda-...@googlegroups.com, galen...@gmail.com
We had to wrap the process deployment and start into it's own new transaction to get this done. Otherwise the JobExecutor doesn't see any change on ACT_RU_JOB.

HTH, Matthias

maddi...@gmail.com

unread,
Jun 12, 2014, 7:54:50 AM6/12/14
to camunda-...@googlegroups.com, galen...@gmail.com, matthias...@gmail.com
Hay Matthias,

could you please explain how you wrapped the process deployment and started it in a own new transaction?

Thanks!
Martin

maddi...@gmail.com

unread,
Jun 12, 2014, 7:58:15 AM6/12/14
to camunda-...@googlegroups.com, galen...@gmail.com, matthias...@gmail.com, maddi...@gmail.com
Or is there maybe a way to use one of the Process Engine Services to configure the job executor's retry time programmatically?

Thanks a lot!
Martin

Reply all
Reply to author
Forward
0 new messages