1 Reply Latest reply on Apr 23, 2008 4:13 PM by kukeltje

    Decision Node

    simplysmart1

      hi,
      i'm using a decision node via a DefinitionHandler and this is the code

      package com.sample.action;
      
      import org.jbpm.context.exe.ContextInstance;
      import org.jbpm.graph.exe.ExecutionContext;
      import org.jbpm.graph.node.DecisionHandler;
      
      public class Istrue implements DecisionHandler {
      
      
       public String decide(ExecutionContext executionContext) throws Exception {
       String message= null;
       executionContext.getContextInstance().setVariable("message", message);
       Object object=new Object();
       object=executionContext.getVariable("Avis_DJ_hypo");
       //Nom it s a context variable
       if(object.toString().equals("yes"))
       return "Oui";
       else
       return "Non";
      
       }
      }


      and on my XML file this is what i wrote concerning this node:
      <decision name="decision1">
       <handler class= "com.sample.action.Istrue"/>
       <transition name="Non" to="Rejet du dossier par DJ"></transition>
       <transition name="Oui" to="Montage du dossier et mettre sous GED (Ag)"></transition>
       </decision>

      "Avis_DJ_hypo" is a variable on my process which an actor put it in a task form via a task node before this decision node , the problem is that when i put a value to this variable and want to save and go to the next transition i got this Error message on the web console and i'cant continue the execution and i stay blocked, this is the message:
      Error completing task: An exception of type "org.jbpm.graph.def.DelegationException" was thrown.


      so what's the problem, need help.
      thanks for all