Package org.jbpm.graph.def

Examples of org.jbpm.graph.def.Node


  public void resolveTransitionDestinations() {
    Iterator iter = unresolvedTransitionDestinations.iterator();
    while (iter.hasNext()) {
      Object[] unresolvedTransition = (Object[]) iter.next();
      Element nodeElement = (Element) unresolvedTransition[0];
      Node node = (Node) unresolvedTransition[1];
      resolveTransitionDestinations(nodeElement.elements("transition"), node);
    }
  }
View Full Code Here


    // set destinationNode of the transition
    String toName = transitionElement.attributeValue("to");
    if (toName==null) {
      addWarning("node '"+node.getFullyQualifiedName()+"' has a transition without a 'to'-attribute to specify its destinationNode");
    } else {
      Node to = ((NodeCollection)node.getParent()).findNode(toName);
      if (to==null) {
        addWarning("transition to='"+toName+"' on node '"+node.getFullyQualifiedName()+"' cannot be resolved");
      } else {
        to.addArrivingTransition(transition);
      }
    }
   
    // read the actions
    readActions(transitionElement, transition, Event.EVENTTYPE_TRANSITION);
View Full Code Here

    */
   public Node getNode()
   {
      if (processInstance==null) return null;
      Token pageFlowToken = processInstance.getRootToken();
      Node node = pageFlowToken.getNode();
      if (node==null)
      {
         throw new IllegalStateException("pageflow has not yet started");
      }
      return node;
View Full Code Here

   {
      if (processInstance==null)
      {
         throw new IllegalStateException("no pageflow in progress");
      }
      Node node = processInstance.getProcessDefinition().getNode(nodeName);
      if (node==null)
      {
         throw new IllegalArgumentException(
               "no node named: " + nodeName +
               " for pageflow: " + processInstance.getProcessDefinition().getName()
View Full Code Here

   /**
    * Get the current Page of the pageflow.
    */
   public Page getPage()
   {
      Node node = getNode();
      if ( !(node instanceof Page) )
      {
         throw new IllegalStateException("pageflow is not currently at a <page> or <start-page> node (note that pageflows that begin during the RENDER_RESPONSE phase should use <start-page> instead of <start-state>)");
      }
      return (Page) node;
View Full Code Here

   }
  
   public String getNoConversationViewId(String pageflowName, String pageflowNodeName)
   {
      ProcessDefinition pageflowProcessDefinition = getPageflowProcessDefinition(pageflowName);
      Node node = pageflowProcessDefinition.getNode(pageflowNodeName);
      if (node!=null && node instanceof Page)
      {
         return ( (Page) node ).getNoConversationViewId();
      }
      else
View Full Code Here

        if (startPageElement!=null) {
          startPageName = startPageElement.attributeValue("name");
        }
      }
      if (startPageName!=null) {
        Node startPage = getProcessDefinition().getNode(startPageName);
        if (startPage!=null) {
          getProcessDefinition().setStartState(startPage);
        }
      }
    }
View Full Code Here

    * Get the current Node of the pageflow.
    */
   public Node getNode()
   {
      if (processInstance==null) return null;
      Node node = getSubProcessInstance().getRootToken().getNode();
      if (node==null)
      {
         throw new IllegalStateException("pageflow has not yet started");
      }
      return node;
View Full Code Here

      if (processInstance==null)
      {
         throw new IllegalStateException("no pageflow in progress");
      }
      ProcessInstance subProcess = getSubProcessInstance();
      Node node = subProcess.getProcessDefinition().getNode(nodeName);
      if (node==null)
      {
         throw new IllegalArgumentException(
               "no node named: " + nodeName +
               " for pageflow: " + subProcess.getProcessDefinition().getName()
View Full Code Here

   /**
    * Get the current Page of the pageflow.
    */
   public Page getPage()
   {
      Node node = getNode();
      if ( node!=null && !(node instanceof Page) )
      {
         throw new IllegalStateException("pageflow is not currently at a <page> or <start-page> node (note that pageflows that begin during the RENDER_RESPONSE phase should use <start-page> instead of <start-state>)");
      }
      return (Page) node;
View Full Code Here

TOP

Related Classes of org.jbpm.graph.def.Node

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.