use of org.camunda.bpm.qa.upgrade.Times in project camunda-bpm-platform by camunda.
the class SequentialMultiInstanceCompensationScenario method subProcessHandlerThrowCompensate.
@DescribesScenario("subProcessHandler.beforeCompensate.throwCompensate")
@ExtendsScenario("subProcessHandler.beforeCompensate")
@Times(3)
public static ScenarioSetup subProcessHandlerThrowCompensate() {
return new ScenarioSetup() {
public void execute(ProcessEngine engine, String scenarioName) {
Task beforeCompensateTask = engine.getTaskService().createTaskQuery().processInstanceBusinessKey(scenarioName).singleResult();
engine.getTaskService().complete(beforeCompensateTask.getId());
}
};
}
use of org.camunda.bpm.qa.upgrade.Times in project camunda-bpm-platform by camunda.
the class SequentialMultiInstanceCompensationScenario method subProcessHandlerMultiInstancePartial.
@DescribesScenario("subProcessHandler.multiInstancePartial")
@Times(3)
public static ScenarioSetup subProcessHandlerMultiInstancePartial() {
return new ScenarioSetup() {
public void execute(ProcessEngine engine, String scenarioName) {
engine.getRuntimeService().startProcessInstanceByKey("SequentialMultiInstanceCompensationSubProcessHandlerScenario", scenarioName);
// complete two out of three MI tasks
Task miTask = engine.getTaskService().createTaskQuery().processInstanceBusinessKey(scenarioName).singleResult();
engine.getTaskService().complete(miTask.getId());
miTask = engine.getTaskService().createTaskQuery().processInstanceBusinessKey(scenarioName).singleResult();
engine.getTaskService().complete(miTask.getId());
}
};
}
use of org.camunda.bpm.qa.upgrade.Times in project camunda-bpm-platform by camunda.
the class NestedNonInterruptingBoundaryEventOnInnerSubprocessScenario method initTimer.
@DescribesScenario("initTimer")
@Times(7)
public static ScenarioSetup initTimer() {
return new ScenarioSetup() {
public void execute(ProcessEngine engine, String scenarioName) {
ProcessInstance instance = engine.getRuntimeService().startProcessInstanceByKey("NestedNonInterruptingTimerBoundaryEventOnInnerSubprocessScenario", scenarioName);
Job job = engine.getManagementService().createJobQuery().processInstanceId(instance.getId()).singleResult();
engine.getManagementService().executeJob(job.getId());
}
};
}
use of org.camunda.bpm.qa.upgrade.Times in project camunda-bpm-platform by camunda.
the class NonInterruptingBoundaryEventScenario method initTimer.
@DescribesScenario("initTimer")
@Times(5)
public static ScenarioSetup initTimer() {
return new ScenarioSetup() {
public void execute(ProcessEngine engine, String scenarioName) {
ProcessInstance instance = engine.getRuntimeService().startProcessInstanceByKey("NonInterruptingTimerBoundaryEventScenario", scenarioName);
Job job = engine.getManagementService().createJobQuery().processInstanceId(instance.getId()).singleResult();
engine.getManagementService().executeJob(job.getId());
}
};
}
use of org.camunda.bpm.qa.upgrade.Times in project camunda-bpm-platform by camunda.
the class SubprocessParallelCreateCompensationScenario method instantiate.
@DescribesScenario("init")
@Times(2)
public static ScenarioSetup instantiate() {
return new ScenarioSetup() {
public void execute(ProcessEngine engine, String scenarioName) {
engine.getRuntimeService().startProcessInstanceByKey("SubprocessParallelCreateCompensationScenario", scenarioName);
// create the compensation event subscription for the first user task
// execution continues from userTask1 to afterUserTask1
Task userTask = engine.getTaskService().createTaskQuery().processInstanceBusinessKey(scenarioName).taskDefinitionKey("userTask1").singleResult();
engine.getTaskService().complete(userTask.getId());
}
};
}
Aggregations