Hi Thomas.
A test case (+ bpmn 2 xml) would indeed help to understand your case. Now I can only guess – let me try ;-)
If a process instance runs through till the end it is removed from the runtime database and only exists in the history database afterwards (I hope you don’t mind if I quote old camunda fox docs – which are not yet migrated: https://app.camunda.com/confluence/display/foxUserGuide/History#History-Overview). So you have to query the process instance from the history to check if it is ended (or check if a query on the runtime returns no result).
A typical testcase would do something like this: https://github.com/camunda/camunda-bpm-platform/blob/master/examples/invoice/src/test/java/org/camunda/bpm/example/invoice/InvoiceTestCase.java
And this checks for completion at the end via:
public static void assertProcessEnded(ProcessEngine processEngine, String processInstanceId) {
ProcessInstance processInstance = processEngine
.getRuntimeService()
.createProcessInstanceQuery()
.processInstanceId(processInstanceId)
.singleResult();
if (processInstance!=null) {
throw new AssertionFailedError("expected finished process instance '"+processInstanceId+"' but it was still in the db");
}
}
Hope that helps
Cheers
Bernd
--
You received this message because you are subscribed to the Google Groups "camunda BPM users & process application developers" 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.