Package org.activiti.engine.impl.persistence.entity

Examples of org.activiti.engine.impl.persistence.entity.MessageEntity


    timerThreeFireTime = new Date(t3.getTime() + ONE_HOUR);
   
    // Create one message
    messageId = commandExecutor.execute(new Command<String>() {
      public String execute(CommandContext commandContext) {
        MessageEntity message = new MessageEntity();
        commandContext.getJobEntityManager().send(message);
        return message.getId();
      }
    });
  }
View Full Code Here


    CommandExecutor commandExecutor = processEngineConfiguration.getCommandExecutor();
   
    String jobId = commandExecutor.execute(new Command<String>() {

      public String execute(CommandContext commandContext) {
        MessageEntity message = createTweetMessage("i'm coding a test");
        commandContext.getJobEntityManager().send(message);
        return message.getId();
      }
    });

    Job job  = managementService.createJobQuery().singleResult();
    assertNotNull(job);
View Full Code Here

  public void tearDown() throws Exception {
    processEngineConfiguration.getJobHandlers().remove(tweetHandler.getType());
  }

  protected MessageEntity createTweetMessage(String msg) {
    MessageEntity message = new MessageEntity();
    message.setJobHandlerType("tweet");
    message.setJobHandlerConfiguration(msg);
    return message;
  }
View Full Code Here

  public void testJobCommandsWith2Exceptions() {
    commandExecutor.execute(new Command<String>() {

      public String execute(CommandContext commandContext) {
        MessageEntity message = createTweetExceptionMessage();
        commandContext.getJobEntityManager().send(message);
        return message.getId();
      }
    });

    Job job = managementService.createJobQuery().singleResult();
    assertEquals(3, job.getRetries());
View Full Code Here

    tweetExceptionHandler.setExceptionsRemaining(3);

    commandExecutor.execute(new Command<String>() {

      public String execute(CommandContext commandContext) {
        MessageEntity message = createTweetExceptionMessage();
        commandContext.getJobEntityManager().send(message);
        return message.getId();
      }
    });

    Job job = managementService.createJobQuery().singleResult();
    assertEquals(3, job.getRetries());
View Full Code Here

   
    managementService.deleteJob(job.getId());
  }

  protected MessageEntity createTweetExceptionMessage() {
    MessageEntity message = new MessageEntity();
    message.setJobHandlerType("tweet-exception");
    return message;
  }
View Full Code Here

    timerThreeFireTime = new Date(t3.getTime() + ONE_HOUR);
   
    // Create one message
    messageId = commandExecutor.execute(new Command<String>() {
      public String execute(CommandContext commandContext) {
        MessageEntity message = new MessageEntity();
        commandContext.getJobManager().send(message);
        return message.getId();
      }
    });
  }
View Full Code Here

  public void tearDown() throws Exception {
    processEngineConfiguration.getJobHandlers().remove(tweetHandler.getType());
  }

  protected MessageEntity createTweetMessage(String msg) {
    MessageEntity message = new MessageEntity();
    message.setJobHandlerType("tweet");
    message.setJobHandlerConfiguration(msg);
    return message;
  }
View Full Code Here

  public void testJobCommandsWith2Exceptions() {
    commandExecutor.execute(new Command<String>() {

      public String execute(CommandContext commandContext) {
        MessageEntity message = createTweetExceptionMessage();
        commandContext.getJobManager().send(message);
        return message.getId();
      }
    });

    waitForJobExecutorToProcessAllJobs(15000L, 50L);
  }
View Full Code Here

    tweetExceptionHandler.setExceptionsRemaining(3);

    String jobId = commandExecutor.execute(new Command<String>() {

      public String execute(CommandContext commandContext) {
        MessageEntity message = createTweetExceptionMessage();
        commandContext.getJobManager().send(message);
        return message.getId();
      }
    });

    waitForJobExecutorToProcessAllJobs(15000L, 50L);
View Full Code Here

TOP

Related Classes of org.activiti.engine.impl.persistence.entity.MessageEntity

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.