Package org.jbpm.graph.def

Examples of org.jbpm.graph.def.Transition


  {
    fail("XML did not pass validation as expected:\n" + je.toString());
  }
   
    Node node = processDefinition.getNode("a");
    Transition transition = node.getDefaultLeavingTransition();
    Event event = transition.getEvent(Event.EVENTTYPE_TRANSITION);
    Action transitionAction = (Action) event.getActions().iterator().next();
   
    Action processAction = processDefinition.getAction("scratch");
    assertEquals("scratch", processAction.getName());
    assertSame(processAction, transitionAction.getReferencedAction());
View Full Code Here


    transitions = new ArrayList();

    if (taskInstance.getAvailableTransitions().isEmpty() == false) {
      Iterator availableTransitionsIterator = taskInstance.getAvailableTransitions().iterator();
      while (availableTransitionsIterator.hasNext()) {
        Transition transition = (Transition) availableTransitionsIterator.next();
        transitions.add(transition);

      }
    }
  }
View Full Code Here

    transitions = new ArrayList();

    if (token.getNode().getLeavingTransitions().isEmpty() == false) {
      Iterator availableTransitionsIterator = token.getNode().getLeavingTransitions().iterator();
      while (availableTransitionsIterator.hasNext()) {
        Transition transition = (Transition) availableTransitionsIterator.next();
        transitions.add(transition);

      }
    }
  }
View Full Code Here

      availableTransitionItems = null;
    } else {
      availableTransitionItems = new ArrayList();
      Iterator iter = availableTransitions.iterator();
      while (iter.hasNext()) {
        Transition transition = (Transition) iter.next();
        SelectItem transitionItem = new SelectItem();
        transitionItem.setValue(transition.getName());
        transitionItem.setLabel(transition.getName());
        transitionItem.setDisabled(false);
        availableTransitionItems.add(transitionItem);
      }
    }
View Full Code Here

   * name will be used in the signal.
   * If this task completion does not trigger execution to move on,
   * the transitionName is ignored.
   */
  public void end(String transitionName) {
    Transition leavingTransition = null;
   
    if (task!=null) {
      Node node = task.getTaskNode();
      if (node==null) {
        node = (Node) task.getParent();
View Full Code Here

      }
    } catch (Throwable exception) {
      raiseException(exception, executionContext);
    }

    Transition transition = null;
    if (transitionName!=null) {
      log.debug("selected transition name '"+transitionName+"'");
      transition = getLeavingTransition(transitionName);
    } else {
      log.debug("no transition name selected: taking default leaving transition");
View Full Code Here

    for ( int i = 0; i < transitions.length; i++ ) {
      String[] parsedTransition = cutTransitionText( transitions[i] );
      Node from = pd.getNode( parsedTransition[0] );
      Node to = pd.getNode( parsedTransition[2] );
      Transition t = new Transition( parsedTransition[1] );
      from.addLeavingTransition(t);
      to.addArrivingTransition(t);
    }
  }
View Full Code Here

import org.jbpm.graph.def.Transition;

public class SignalLogDbTest extends AbstractDbTestCase {

  public void testProcessInstanceCreateLog() {
    Transition transition = new Transition();
    session.save(transition);
   
    SignalLog signalLog = new SignalLog(transition);
    signalLog = (SignalLog) saveAndReload(signalLog);
    assertNotNull(signalLog.getTransition());
View Full Code Here

import org.jbpm.graph.def.Transition;

public class TransitionLogDbTest extends AbstractDbTestCase {

  public void testTransitionLogTransition() {
    Transition transition = new Transition();
    session.save(transition);
   
    TransitionLog transitionLog = new TransitionLog(transition, null);
    transitionLog = (TransitionLog) saveAndReload(transitionLog);
    assertNotNull(transitionLog.getTransition());
View Full Code Here

      resolveTransitionDestination(transitionElement, node);
    }
  }

  public void resolveTransitionDestination(Element transitionElement, Node node) {
    Transition transition = new Transition();
    transition.setProcessDefinition(processDefinition);
   
    // get the action name
    String name = transitionElement.attributeValue("name");
    if (name!=null) {
      transition.setName(name);
    }

    // add the transition to the node
    node.addLeavingTransition(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.