Package org.jbpm.graph.def

Examples of org.jbpm.graph.def.Transition


  private void addAvailableTransitionsOfNode(Node currentNode, Set availableTransitions) {
      List leavingTransitions = currentNode.getLeavingTransitions();
      if (leavingTransitions!=null) {
        Iterator iter = leavingTransitions.iterator();
        while (iter.hasNext()) {
          Transition transition = (Transition) iter.next();
          String conditionExpression = transition.getCondition();
          if (conditionExpression!=null) {
            Object result = JbpmExpressionEvaluator.evaluate(conditionExpression, new ExecutionContext(this));
            if ( (result instanceof Boolean)
                 && (((Boolean)result).booleanValue())
               ) {
View Full Code Here


        try {
            pd.getName();
            // often needed to start a process:
            Iterator iter = pd.getStartState().getLeavingTransitions().iterator();
            while (iter.hasNext()) {
                Transition t = (Transition) iter.next();
                t.getName();
            }
        }
        catch (Exception ex) {
            log.warn("exception while retrieving process instance data for process definiton " + pd.getName(), ex);
        }
View Full Code Here

      resolveTransitionDestination(transitionElement, node);
    }
  }

  public void resolveTransitionDestination(Element transitionElement, Node node) {
    Transition transition = new Transition();
    transition.setProcessDefinition(processDefinition);

    transition.setName(transitionElement.attributeValue("name"));
    transition.setDescription(transitionElement.elementTextTrim("description"));

    String condition = transitionElement.attributeValue("condition");
    if (condition==null) {
      Element conditionElement = transitionElement.element("condition");
      if (conditionElement!=null) {
        condition = conditionElement.getTextTrim();
        // for backwards compatibility
        if ( (condition==null)
             || (condition.length()==0)
           ) {
          condition = conditionElement.attributeValue("expression");
        }
      }
    }
    transition.setCondition(condition);

    // add the transition to the node
    node.addLeavingTransition(transition);

    // set destinationNode of the transition
View Full Code Here

TOP

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

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.