Package org.jbpm

Examples of org.jbpm.PvmException


      javax.jms.Message jmsMessage = jmsSession.createMessage();
      MessageProducer messageProducer = jmsSession.createProducer(jmsDestination);
      try {
        messageProducer.send(jmsMessage);
      } catch (Exception e) {
        throw new PvmException("couldn't send jms message: "+e.getMessage(), e);
      } finally {
        messageProducer.close();
      }

      jmsMessage.setLongProperty("jobId", message.getDbid());

      /*
      if (job.getToken()!=null) {
        message.setLongProperty("tokenId", job.getToken().getId());
      }
      if (job.getProcessInstance()!=null) {
        message.setLongProperty("processInstanceId", job.getProcessInstance().getId());
      }
      if (job.getTaskInstance()!=null) {
        message.setLongProperty("taskInstanceId", job.getTaskInstance().getId());
      }
      */
     
    } catch (JMSException e) {
      throw new PvmException("couldn't send jms message", e);
    }
  }
View Full Code Here


  }
 
  /** @see Execution#signal(String, Map) */
  public void signal(String signal, Map<String, Object> parameters) {
    if (userCodeType==UserCodeType.EVENT_ACTIVITY) {
      throw new PvmException("invocation of signal is not allowed inside an event. only node behaviour activities can control the propagation of execution");
    }
    checkLock();
    if (node!=null) {
      performAtomicOperation(new SignalOp(signal, parameters));
    } else if (transition!=null) {
      performAtomicOperation(PROCEED_TO_DESTINATION);
    } else {
      throw new PvmException("execution is not in a node or in a transition");
    }
  }
View Full Code Here

  // execution method : take ////////////////////////////////////////////////
 
  /** @see Execution#takeDefaultTransition() */
  public void takeDefaultTransition() {
    if (userCodeType==UserCodeType.EVENT_ACTIVITY) {
      throw new PvmException("invocation of takeDefaultTransition is not allowed inside an event. only node behaviour activities can control the propagation of execution");
    }
    TransitionImpl defaultTransition = node.getDefaultTransition();
    if (defaultTransition==null) {
      throw new PvmException("there is no default transition in "+node);
    }
    take(defaultTransition);
  }
View Full Code Here

  }

  /** @see Execution#take(String) */
  public void take(String transitionName) {
    if (userCodeType==UserCodeType.EVENT_ACTIVITY) {
      throw new PvmException("invocation of take is not allowed inside an event. only node behaviour activities can control the propagation of execution");
    }
    if (node==null) {
      throw new PvmException(toString()+" is not positioned in node");
    }
    TransitionImpl transition = findTransition(transitionName);
    if (transition==null) {
      throw new PvmException("there is no transition "+transitionName+" in "+node);
    }
    take(transition);
  }
View Full Code Here

  }

  /** @see Execution#takeDefaultTransition() */
  public void take(Transition transition) {
    if (userCodeType==UserCodeType.EVENT_ACTIVITY) {
      throw new PvmException("invocation of take is not allowed inside an event. only node behaviour activities can control the propagation of execution");
    }
    checkLock();

    this.propagation = Propagation.EXPLICIT;
    this.transition = (TransitionImpl) transition;
View Full Code Here

  // execution method : execute ///////////////////////////////////////////////

  /** @see Execution#execute(String) */
  public void execute(String nodeName) {
    if (node==null) {
      throw new PvmException("node is null");
    }
    Node nestedNode = node.getNode(nodeName);
    if (nestedNode==null) {
      throw new PvmException("node "+nodeName+" doesn't exist in "+node);
    }
    execute(nestedNode);
  }
View Full Code Here

  }
 
  /** @see Execution#execute(Node) */
  public void execute(Node node) {
    if (userCodeType==UserCodeType.EVENT_ACTIVITY) {
      throw new PvmException("invocation of execute is not allowed inside an event. only node behaviour activities can control the propagation of execution");
    }
    if (node==null) {
      throw new PvmException("node is null");
    }
    checkLock();
   
    this.propagation = Propagation.EXPLICIT;
    performAtomicOperation(new MoveToChildNodeOp((NodeImpl) node));
View Full Code Here

 
  // execution method : waitForSignal /////////////////////////////////////////
 
  public void waitForSignal() {
    if (userCodeType==UserCodeType.EVENT_ACTIVITY) {
      throw new PvmException("invocation of waitForSignal is not allowed inside an event. only node behaviour activities can control the propagation of execution");
    }
    propagation = Propagation.WAIT;
  }
View Full Code Here

 
  // execution method : proceed ///////////////////////////////////////////////

  public void proceed() {
    if (userCodeType==UserCodeType.EVENT_ACTIVITY) {
      throw new PvmException("invocation of proceed is not allowed inside an event. only node behaviour activities can control the propagation of execution");
    }
    checkLock();

    // in graph based processDefinition langauges we assume that a
    // default transition is available
View Full Code Here

    }
  }

  public void move(Node destination) {
    if (userCodeType==UserCodeType.EVENT_ACTIVITY) {
      throw new PvmException("invocation of move is not allowed inside an event. only node behaviour activities can control the propagation of execution");
    }
    checkLock();

    setNode((NodeImpl) destination);
  }
View Full Code Here

TOP

Related Classes of org.jbpm.PvmException

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.