Search in sources :

Example 1 with StartProcessInstanceStep

use of org.camunda.bpm.qa.performance.engine.steps.StartProcessInstanceStep in project camunda-bpm-platform by camunda.

the class ServiceTaskPerformanceTest method threeServiceTasksAndAGateway.

@Test
public void threeServiceTasksAndAGateway() {
    Map<String, Object> variables = new HashMap<String, Object>();
    variables.put("approved", true);
    BpmnModelInstance process = Bpmn.createExecutableProcess("process").startEvent().serviceTask().camundaClass(NoopDelegate.class.getName()).exclusiveGateway("decision").condition("approved", "${approved}").serviceTask().camundaClass(NoopDelegate.class.getName()).moveToLastGateway().condition("not approved", "${not approved}").serviceTask().camundaClass(NoopDelegate.class.getName()).endEvent().done();
    Deployment deployment = repositoryService.createDeployment().addModelInstance("process.bpmn", process).deploy();
    performanceTest().step(new StartProcessInstanceStep(engine, "process", variables)).run();
}
Also used : StartProcessInstanceStep(org.camunda.bpm.qa.performance.engine.steps.StartProcessInstanceStep) HashMap(java.util.HashMap) NoopDelegate(org.camunda.bpm.qa.performance.engine.bpmn.delegate.NoopDelegate) Deployment(org.camunda.bpm.engine.repository.Deployment) BpmnModelInstance(org.camunda.bpm.model.bpmn.BpmnModelInstance) Test(org.junit.Test)

Aggregations

HashMap (java.util.HashMap)1 Deployment (org.camunda.bpm.engine.repository.Deployment)1 BpmnModelInstance (org.camunda.bpm.model.bpmn.BpmnModelInstance)1 NoopDelegate (org.camunda.bpm.qa.performance.engine.bpmn.delegate.NoopDelegate)1 StartProcessInstanceStep (org.camunda.bpm.qa.performance.engine.steps.StartProcessInstanceStep)1 Test (org.junit.Test)1