use of org.camunda.bpm.qa.upgrade.Times in project camunda-bpm-platform by camunda.
the class ProcessWithCallActivityScenario method startProcessAndCompleteFirstTask.
@DescribesScenario("init.complete.one")
@Times(1)
public static ScenarioSetup startProcessAndCompleteFirstTask() {
return new ScenarioSetup() {
public void execute(ProcessEngine engine, String scenarioName) {
ProcessInstance procInst = engine.getRuntimeService().startProcessInstanceByKey(PROCESS_DEF_KEY, scenarioName);
Task task = engine.getTaskService().createTaskQuery().processInstanceId(procInst.getId()).singleResult();
engine.getTaskService().complete(task.getId());
}
};
}
use of org.camunda.bpm.qa.upgrade.Times in project camunda-bpm-platform by camunda.
the class ProcessWithEventSubProcessScenario method startProcessWithThrowedBpmnError.
@DescribesScenario("init.error")
@Times(1)
public static ScenarioSetup startProcessWithThrowedBpmnError() {
return new ScenarioSetup() {
@Override
public void execute(ProcessEngine engine, String scenarioName) {
ProcessInstance procInstance = engine.getRuntimeService().startProcessInstanceByKey(PROCESS_DEF_KEY, scenarioName);
Job job = engine.getManagementService().createJobQuery().processInstanceId(procInstance.getId()).singleResult();
engine.getManagementService().executeJob(job.getId());
}
};
}
use of org.camunda.bpm.qa.upgrade.Times in project camunda-bpm-platform by camunda.
the class ProcessWithParallelGatewayAndServiceTaskScenario method startProcessAsyncServiceTaskCompleteUserTask.
@DescribesScenario("init.async.complete")
@Times(1)
public static ScenarioSetup startProcessAsyncServiceTaskCompleteUserTask() {
return new ScenarioSetup() {
@Override
public void execute(ProcessEngine engine, String scenarioName) {
ProcessInstance procInst = engine.getRuntimeService().startProcessInstanceByKey(PROCESS_DEF_KEY_2, scenarioName);
Task task = engine.getTaskService().createTaskQuery().processInstanceId(procInst.getId()).singleResult();
engine.getTaskService().complete(task.getId());
}
};
}
use of org.camunda.bpm.qa.upgrade.Times 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.Times 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());
}
};
}
Aggregations