Package org.activiti.engine.impl

Examples of org.activiti.engine.impl.EventSubscriptionQueryImpl


      }
    }   
  }
 
  private EventSubscriptionQueryImpl createEventSubscriptionQuery() {
    return new EventSubscriptionQueryImpl(processEngineConfiguration.getCommandExecutorTxRequired());
  }
View Full Code Here


      .createDeployment()
      .addClasspathResource("org/activiti/engine/test/bpmn/event/message/MessageStartEventTest.testSingleMessageStartEvent.bpmn20.xml")
      .deploy()
      .getId();
   
    List<EventSubscriptionEntity> eventSubscriptions = new EventSubscriptionQueryImpl(processEngineConfiguration.getCommandExecutorTxRequired())
      .list();
   
    assertEquals(1, eventSubscriptions.size());
   
    repositoryService.deleteDeployment(deploymentId);   
View Full Code Here

      .createDeployment()
      .addClasspathResource("org/activiti/engine/test/bpmn/event/message/MessageStartEventTest.testSingleMessageStartEvent.bpmn20.xml")
      .deploy()
      .getId();
   
    List<EventSubscriptionEntity> eventSubscriptions = new EventSubscriptionQueryImpl(processEngineConfiguration.getCommandExecutorTxRequired()).list();
    List<ProcessDefinition> processDefinitions = repositoryService.createProcessDefinitionQuery().list();
       
    assertEquals(1, eventSubscriptions.size());
    assertEquals(1, processDefinitions.size());
   
    String newDeploymentId  = repositoryService
      .createDeployment()
      .addClasspathResource("org/activiti/engine/test/bpmn/event/message/MessageStartEventTest.testSingleMessageStartEvent.bpmn20.xml")
      .deploy()
      .getId();
   
    List<EventSubscriptionEntity> newEventSubscriptions = new EventSubscriptionQueryImpl(processEngineConfiguration.getCommandExecutorTxRequired()).list();
    List<ProcessDefinition> newProcessDefinitions = repositoryService.createProcessDefinitionQuery().list();
       
    assertEquals(1, newEventSubscriptions.size());
    assertEquals(2, newProcessDefinitions.size());
    for (ProcessDefinition processDefinition : newProcessDefinitions) {
View Full Code Here

    // done!
    assertEquals(0, runtimeService.createExecutionQuery().count());
  }

  private EventSubscriptionQueryImpl createEventSubscriptionQuery() {
    return new EventSubscriptionQueryImpl(processEngineConfiguration.getCommandExecutorTxRequired());
  }
View Full Code Here

      }
    }   
  }
 
  private EventSubscriptionQueryImpl createEventSubscriptionQuery() {
    return new EventSubscriptionQueryImpl(processEngineConfiguration.getCommandExecutorTxRequired());
  }
View Full Code Here

  public void testCatchSignalAndMessageAndTimer() {
   
    runtimeService.startProcessInstanceByKey("catchSignal");
       
    assertEquals(2, createEventSubscriptionQuery().count());
    EventSubscriptionQueryImpl messageEventSubscriptionQuery = createEventSubscriptionQuery().eventType("message");
    assertEquals(1, messageEventSubscriptionQuery.count());
    assertEquals(1, createEventSubscriptionQuery().eventType("signal").count());
    assertEquals(1, runtimeService.createProcessInstanceQuery().count());
    assertEquals(1, managementService.createJobQuery().count());
   
    // we can query for an execution with has both a signal AND message subscription
    Execution execution = runtimeService.createExecutionQuery()
      .messageEventSubscriptionName("newInvoice")
      .signalEventSubscriptionName("alert")
      .singleResult();
    assertNotNull(execution);
   
    ClockUtil.setCurrentTime(new Date(ClockUtil.getCurrentTime().getTime() +10000));
    try {
    
      EventSubscriptionEntity messageEventSubscription = messageEventSubscriptionQuery.singleResult();
      runtimeService.messageEventReceived(messageEventSubscription.getEventName(), messageEventSubscription.getExecutionId());
     
      assertEquals(0, createEventSubscriptionQuery().count());   
      assertEquals(1, runtimeService.createProcessInstanceQuery().count());   
      assertEquals(0, managementService.createJobQuery().count());
View Full Code Here

    }
   
  }
 
  private EventSubscriptionQueryImpl createEventSubscriptionQuery() {
    return new EventSubscriptionQueryImpl(processEngineConfiguration.getCommandExecutorTxRequired());
  }
View Full Code Here

    cleanDb();
   
  }

  protected EventSubscriptionQueryImpl newEventSubscriptionQuery() {
    return new EventSubscriptionQueryImpl(processEngineConfiguration.getCommandExecutorTxRequired());
  }
View Full Code Here

  protected void cleanDb() {   
    processEngineConfiguration.getCommandExecutorTxRequired()
    .execute(new Command<Void>() {
      public Void execute(CommandContext commandContext) {
        final List<EventSubscriptionEntity> subscriptions = new EventSubscriptionQueryImpl(commandContext).list();
        for (EventSubscriptionEntity eventSubscriptionEntity : subscriptions) {
          eventSubscriptionEntity.delete();
        }
        return null;
      }
View Full Code Here

TOP

Related Classes of org.activiti.engine.impl.EventSubscriptionQueryImpl

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.