KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jbpm > graph > exe > RuntimeAction


1 package org.jbpm.graph.exe;
2
3 import java.io.*;
4
5 import org.jbpm.graph.def.*;
6
7 /**
8  * is an action that can be added at runtime to the execution of one process instance.
9  */

10 public class RuntimeAction implements Serializable {
11   
12   private static final long serialVersionUID = 1L;
13   
14   long id = 0;
15   protected ProcessInstance processInstance = null;
16   protected GraphElement graphElement = null;
17   protected String JavaDoc eventType = null;
18   protected Action action = null;
19   
20   public RuntimeAction() {
21   }
22
23   /**
24    * creates a runtime action. Look up the event with {@link GraphElement#getEvent(String)}
25    * and the action with {@link ProcessDefinition#getAction(String)}. You can only
26    * lookup named actions easily.
27    */

28   public RuntimeAction(Event event, Action action) {
29     this.graphElement = event.getGraphElement();
30     this.eventType = event.getEventType();
31     this.action = action;
32   }
33
34   public RuntimeAction(GraphElement graphElement, String JavaDoc eventType, Action action) {
35     this.graphElement = graphElement;
36     this.eventType = eventType;
37     this.action = action;
38   }
39
40   public long getId() {
41     return id;
42   }
43   public ProcessInstance getProcessInstance() {
44     return processInstance;
45   }
46   public Action getAction() {
47     return action;
48   }
49   public String JavaDoc getEventType() {
50     return eventType;
51   }
52   public GraphElement getGraphElement() {
53     return graphElement;
54   }
55 }
56
Popular Tags