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 milestoneName = null; 12 private String relativeTokenPath = null; 13 14 public MilestoneEvent() { 15 } 16 17 public MilestoneEvent( String milestoneName, String 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 getMilestoneName() { 32 return milestoneName; 33 } 34 public void setMilestoneName(String milestoneName) { 35 this.milestoneName = milestoneName; 36 } 37 public String getRelativeTokenPath() { 38 return relativeTokenPath; 39 } 40 public void setRelativeTokenPath(String relativeTokenPath) { 41 this.relativeTokenPath = relativeTokenPath; 42 } 43 } 44 | Popular Tags |