Package org.camunda.bpm.container

Examples of org.camunda.bpm.container.RuntimeContainerDelegate


    ProcessApplicationService processApplicationService = mock(ProcessApplicationService.class);
    ProcessApplicationInfo appMock = MockProvider.createMockProcessApplicationInfo();
    when(processApplicationService.getProcessApplicationInfo(MockProvider.EXAMPLE_PROCESS_APPLICATION_NAME)).thenReturn(appMock);

    RuntimeContainerDelegate delegate = mock(RuntimeContainerDelegate.class);
    when(delegate.getProcessApplicationService()).thenReturn(processApplicationService);
    RuntimeContainerDelegate.INSTANCE.set(delegate);
  }
View Full Code Here


*/
public class RuntimeContainerJobExecutor extends JobExecutor {
 
  protected void startExecutingJobs() {
   
    final RuntimeContainerDelegate runtimeContainerDelegate = getRuntimeContainerDelegate();
   
    // schedule job acquisition
    if(!runtimeContainerDelegate.getExecutorService().schedule(acquireJobsRunnable, true)) {
      throw new ProcessEngineException("Could not schedule AcquireJobsRunnable for execution.");
    }
  
  }
View Full Code Here

    // nothing to do
  }

  public void executeJobs(List<String> jobIds, ProcessEngineImpl processEngine) {
   
    final RuntimeContainerDelegate runtimeContainerDelegate = getRuntimeContainerDelegate();
    final ExecutorService executorService = runtimeContainerDelegate.getExecutorService();
   
    Runnable executeJobsRunnable = executorService.getExecuteJobsRunnable(jobIds, processEngine);
   
    // delegate job execution to runtime container
    if(!executorService.schedule(executeJobsRunnable, false)) {
View Full Code Here

public class ManagedProcessEngineFactoryBean extends ProcessEngineFactoryBean {
 
  public ProcessEngine getObject() throws Exception {
    ProcessEngine processEngine = super.getObject();
   
    RuntimeContainerDelegate runtimeContainerDelegate = getRuntimeContainerDelegate();
    runtimeContainerDelegate.registerProcessEngine(processEngine);
   
    return processEngine;
  }
View Full Code Here

    // replace the runtime container delegate & process application service with a mock
    ProcessApplicationService processApplicationService = mock(ProcessApplicationService.class);
    ProcessApplicationInfo appMock = MockProvider.createMockProcessApplicationInfo();
    when(processApplicationService.getProcessApplicationInfo(MockProvider.EXAMPLE_PROCESS_APPLICATION_NAME)).thenReturn(appMock);

    RuntimeContainerDelegate delegate = mock(RuntimeContainerDelegate.class);
    when(delegate.getProcessApplicationService()).thenReturn(processApplicationService);
    RuntimeContainerDelegate.INSTANCE.set(delegate);

    Response response = given().queryParam("name", queryName)
      .header("accept", Hal.APPLICATION_HAL_JSON)
      .then().expect().statusCode(Status.OK.getStatusCode())
View Full Code Here

    ProcessApplicationService processApplicationService = mock(ProcessApplicationService.class);
    ProcessApplicationInfo appMock = MockProvider.createMockProcessApplicationInfo();
    when(processApplicationService.getProcessApplicationInfo(MockProvider.EXAMPLE_PROCESS_APPLICATION_NAME)).thenReturn(appMock);

    RuntimeContainerDelegate delegate = mock(RuntimeContainerDelegate.class);
    when(delegate.getProcessApplicationService()).thenReturn(processApplicationService);
    RuntimeContainerDelegate.INSTANCE.set(delegate);
  }
View Full Code Here

TOP

Related Classes of org.camunda.bpm.container.RuntimeContainerDelegate

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.