public void setName(String name) { if (from != null) { if (from.hasLeavingTransition(name)) { throw new IllegalArgumentException("cannot rename " + this + " because " + from + " already has a transition named " + name); } Map fromLeavingTransitions = from.getLeavingTransitionsMap(); fromLeavingTransitions.put(name, this); } this.name = name; }
public void setName(String name) { if (from != null) { if (from.hasLeavingTransition(name)) { throw new IllegalArgumentException("cannot rename " + this + " because " + from + " already has a transition named " + name); } Map fromLeavingTransitions = from.getLeavingTransitionsMap(); fromLeavingTransitions.put(name, this); } this.name = name; }
protected Collection getTransitionNames(Token token) { Node node = token.getNode(); return node.getLeavingTransitionsMap().keySet(); }
protected Collection getTransitionNames(Token token) { Node node = token.getNode(); return node.getLeavingTransitionsMap().keySet(); }
public boolean isTerminatedImplicitly() { if (end != null) return true; Map leavingTransitions = node.getLeavingTransitionsMap(); if (leavingTransitions != null && !leavingTransitions.isEmpty()) { // ok: found a non-terminated token return false; } // loop over all active child tokens for (Iterator iter = getActiveChildren().values().iterator(); iter.hasNext();) { Token child = (Token) iter.next(); if (!child.isTerminatedImplicitly()) return false; } // if none of the above, this token is terminated implicitly return true; }
public boolean isTerminatedImplicitly() { if (end != null) return true; Map leavingTransitions = node.getLeavingTransitionsMap(); if (leavingTransitions != null && !leavingTransitions.isEmpty()) { // ok: found a non-terminated token return false; } // loop over all active child tokens for (Iterator iter = getActiveChildren().values().iterator(); iter.hasNext();) { Token child = (Token) iter.next(); if (!child.isTerminatedImplicitly()) return false; } // if none of the above, this token is terminated implicitly return true; }
public String decide(ExecutionContext ctx) throws Exception { //get what we got from user String input = (String) ctx.getVariable(_INPUT_); Map transitions = ctx.getNode().getLeavingTransitionsMap(); if(transitions.get(input) == null) { return _END_; }else { return ""+input; } }
private void writeTransitions(Element element, org.jbpm.graph.def.Node node) { if (node.getLeavingTransitionsMap() != null) { for (Iterator iter = node.getLeavingTransitionsList().iterator(); iter.hasNext();) { Transition transition = (Transition) iter.next(); writeTransition(element.addElement("transition"), transition); } } }
private void writeTransitions(Element element, org.jbpm.graph.def.Node node) { if (node.getLeavingTransitionsMap() != null) { for (Iterator iter = node.getLeavingTransitionsList().iterator(); iter.hasNext();) { Transition transition = (Transition) iter.next(); writeTransition(element.addElement("transition"), transition); } } }