use of org.camunda.bpm.qa.upgrade.ScenarioSetup in project camunda-bpm-platform by camunda.
the class SequentialMultiInstanceCompensationScenario method defaultHandlerThrowCompensate.
@DescribesScenario("defaultHandler.beforeCompensate.throwCompensate")
@ExtendsScenario("defaultHandler.beforeCompensate")
@Times(3)
public static ScenarioSetup defaultHandlerThrowCompensate() {
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.ScenarioSetup in project camunda-bpm-platform by camunda.
the class SequentialMultiInstanceCompensationScenario method defaultHandlerMultiInstancePartial.
@DescribesScenario("defaultHandler.multiInstancePartial")
@Times(3)
public static ScenarioSetup defaultHandlerMultiInstancePartial() {
return new ScenarioSetup() {
public void execute(ProcessEngine engine, String scenarioName) {
engine.getRuntimeService().startProcessInstanceByKey("SequentialMultiInstanceCompensationDefaultHandlerScenario", 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.ScenarioSetup in project camunda-bpm-platform by camunda.
the class SequentialMultiInstanceCompensationScenario method singleActivityHandlerBeforeCompensate.
@DescribesScenario("singleActivityHandler.beforeCompensate")
@Times(3)
public static ScenarioSetup singleActivityHandlerBeforeCompensate() {
return new ScenarioSetup() {
public void execute(ProcessEngine engine, String scenarioName) {
engine.getRuntimeService().startProcessInstanceByKey("SequentialMultiInstanceCompensationSingleActivityHandlerScenario", scenarioName);
// complete all 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());
miTask = engine.getTaskService().createTaskQuery().processInstanceBusinessKey(scenarioName).singleResult();
engine.getTaskService().complete(miTask.getId());
}
};
}
use of org.camunda.bpm.qa.upgrade.ScenarioSetup in project camunda-bpm-platform by camunda.
the class SequentialMultiInstanceCompensationScenario method singleActivityHandlerMultiInstancePartial.
@DescribesScenario("singleActivityHandler.multiInstancePartial")
@Times(3)
public static ScenarioSetup singleActivityHandlerMultiInstancePartial() {
return new ScenarioSetup() {
public void execute(ProcessEngine engine, String scenarioName) {
engine.getRuntimeService().startProcessInstanceByKey("SequentialMultiInstanceCompensationSingleActivityHandlerScenario", 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.ScenarioSetup in project camunda-bpm-platform by camunda.
the class SequentialMultiInstanceCompensationScenario method defaultHandlerBeforeCompensate.
@DescribesScenario("defaultHandler.beforeCompensate")
@Times(3)
public static ScenarioSetup defaultHandlerBeforeCompensate() {
return new ScenarioSetup() {
public void execute(ProcessEngine engine, String scenarioName) {
engine.getRuntimeService().startProcessInstanceByKey("SequentialMultiInstanceCompensationDefaultHandlerScenario", scenarioName);
// complete all 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());
miTask = engine.getTaskService().createTaskQuery().processInstanceBusinessKey(scenarioName).singleResult();
engine.getTaskService().complete(miTask.getId());
}
};
}
Aggregations