cancel
Showing results for 
Search instead for 
Did you mean: 

EL expression for failedJobRetryTimeCycle

andreas1
Champ in-the-making
Champ in-the-making
Hi all

Since Activiti 5.16 the number of retries and the retry-wait-time can be configured like posted here:
https://app.camunda.com/confluence/display/foxUserGuide/Custom+Job+Retry+Strategy

I tried to provide the interval-expression as an EL-expression (like in every other places in Activiti) like this:

<serviceTask id="mySubmitTask" name="Submit order to Kurepo" activiti:async="true" activiti:delegateExpression="${mySubmitDelegate}">                        
    <extensionElements>
        <activiti:failedJobRetryTimeCycle>${jobRetryInterval}</activiti:failedJobRetryTimeCycle>
    </extensionElements>
</serviceTask>

where ${jobRetryInterval} resolves to a string-bean of value R10/PT1M

It looks like this is not supported, I always get this error:


org.activiti.engine.ActivitiException: failedJobRetryTimeCylcle has wrong format:${jobRetryInterval}
   at org.activiti.engine.impl.cmd.JobRetryCmd.execute(JobRetryCmd.java:94)
   at org.activiti.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:24)
   at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:57)
   at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:47)
   at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
   at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:45)
   at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:31)
   at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:40)
   at org.activiti.engine.impl.jobexecutor.FailedJobListener.execute(FailedJobListener.java:48)
   at org.activiti.spring.SpringTransactionContext$4.afterCompletion(SpringTransactionContext.java:97)
   at org.springframework.transaction.support.TransactionSynchronizationUtils.invokeAfterCompletion(TransactionSynchronizationUtils.java:168)


Do I really have to hardcode the interval-expression in the bpmn20.xml?

Thanks for any hints.
Regards
Andreas
2 REPLIES 2

trademak
Star Contributor
Star Contributor
Hi Andreas,

Good catch. I fully agree that it should be possible to use an expression.
Could you raise a JIRA issue and we'll fix it.

Thanks,

andreas1
Champ in-the-making
Champ in-the-making
Here's the JIRA issue: http://jira.codehaus.org/browse/ACT-2108

Thanks a lot & best regards
Andreas