use of org.camunda.bpm.qa.upgrade.ExtendsScenario in project camunda-bpm-platform by camunda.
the class NestedNonInterruptingEventSubprocessScenario method completeSubprocessTask.
@DescribesScenario("init.innerTask")
@ExtendsScenario("init")
@Times(5)
public static ScenarioSetup completeSubprocessTask() {
return new ScenarioSetup() {
public void execute(ProcessEngine engine, String scenarioName) {
Task task = engine.getTaskService().createTaskQuery().processInstanceBusinessKey(scenarioName).taskDefinitionKey("innerTask").singleResult();
engine.getTaskService().complete(task.getId());
}
};
}
use of org.camunda.bpm.qa.upgrade.ExtendsScenario in project camunda-bpm-platform by camunda.
the class NonInterruptingEventSubprocessScenario method completeSubprocessTask.
@DescribesScenario("init.outerTask")
@ExtendsScenario("init")
@Times(3)
public static ScenarioSetup completeSubprocessTask() {
return new ScenarioSetup() {
public void execute(ProcessEngine engine, String scenarioName) {
Task task = engine.getTaskService().createTaskQuery().processInstanceBusinessKey(scenarioName).taskDefinitionKey("outerTask").singleResult();
engine.getTaskService().complete(task.getId());
}
};
}
use of org.camunda.bpm.qa.upgrade.ExtendsScenario in project camunda-bpm-platform by camunda.
the class SequentialMultiInstanceCompensationScenario method singleActivityHandlerThrowCompensate.
@DescribesScenario("singleActivityHandler.beforeCompensate.throwCompensate")
@ExtendsScenario("singleActivityHandler.beforeCompensate")
@Times(3)
public static ScenarioSetup singleActivityHandlerThrowCompensate() {
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.ExtendsScenario 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.ExtendsScenario in project camunda-bpm-platform by camunda.
the class TransactionCancelCompensationScenario method instantiateAndTriggerCompensation.
@DescribesScenario("init.triggerCompensation")
@ExtendsScenario("init")
@Times(3)
public static ScenarioSetup instantiateAndTriggerCompensation() {
return new ScenarioSetup() {
public void execute(ProcessEngine engine, String scenarioName) {
// throw compensation by executing the cancel end event;
// the compensation handler for userTask should then be active
Task beforeCancelTask = engine.getTaskService().createTaskQuery().processInstanceBusinessKey(scenarioName).singleResult();
engine.getTaskService().complete(beforeCancelTask.getId());
}
};
}
Aggregations