Search in sources :

Example 41 with RuntimeService

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);
}
Also used : RuntimeService(org.camunda.bpm.engine.RuntimeService)

Example 42 with 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);
}
Also used : IdentityService(org.camunda.bpm.engine.IdentityService) RuntimeService(org.camunda.bpm.engine.RuntimeService) ProcessEngineConfigurationImpl(org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl)

Example 43 with 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);
}
Also used : RuntimeService(org.camunda.bpm.engine.RuntimeService) ProcessInstance(org.camunda.bpm.engine.runtime.ProcessInstance) Test(org.junit.Test) ScenarioUnderTest(org.camunda.bpm.qa.upgrade.ScenarioUnderTest)

Example 44 with RuntimeService

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);
}
Also used : ProcessEngineServices(org.camunda.bpm.engine.ProcessEngineServices) RuntimeService(org.camunda.bpm.engine.RuntimeService)

Example 45 with RuntimeService

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());
}
Also used : RuntimeService(org.camunda.bpm.engine.RuntimeService) ProcessInstance(org.camunda.bpm.engine.runtime.ProcessInstance) VariableInstance(org.camunda.bpm.engine.runtime.VariableInstance) Test(org.junit.Test)

Aggregations

RuntimeService (org.camunda.bpm.engine.RuntimeService)51 Test (org.junit.Test)12 ProcessInstance (org.camunda.bpm.engine.runtime.ProcessInstance)10 InvalidRequestException (org.camunda.bpm.engine.rest.exception.InvalidRequestException)9 IdentityService (org.camunda.bpm.engine.IdentityService)6 MigrationPlan (org.camunda.bpm.engine.migration.MigrationPlan)6 TaskService (org.camunda.bpm.engine.TaskService)5 ProcessEngineConfigurationImpl (org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl)5 Batch (org.camunda.bpm.engine.batch.Batch)4 HistoricProcessInstance (org.camunda.bpm.engine.history.HistoricProcessInstance)4 VariableInstance (org.camunda.bpm.engine.runtime.VariableInstance)4 Task (org.camunda.bpm.engine.task.Task)4 ArrayList (java.util.ArrayList)3 AuthorizationException (org.camunda.bpm.engine.AuthorizationException)3 BadUserRequestException (org.camunda.bpm.engine.BadUserRequestException)3 ProcessEngineException (org.camunda.bpm.engine.ProcessEngineException)3 ProcessEngineServices (org.camunda.bpm.engine.ProcessEngineServices)3 RepositoryService (org.camunda.bpm.engine.RepositoryService)3 ProcessDefinition (org.camunda.bpm.engine.repository.ProcessDefinition)3 ProcessInstanceQuery (org.camunda.bpm.engine.runtime.ProcessInstanceQuery)3