Package org.camunda.bpm.engine.impl

Examples of org.camunda.bpm.engine.impl.RuntimeServiceImpl


  protected String getResourceTypeName() {
    return resourceTypeName;
  }

  protected void updateVariableEntities(VariableMap modifications, List<String> deletions) {
    RuntimeServiceImpl runtimeService = (RuntimeServiceImpl) engine.getRuntimeService();
    runtimeService.updateVariables(resourceId, modifications, deletions);
  }
View Full Code Here


  protected String getResourceTypeName() {
    return "execution";
  }

  protected void updateVariableEntities(VariableMap modifications, List<String> deletions) {
    RuntimeServiceImpl runtimeService = (RuntimeServiceImpl) engine.getRuntimeService();
    runtimeService.updateVariablesLocal(resourceId, modifications, deletions);
  }
View Full Code Here

    assertTextPresent("was updated by another transaction concurrently", threadTwo.exception.getMessage());
  }
 
  @Deployment(resources={"org/camunda/bpm/engine/test/concurrency/CompetingSignalsTest.testCompetingSignals.bpmn20.xml"})
  public void testCompetingSignalsWithRetry() throws Exception {
    RuntimeServiceImpl runtimeServiceImpl = (RuntimeServiceImpl)runtimeService;       
    CommandExecutor before = runtimeServiceImpl.getCommandExecutor();
    try {
      CommandInterceptor retryInterceptor = new RetryInterceptor();
      retryInterceptor.setNext(before);
      runtimeServiceImpl.setCommandExecutor(retryInterceptor);
     
      ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("CompetingSignalsProcess");
      String processInstanceId = processInstance.getId();
 
      log.fine("test thread starts thread one");
      SignalThread threadOne = new SignalThread(processInstanceId);
      threadOne.startAndWaitUntilControlIsReturned();
     
      log.fine("test thread continues to start thread two");
      SignalThread threadTwo = new SignalThread(processInstanceId);
      threadTwo.startAndWaitUntilControlIsReturned();
 
      log.fine("test thread notifies thread 1");
      threadOne.proceedAndWaitTillDone();
      assertNull(threadOne.exception);
 
      log.fine("test thread notifies thread 2");
      threadTwo.proceedAndWaitTillDone();
      assertNull(threadTwo.exception);
    } finally {
      // reset the command executor
      runtimeServiceImpl.setCommandExecutor(before);
    }
   
  }
View Full Code Here

TOP

Related Classes of org.camunda.bpm.engine.impl.RuntimeServiceImpl

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.