HowTo - Retry and Incident creation on failed job in Camunda CMMN

1,821 views
Skip to first unread message

nataraj.b...@gmail.com

unread,
Aug 12, 2015, 6:24:18 AM8/12/15
to camunda BPM users, nataraj.b...@wipro.com
Hi Team,

I am newbie to Camunda CMMN, I am trying to get the job retry working.

Does <camunda:failedJobRetryTimeCycle>R5/PT5M</camunda:failedJobRetryTimeCycle>

works in in Camunda CMMN Or do we have some other xml attribute for it.

I have tried adding above tag in my CMMN xml , But it is retrying only 3 time(the default retry)

<code>
@Deployment(resources = {"org/camunda/bpm/engine/test/cmmn/humantask/RetryTest.cmmn"})
public void testHumanTaskFollowUpDateExtension() throws Exception {
String caseInstanceId = caseService.createCaseInstanceByKey("oneTaskCase").getId();

String humanTaskId = caseService.createCaseExecutionQuery()
.activityId("PI_HumanTask_1")
.singleResult()
.getId();
caseService.manuallyStartCaseExecution(humanTaskId);

executeAvailableJobs();


Incident incident = runtimeService.createIncidentQuery().processInstanceId(caseInstanceId).singleResult();

assertNotNull(incident);

</code>

The above code is not working. Please help me on this issue, Or suggest me the workaround

Roman Smirnov

unread,
Aug 12, 2015, 6:31:23 AM8/12/15
to camunda BPM users, nataraj.b...@wipro.com, nataraj.b...@gmail.com
Hi,

The implementation of CMMN inside the engine does not support asynchronous continuation. The property "failedJobRetryTimeCycle" will only be used in context of Bpmn.

What do you want to achieve?

Cheers,
Roman

nataraj bevinamarad

unread,
Aug 12, 2015, 6:48:54 AM8/12/15
to Roman Smirnov, camunda BPM users, nataraj.b...@wipro.com

Hi,
I am trying to  implement same retry behaviour as we have in BPMN.

If any of my plan item fail, I want to retry and if not successful in  retry I would like to create a incident as we do in BPMN

Does camunda provide any way of retry for CMMN ?

Roman Smirnov

unread,
Aug 12, 2015, 7:02:32 AM8/12/15
to camunda BPM users, roman....@camunda.com, nataraj.b...@wipro.com, nataraj.b...@gmail.com
No the retry mechanism is not supported for CMMN.

What does it mean:
If any of my plan item fail, I want to retry and if not successful in  retry

How can a plan item fail? In your concrete example above you have a human task which has been started manually, why should the the human task fail?

Cheers,
Roman

nataraj.b...@gmail.com

unread,
Aug 12, 2015, 7:10:28 AM8/12/15
to camunda BPM users, roman....@camunda.com, nataraj.b...@wipro.com, nataraj.b...@gmail.com
Hi Roman,

Sorry about the concrete example, Suppose I have a process task Which is trying to read a file. And the file is not present, In that case My Process task would throw FileNotFound Exception. How to handle such scenarios using Camunda CMMN. Is there a way to mark my Process task as failed.

Roman Smirnov

unread,
Aug 12, 2015, 7:14:48 AM8/12/15
to camunda BPM users, roman....@camunda.com, nataraj.b...@wipro.com, nataraj.b...@gmail.com
Then set the attribute "asyncBefore" on the start event of the process, so that the process will be executed asynchronous and if it fails an incident will be created for the process instance. On the start event you also can use the "failedJobRetryTimeCycle".

For further details see [1]

Cheers,
Roman

Reply all
Reply to author
Forward
0 new messages