View Javadoc
1   package org.kuali.ole.ingest.action;
2   
3   import org.kuali.ole.OLEConstants;
4   import org.kuali.rice.krms.api.engine.ExecutionEnvironment;
5   import org.kuali.rice.krms.framework.engine.Action;
6   
7   /**
8    * ExceptionAction is used to execute an action when KRMS Rules throws an exeception.
9    */
10  public class ExceptionAction implements Action {
11      /**
12       *     This method sets the  Exception creation flag in executionEnvironment as true.
13       * @param executionEnvironment
14       */
15      @Override
16      public void execute(ExecutionEnvironment executionEnvironment) {
17          executionEnvironment.getEngineResults().setAttribute(OLEConstants.EXCEPTION_CREATION_FLAG, true);
18      }
19  
20      /**
21       *  This method simulates the executionEnvironment.
22       * @param executionEnvironment
23       */
24      @Override
25      public void executeSimulation(ExecutionEnvironment executionEnvironment) {
26          execute(executionEnvironment);
27      }
28  }