1 package org.jbpm.graph.node; 2 3 import org.jbpm.graph.def.Event; 4 import org.jbpm.graph.def.Node; 5 import org.jbpm.graph.def.Transition; 6 import org.jbpm.graph.exe.*; 7 8 public class EndState extends Node { 9 10 private static final long serialVersionUID = 1L; 11 12 public EndState() { 13 } 14 15 public static final String [] supportedEventTypes = new String []{Event.EVENTTYPE_NODE_ENTER}; 16 public String [] getSupportedEventTypes() { 17 return supportedEventTypes; 18 } 19 20 public EndState(String name) { 21 super(name); 22 } 23 24 public void execute(ExecutionContext executionContext) { 25 executionContext.getToken().end(); 26 } 27 28 public Transition addLeavingTransition(Transition t) { 29 throw new UnsupportedOperationException ("can't add a leaving transition to an end-state"); 30 } 31 } 32 | Popular Tags |