use of org.camunda.bpm.qa.upgrade.ScenarioSetup 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.ScenarioSetup 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.ScenarioSetup 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());
}
};
}
use of org.camunda.bpm.qa.upgrade.ScenarioSetup 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());
}
};
}
use of org.camunda.bpm.qa.upgrade.ScenarioSetup in project camunda-bpm-platform by camunda.
the class TransactionCancelCompensationScenario method instantiate.
@DescribesScenario("init")
@Times(3)
public static ScenarioSetup instantiate() {
return new ScenarioSetup() {
public void execute(ProcessEngine engine, String scenarioName) {
engine.getRuntimeService().startProcessInstanceByKey("TransactionCancelCompensationScenario", scenarioName);
// create the compensation event subscription and wait before throwing cancel end event
Task userTask = engine.getTaskService().createTaskQuery().processInstanceBusinessKey(scenarioName).singleResult();
engine.getTaskService().complete(userTask.getId());
}
};
}
Aggregations