Search in sources :

Example 6 with RuntimeContainerDelegate

use of org.camunda.bpm.container.RuntimeContainerDelegate in project camunda-bpm-platform by camunda.

the class ManagedProcessEngineFactoryBean method getObject.

public ProcessEngine getObject() throws Exception {
    ProcessEngine processEngine = super.getObject();
    RuntimeContainerDelegate runtimeContainerDelegate = getRuntimeContainerDelegate();
    runtimeContainerDelegate.registerProcessEngine(processEngine);
    return processEngine;
}
Also used : RuntimeContainerDelegate(org.camunda.bpm.container.RuntimeContainerDelegate) ProcessEngine(org.camunda.bpm.engine.ProcessEngine)

Example 7 with RuntimeContainerDelegate

use of org.camunda.bpm.container.RuntimeContainerDelegate in project camunda-bpm-platform by camunda.

the class RuntimeContainerJobExecutor method executeJobs.

public void executeJobs(List<String> jobIds, ProcessEngineImpl processEngine) {
    final RuntimeContainerDelegate runtimeContainerDelegate = getRuntimeContainerDelegate();
    final ExecutorService executorService = runtimeContainerDelegate.getExecutorService();
    Runnable executeJobsRunnable = getExecuteJobsRunnable(jobIds, processEngine);
    // delegate job execution to runtime container
    if (!executorService.schedule(executeJobsRunnable, false)) {
        logRejectedExecution(processEngine, jobIds.size());
        rejectedJobsHandler.jobsRejected(jobIds, processEngine, this);
    }
}
Also used : ExecutorService(org.camunda.bpm.container.ExecutorService) RuntimeContainerDelegate(org.camunda.bpm.container.RuntimeContainerDelegate)

Aggregations

RuntimeContainerDelegate (org.camunda.bpm.container.RuntimeContainerDelegate)7 ProcessApplicationService (org.camunda.bpm.ProcessApplicationService)3 ProcessApplicationInfo (org.camunda.bpm.application.ProcessApplicationInfo)3 ProcessDefinition (org.camunda.bpm.engine.repository.ProcessDefinition)3 ExecutorService (org.camunda.bpm.container.ExecutorService)2 Before (org.junit.Before)2 Matchers.anyString (org.mockito.Matchers.anyString)2 Response (com.jayway.restassured.response.Response)1 ByteArrayInputStream (java.io.ByteArrayInputStream)1 InputStream (java.io.InputStream)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1 ProcessApplicationReference (org.camunda.bpm.application.ProcessApplicationReference)1 FormService (org.camunda.bpm.engine.FormService)1 HistoryService (org.camunda.bpm.engine.HistoryService)1 ManagementService (org.camunda.bpm.engine.ManagementService)1 ProcessEngine (org.camunda.bpm.engine.ProcessEngine)1 RepositoryService (org.camunda.bpm.engine.RepositoryService)1 TaskService (org.camunda.bpm.engine.TaskService)1