[jboss-user] [JBoss jBPM] - Error in documentation regarding Implementation of DecisionH

sebastian.s do-not-reply at jboss.com
Tue Aug 18 02:35:10 EDT 2009


If you write your own Decision Class which has to implement DecisionHandler the documentation tells you to implement a method called select().


  | public class ContentEvaluation implements DecisionHandler {
  | 
  |   public String select(OpenExecution execution) {
  |     String content = (String) execution.getVariable("content");
  |     if (content.equals("you're great")) {
  |       return "good";
  |     }
  |     if (content.equals("you gotta improve")) {
  |       return "bad";
  |     }
  |     return "ugly";
  |   }
  | }
  | 

When I created my own class DecisionHandler made me implement a method called decide(). I think this an error in the docs and so it should be like this:


  | public class ContentEvaluation implements DecisionHandler {
  | 
  |   public String decide(OpenExecution execution) {
  |     String content = (String) execution.getVariable("content");
  |     if (content.equals("you're great")) {
  |       return "good";
  |     }
  |     if (content.equals("you gotta improve")) {
  |       return "bad";
  |     }
  |     return "ugly";
  |   }
  | }
  | 

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4250057#4250057

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4250057



More information about the jboss-user mailing list