Search in sources :

Example 16 with ExtendsScenario

use of org.camunda.bpm.qa.upgrade.ExtendsScenario 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());
        }
    };
}
Also used : Task(org.camunda.bpm.engine.task.Task) ScenarioSetup(org.camunda.bpm.qa.upgrade.ScenarioSetup) ProcessEngine(org.camunda.bpm.engine.ProcessEngine) DescribesScenario(org.camunda.bpm.qa.upgrade.DescribesScenario) Times(org.camunda.bpm.qa.upgrade.Times) ExtendsScenario(org.camunda.bpm.qa.upgrade.ExtendsScenario)

Example 17 with ExtendsScenario

use of org.camunda.bpm.qa.upgrade.ExtendsScenario 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());
        }
    };
}
Also used : Task(org.camunda.bpm.engine.task.Task) ScenarioSetup(org.camunda.bpm.qa.upgrade.ScenarioSetup) ProcessEngine(org.camunda.bpm.engine.ProcessEngine) DescribesScenario(org.camunda.bpm.qa.upgrade.DescribesScenario) Times(org.camunda.bpm.qa.upgrade.Times) ExtendsScenario(org.camunda.bpm.qa.upgrade.ExtendsScenario)

Example 18 with ExtendsScenario

use of org.camunda.bpm.qa.upgrade.ExtendsScenario 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());
        }
    };
}
Also used : Task(org.camunda.bpm.engine.task.Task) ScenarioSetup(org.camunda.bpm.qa.upgrade.ScenarioSetup) ProcessEngine(org.camunda.bpm.engine.ProcessEngine) DescribesScenario(org.camunda.bpm.qa.upgrade.DescribesScenario) Times(org.camunda.bpm.qa.upgrade.Times) ExtendsScenario(org.camunda.bpm.qa.upgrade.ExtendsScenario)

Aggregations

ProcessEngine (org.camunda.bpm.engine.ProcessEngine)18 Task (org.camunda.bpm.engine.task.Task)18 DescribesScenario (org.camunda.bpm.qa.upgrade.DescribesScenario)18 ExtendsScenario (org.camunda.bpm.qa.upgrade.ExtendsScenario)18 ScenarioSetup (org.camunda.bpm.qa.upgrade.ScenarioSetup)18 Times (org.camunda.bpm.qa.upgrade.Times)18