1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krms.framework;
17
18 import org.kuali.rice.krms.api.engine.ExecutionEnvironment;
19 import org.kuali.rice.krms.api.engine.ResultEvent;
20 import org.kuali.rice.krms.framework.engine.Action;
21 import org.kuali.rice.krms.framework.engine.ResultLogger;
22 import org.kuali.rice.krms.framework.engine.result.BasicResult;
23
24
25
26
27
28 public class SayHelloAction implements Action {
29 private static final org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(SayHelloAction.class);
30 private static final ResultLogger KLog = ResultLogger.getInstance();
31
32 public SayHelloAction(){}
33
34 @Override
35 public void execute(ExecutionEnvironment environment) {
36 LOG.info("Hello! Im executing an action.");
37 KLog.logResult(new BasicResult(ResultEvent.ACTION_EXECUTED, this, environment));
38 }
39
40 @Override
41 public void executeSimulation(ExecutionEnvironment environment) {
42 throw new UnsupportedOperationException();
43 }
44
45 public String toString(){
46 return getClass().getSimpleName();
47 }
48 }