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