use of org.camunda.bpm.qa.upgrade.DescribesScenario in project camunda-bpm-platform by camunda.
the class NestedNonInterruptingEventSubprocessNestedSubprocessScenario method initNestedSubProcessEnterSubprocess.
@DescribesScenario("init.innerSubProcess")
@ExtendsScenario("init")
@Times(6)
public static ScenarioSetup initNestedSubProcessEnterSubprocess() {
return new ScenarioSetup() {
public void execute(ProcessEngine engine, String scenarioName) {
Task eventSubProcessTask = engine.getTaskService().createTaskQuery().processInstanceBusinessKey(scenarioName).taskDefinitionKey("eventSubProcessTask").singleResult();
engine.getTaskService().complete(eventSubProcessTask.getId());
}
};
}
use of org.camunda.bpm.qa.upgrade.DescribesScenario in project camunda-bpm-platform by camunda.
the class ParallelNestedNonInterruptingEventSubprocessScenario method completeSubprocessTask.
@DescribesScenario("init.innerTask")
@ExtendsScenario("init")
@Times(6)
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.DescribesScenario in project camunda-bpm-platform by camunda.
the class NestedMultiInstanceCompensationScenario method instantitiateThrowCompensateInSubprocess.
@DescribesScenario("init.throwInner")
@Times(3)
public static ScenarioSetup instantitiateThrowCompensateInSubprocess() {
return new ScenarioSetup() {
public void execute(ProcessEngine engine, String scenarioName) {
engine.getRuntimeService().startProcessInstanceByKey("NestedMultiInstanceCompensationThrowInnerScenario", scenarioName);
// throw compensation within the mi subprocess
List<Task> subProcessTasks = engine.getTaskService().createTaskQuery().processInstanceBusinessKey(scenarioName).list();
for (Task subProcessTask : subProcessTasks) {
engine.getTaskService().complete(subProcessTask.getId());
}
}
};
}
use of org.camunda.bpm.qa.upgrade.DescribesScenario 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.DescribesScenario 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