KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jbpm > bpel > def > Wait


1 package org.jbpm.bpel.def;
2
3 import org.jbpm.graph.exe.ExecutionContext;
4 import org.jbpm.graph.exe.Token;
5
6 import org.jbpm.bpel.timer.def.Alarm;
7 import org.jbpm.bpel.timer.def.AlarmListener;
8
9 /**
10  * The wait activity allows a business process to specify a delay
11  * for a certain period of time or until a certain deadline is reached
12  * @see "WS-BPEL 2.0 §11.7"
13  * @author Juan Cantú
14  * @version $Revision: 1.2 $ $Date: 2005/05/31 00:49:53 $
15  */

16 public class Wait extends Activity implements AlarmListener {
17
18   private static final long serialVersionUID = 1L;
19   
20   private Alarm alarm;
21
22   public Wait() {
23   }
24
25   public Wait(String JavaDoc name) {
26     super(name);
27   }
28
29   public void execute(ExecutionContext context) {
30     // TODO Auto-generated method stub
31
}
32   
33   public void alarmTriggered(Token token, Alarm anAlarm) {
34     leave(new ExecutionContext(token));
35   }
36
37   public Alarm getAlarm() {
38     return alarm;
39   }
40   
41   public void setAlarm(Alarm alarm) {
42     this.alarm = alarm;
43   }
44
45   /**{@inheritDoc}**/
46   public void accept(BpelVisitor visitor) {
47     visitor.visit(this);
48   }
49 }
50
Popular Tags