use of org.camunda.bpm.engine.RuntimeService in project camunda-bpm-platform by camunda.
the class MyDelegationService method logInstancesCount.
protected void logInstancesCount(ProcessEngineServices services) {
RuntimeService runtimeService = services.getRuntimeService();
logInstancesCount(runtimeService);
}
use of org.camunda.bpm.engine.RuntimeService in project camunda-bpm-platform by camunda.
the class MyStartFormHandler method submitFormVariables.
public void submitFormVariables(VariableMap properties, VariableScope variableScope) {
ProcessEngineConfigurationImpl processEngineConfiguration = Context.getProcessEngineConfiguration();
IdentityService identityService = processEngineConfiguration.getIdentityService();
RuntimeService runtimeService = processEngineConfiguration.getRuntimeService();
logAuthentication(identityService);
logInstancesCount(runtimeService);
}
use of org.camunda.bpm.engine.RuntimeService in project camunda-bpm-platform by camunda.
the class DeployProcessWithoutIsExecutableAttributeTest method testDeployProcessWithoutIsExecutableAttribute.
@Test
public void testDeployProcessWithoutIsExecutableAttribute() {
RuntimeService runtimeService = engineRule.getRuntimeService();
ProcessInstance procInstance = runtimeService.startProcessInstanceByKey("processWithoutIsExecutableAttribute");
Assert.assertNotNull(procInstance);
}
use of org.camunda.bpm.engine.RuntimeService in project camunda-bpm-platform by camunda.
the class ExecuteRuntimeServiceOperationDelegate method execute.
public void execute(DelegateExecution execution) throws Exception {
ProcessEngineServices services = execution.getProcessEngineServices();
RuntimeService runtimeService = services.getRuntimeService();
runtimeService.setVariable(execution.getId(), "serviceTaskCalled", true);
}
use of org.camunda.bpm.engine.RuntimeService in project camunda-bpm-platform by camunda.
the class VariableInstanceQueryForOracleTest method testQueryWhen1InstanceActive.
@Test
public void testQueryWhen1InstanceActive() {
// given
Assume.assumeTrue(engineRule.getProcessEngineConfiguration().getDatabaseType().equals("oracle"));
RuntimeService runtimeService = engineRule.getRuntimeService();
testRule.deploy(ProcessModels.TWO_TASKS_PROCESS);
// when
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("Process", Variables.createVariables().putValue("foo", "bar"));
String activityInstanceId = runtimeService.getActivityInstance(processInstance.getId()).getId();
// then
List<VariableInstance> variables = engineRule.getRuntimeService().createVariableInstanceQuery().activityInstanceIdIn(activityInstanceId).list();
assertEquals(1, variables.size());
}
Aggregations