AnsweredAssumed Answered

Custom Action Evaluator

Question asked by mangar on Dec 13, 2012
Latest reply on Feb 6, 2014 by mrinal3199
I am having a problem with a custom evaluator.  I have an action in my share-config-custom.xml:

      <action id="sammy.actions.writeToLog"
              icon="log_write"
              type="javascript"
              label="actions.sammy.writeToLog">
         <param name="function">onActionSimpleRepoAction</param>
         <param name="successMessage">message.writeToLog.success</param>
         <param name="failureMessage">message.WriteToLog.failure</param>
         <evaluator negate="true">sammy.writeToLog.Evaluator</evaluator>
      </action>

in my custom-slingshot-application-context.xml I have a simple one liner bean declaration:
<bean id="sammy.writeToLog.Evaluator" class="com.sammy.share.action.evaluator.LogWriteEvaluator">
</bean>

and in my jar file located in share/WEB-INF/lib I have this:
public class LogWriteEvaluator extends BaseEvaluator {

    @Override
   public boolean evaluate(JSONObject jsonObject) {
          return true;
   }
   
}


if I comment out the evaluator in the action declaration, It shows up fine, so I know that works.

what am I missing?

Outcomes