01: package com.sample.action;
02:
03: import org.jbpm.graph.def.ActionHandler;
04: import org.jbpm.graph.exe.ExecutionContext;
05:
06: public class MessageActionHandler implements ActionHandler {
07:
08: private static final long serialVersionUID = 1L;
09:
10: /**
11: * The message member gets its value from the configuration in the
12: * processdefinition. The value is injected directly by the engine.
13: */
14: String message;
15:
16: /**
17: * A message process variable is assigned the value of the message
18: * member. The process variable is created if it doesn't exist yet.
19: */
20: public void execute(ExecutionContext context) throws Exception {
21: context.getContextInstance().setVariable("message", message);
22: }
23:
24: }
|