Search in sources :

Example 6 with DelegateExecutionAsserter

use of org.camunda.bpm.engine.test.api.delegate.AssertingJavaDelegate.DelegateExecutionAsserter in project camunda-bpm-platform by camunda.

the class DelegateExecutionHierarchyTest method testConcurrentServiceTasks.

public void testConcurrentServiceTasks() {
    deployment(Bpmn.createExecutableProcess("testProcess").startEvent().parallelGateway("fork").serviceTask().camundaClass(AssertingJavaDelegate.class.getName()).parallelGateway("join").endEvent().moveToNode("fork").serviceTask().camundaClass(AssertingJavaDelegate.class.getName()).connectTo("join").done());
    AssertingJavaDelegate.addAsserts(new DelegateExecutionAsserter() {

        public void doAssert(DelegateExecution execution) {
            assertFalse(execution.equals(execution.getProcessInstance()));
            assertNull(execution.getSuperExecution());
        }
    });
    runtimeService.startProcessInstanceByKey("testProcess");
}
Also used : DelegateExecution(org.camunda.bpm.engine.delegate.DelegateExecution) DelegateExecutionAsserter(org.camunda.bpm.engine.test.api.delegate.AssertingJavaDelegate.DelegateExecutionAsserter)

Aggregations

DelegateExecution (org.camunda.bpm.engine.delegate.DelegateExecution)6 DelegateExecutionAsserter (org.camunda.bpm.engine.test.api.delegate.AssertingJavaDelegate.DelegateExecutionAsserter)6 IdentityService (org.camunda.bpm.engine.IdentityService)2 Authentication (org.camunda.bpm.engine.impl.identity.Authentication)2