"nageshreddy1981" wrote : Hi,
  | 
  | I am new to JBPM.
  | I am trying to implement decision node in process definiton.
  | where can i find the examples for the decision node with the decision 
handler implemetation.
  | Can anybody provide me with examples or links on the same.
  | 
  | Thanks in advance


I'm a newbie too but here's what I did:

Implement the interface DecisionHandler and implement the 'decide' method which 
returns the appropriate transition.

public class MyDecisionHandler implements DecisionHandler {

        /**
         * Comment for serialVersionUID
         */
        private static final long serialVersionUID = 1L;

        
        
        public String decide(ExecutionContext executionContext) throws 
Exception {
                String lower = (String) 
executionContext.getContextInstance().getVariable("lower");
                String upper = (String) 
executionContext.getContextInstance().getVariable("upper");
                
                if ((Integer.parseInt(upper) - Integer.parseInt(lower)) > 10) {
                        return "yes";
                }
                else {
                        return "no";
                }

        }


Currently you can't use the GPD to associate the handler to the decision node, 
so you have to edit the process definition XML by hand like this:


      
      
      
      
   



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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4057262
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to