KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jbpm > graph > node > EndState


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 JavaDoc[] supportedEventTypes = new String JavaDoc[]{Event.EVENTTYPE_NODE_ENTER};
16   public String JavaDoc[] getSupportedEventTypes() {
17     return supportedEventTypes;
18   }
19
20   public EndState(String JavaDoc 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 JavaDoc("can't add a leaving transition to an end-state");
30   }
31 }
32
Popular Tags