Package org.jbpm.msg

Examples of org.jbpm.msg.MessageService


    if (actions != null) {
      for (Action action : actions) {
        if (action.acceptsPropagatedEvents() || (!isPropagated)) {
          if (action.isAsync()) {
            ExecuteActionJob job = createAsyncActionExecutionJob(executionContext.getToken(), action);
            MessageService messageService = (MessageService) Services.getCurrentService(Services.SERVICENAME_MESSAGE);
            messageService.send(job);
          } else {
            executeAction(action, executionContext);
          }
        }
      }
View Full Code Here


    // execute the node
    if (isAsync)
    {
      ExecuteNodeJob job = createAsyncContinuationJob(token);
      MessageService messageService = (MessageService)Services.getCurrentService(Services.SERVICENAME_MESSAGE);
      messageService.send(job);
      token.lock(job.toString());
    }
    else
    {
      execute(executionContext);
View Full Code Here

      // after the process end updates are posted to the database
      JbpmContext jbpmContext = JbpmContext.getCurrentJbpmContext();
      if (jbpmContext != null)
      {
        Services services = jbpmContext.getServices();
        MessageService messageService = services.getMessageService();
        PersistenceService persistenceService = services.getPersistenceService();
        if (messageService != null
            && persistenceService != null
            && persistenceService.getJobSession().countDeletableJobsForProcessInstance(this) > 0)
        {
          CleanUpProcessJob job = new CleanUpProcessJob(rootToken);
          job.setDueDate(new Date());
          messageService.send(job);
        }
      }
    }
  }
View Full Code Here

        if ( action.acceptsPropagatedEvents()
             || (!isPropagated)
           ) {
          if (action.isAsync()) {
            Message continuationMsg = new ExecuteActionCommand(action, executionContext.getToken());
            MessageService messageService = (MessageService) Services.getCurrentService(Services.SERVICENAME_MESSAGE);
            messageService.send(continuationMsg);
          } else {
            executeAction(action, executionContext);
          }
        }
      }
View Full Code Here

    executionContext.setTransitionSource(null);

    // execute the node
    if (isAsync) {
      Message continuationMsg = new ExecuteNodeCommand(this, executionContext.getToken());
      MessageService messageService = (MessageService) Services.getCurrentService(Services.SERVICENAME_MESSAGE);
      messageService.send(continuationMsg);
    } else {
      execute(executionContext);
    }
  }
View Full Code Here

    }
  }

  void suspendMessages() {
    // notify the message service of this resuming
    MessageService messageService = (MessageService) Services.getCurrentService(Services.SERVICENAME_MESSAGE, false);
    if (messageService!=null) {
      messageService.suspendMessages(this);
    }
  }
View Full Code Here

    }
  }

  void resumeMessages() {
    // notify the message service of this resuming
    MessageService messageService = (MessageService) Services.getCurrentService(Services.SERVICENAME_MESSAGE, false);
    if (messageService!=null) {
      messageService.resumeMessages(this);
    }
  }
View Full Code Here

    Services services = new Services(serviceFactories);
    assertSame(loggingService, services.getLoggingService());
  }
  public void testMessageService() {
    Map serviceFactories = new HashMap();
    MessageService messageService = new MessageService(){
      private static final long serialVersionUID = 1L;
      public void send(Message message) {}
      public void suspendMessages(Token token) {}
      public void resumeMessages(Token token) {}
      public void close() {}
View Full Code Here

       
        if (isDebugEnabled)
        {
            logger.debug("Sending " + (token.isSuspended() ? "suspended " : "") +"signal task to message service for token id " + tokenId + " from process instance " + processInstanceId) ;
        }
        final MessageService messageService = (MessageService)Services.getCurrentService(Services.SERVICENAME_MESSAGE, true) ;
        messageService.send(signalJob) ;
        if (isDebugEnabled)
        {
            logger.debug("Sent signal task to message service for token id " + tokenId + " from process instance " + processInstanceId) ;
        }
       
View Full Code Here

    executionContext.setTransitionSource(null);

    // execute the node
    if (isAsync) {
      ExecuteNodeJob job = createAsyncContinuationJob(token);
      MessageService messageService = (MessageService) Services.getCurrentService(Services.SERVICENAME_MESSAGE);
      messageService.send(job);
      token.lock(job.toString());
    } else {
      execute(executionContext);
    }
  }
View Full Code Here

TOP

Related Classes of org.jbpm.msg.MessageService

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.