Package org.activiti.engine.impl.interceptor

Examples of org.activiti.engine.impl.interceptor.CommandInterceptor


  @Deployment(resources={"org/activiti/engine/test/concurrency/CompetingSignalsTest.testCompetingSignals.bpmn20.xml"})
  public void testCompetingSignalsWithRetry() throws Exception {
    RuntimeServiceImpl runtimeServiceImpl = (RuntimeServiceImpl)runtimeService;       
    CommandExecutorImpl before = (CommandExecutorImpl) runtimeServiceImpl.getCommandExecutor();
    try {
      CommandInterceptor retryInterceptor = new RetryInterceptor();
      retryInterceptor.setNext(before.getFirst());

      runtimeServiceImpl.setCommandExecutor(new CommandExecutorImpl(before.getDefaultConfig(), retryInterceptor));
     
      ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("CompetingSignalsProcess");
      String processInstanceId = processInstance.getId();
View Full Code Here


  protected Collection< ? extends CommandInterceptor> getDefaultCommandInterceptors() {
    List<CommandInterceptor> interceptors = new ArrayList<CommandInterceptor>();
    interceptors.add(new LogInterceptor());
   
    CommandInterceptor transactionInterceptor = createTransactionInterceptor();
    if (transactionInterceptor != null) {
      interceptors.add(transactionInterceptor);
    }
   
    interceptors.add(new CommandContextInterceptor(commandContextFactory, this));
View Full Code Here

    return interceptors;
  }

  protected void initCommandExecutor() {
    if (commandExecutor==null) {
      CommandInterceptor first = initInterceptorChain(commandInterceptors);
      commandExecutor = new CommandExecutorImpl(getDefaultCommandConfig(), first);
    }
  }
View Full Code Here

  @Deployment(resources={"org/activiti/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();
 
View Full Code Here

TOP

Related Classes of org.activiti.engine.impl.interceptor.CommandInterceptor

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.