KickJava   Java API By Example, From Geeks To Geeks.

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


1 package org.jbpm.graph.node;
2
3 import org.jbpm.graph.def.*;
4 import org.jbpm.graph.exe.ExecutionContext;
5 import org.jbpm.jpdl.exe.*;
6
7 public class MilestoneEvent implements ActionHandler {
8
9   private static final long serialVersionUID = 1L;
10   
11   private String JavaDoc milestoneName = null;
12   private String JavaDoc relativeTokenPath = null;
13   
14   public MilestoneEvent() {
15   }
16
17   public MilestoneEvent( String JavaDoc milestoneName, String JavaDoc relativeTokenPath ) {
18     this.milestoneName = milestoneName;
19     this.relativeTokenPath = relativeTokenPath;
20   }
21
22   public void execute(ExecutionContext ac) {
23     MilestoneInstance mi = MilestoneInstance.getMilestoneInstance(milestoneName, ac.getToken());
24     mi.setReached(true);
25     mi.notifyListeners();
26   }
27   
28
29
30
31   public String JavaDoc getMilestoneName() {
32     return milestoneName;
33   }
34   public void setMilestoneName(String JavaDoc milestoneName) {
35     this.milestoneName = milestoneName;
36   }
37   public String JavaDoc getRelativeTokenPath() {
38     return relativeTokenPath;
39   }
40   public void setRelativeTokenPath(String JavaDoc relativeTokenPath) {
41     this.relativeTokenPath = relativeTokenPath;
42   }
43 }
44
Popular Tags