Search in sources :

Example 1 with ExecutorService

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

the class RuntimeContainerJobExecutor method getExecuteJobsRunnable.

@Override
public Runnable getExecuteJobsRunnable(List<String> jobIds, ProcessEngineImpl processEngine) {
    final RuntimeContainerDelegate runtimeContainerDelegate = getRuntimeContainerDelegate();
    final ExecutorService executorService = runtimeContainerDelegate.getExecutorService();
    return executorService.getExecuteJobsRunnable(jobIds, processEngine);
}
Also used : ExecutorService(org.camunda.bpm.container.ExecutorService) RuntimeContainerDelegate(org.camunda.bpm.container.RuntimeContainerDelegate)

Example 2 with ExecutorService

use of org.camunda.bpm.container.ExecutorService 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

ExecutorService (org.camunda.bpm.container.ExecutorService)2 RuntimeContainerDelegate (org.camunda.bpm.container.RuntimeContainerDelegate)2