Exemplo n.º 1
0
        public override void executeJobs(IList <string> jobIds, ProcessEngineImpl processEngine)
        {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final org.camunda.bpm.container.RuntimeContainerDelegate runtimeContainerDelegate = getRuntimeContainerDelegate();
            RuntimeContainerDelegate runtimeContainerDelegate = RuntimeContainerDelegate;
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final org.camunda.bpm.container.ExecutorService executorService = runtimeContainerDelegate.getExecutorService();
            ExecutorService executorService = runtimeContainerDelegate.ExecutorService;

            ThreadStart executeJobsRunnable = getExecuteJobsRunnable(jobIds, processEngine);

            // delegate job execution to runtime container
            if (!executorService.schedule(executeJobsRunnable, false))
            {
                logRejectedExecution(processEngine, jobIds.Count);
                rejectedJobsHandler.jobsRejected(jobIds, processEngine, this);
            }
        }
Exemplo n.º 2
0
        // delegate methods /////////////////////////////////////////

        public virtual bool schedule(ThreadStart runnable, bool isLongRunning)
        {
            return(@delegate.schedule(runnable, isLongRunning));
        }