use of org.camunda.bpm.qa.upgrade.Times in project camunda-bpm-platform by camunda.
the class ParallelMultiInstanceCompensationScenario method subProcessHandlerBeforeCompensate.
@DescribesScenario("subProcessHandler.beforeCompensate")
@Times(3)
public static ScenarioSetup subProcessHandlerBeforeCompensate() {
return new ScenarioSetup() {
public void execute(ProcessEngine engine, String scenarioName) {
engine.getRuntimeService().startProcessInstanceByKey("ParallelMultiInstanceCompensationSubProcessHandlerScenario", scenarioName);
// complete all mi tasks
List<Task> miTasks = engine.getTaskService().createTaskQuery().processInstanceBusinessKey(scenarioName).list();
for (Task miTask : miTasks) {
engine.getTaskService().complete(miTask.getId());
}
}
};
}
use of org.camunda.bpm.qa.upgrade.Times in project camunda-bpm-platform by camunda.
the class ParallelMultiInstanceCompensationScenario 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());
}
};
}
Aggregations