2 Replies Latest reply on Oct 22, 2005 8:02 AM by kukeltje

    decision node throw an exception

    abhikal

      Hi

      Please help me understand that why i get an Exception from JBOSS when i try to transict from to . if i remove the tag and use tag the program runs fine.
      for your knoweledge i have executed the same program on eclipse and its running perfect.
      is is problem due to version of JBOSS JBPM server, because in console i get the warning that transtion to decision tag is resolved



      org.jbpm.graph.def.DelegationException
      org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:299)
      org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:293)
      org.jbpm.graph.node.Decision.execute(Decision.java:87)
      org.jbpm.graph.def.Node.enter(Node.java:284)
      org.jbpm.graph.def.Transition.take(Transition.java:92)
      org.jbpm.graph.def.Node.leave(Node.java:349)
      org.jbpm.graph.exe.Token.signal(Token.java:127)
      org.jbpm.graph.exe.Token.signal(Token.java:92)
      cs.CustomerService.doGet(CustomerService.java:68)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:810)


      the servlet code on jboss is



      package cs;
      
      import java.io.IOException;
      import java.io.PrintWriter;
      
      import javax.servlet.http.HttpServlet;
      import javax.servlet.http.HttpServletRequest;
      import javax.servlet.http.HttpServletResponse;
      
      import org.jbpm.db.JbpmSession;
      import org.jbpm.db.JbpmSessionFactory;
      import org.jbpm.graph.def.ProcessDefinition;
      import org.jbpm.graph.exe.ProcessInstance;
      import org.jbpm.graph.exe.Token;
      
      public class CustomerService extends HttpServlet
      {
      
       public void doGet(HttpServletRequest rq,HttpServletResponse res)
       {
      
      
       ProcessDefinition pd =ProcessDefinition.parseXmlResource("processdefinition.xml" );
      
       ProcessInstance pi=new ProcessInstance(pd);
       PrintWriter pw;
       res.setContentType("text/html");
       try
       {
       pw = res.getWriter();
       pw.println("hello hw r u");
       pw.println("the 1 value is :-"+pd);
       pw.println("<br>the value is :-"+pi);
       pw.println("<br>---- :-"+pi.getRootToken().getNode().getName());
      
       Token t=pi.getRootToken();
       pw.println("<br>++++"+t.getNode().getName());
       t.signal();
       pw.println("<br>-----"+t.getNode().getName());
       t.signal();
       pw.println("<br>-----"+t.getNode().getName());
       }
       catch (IOException e)
       {
       e.printStackTrace();
       }
      
      
       }
      
      }
      


      the processdefinition.xml is

      <?xml version="1.0" encoding="UTF-8"?>
      
      <process-definition name="customerservice">
       <start-state name="customer calls">
       <transition to="tt"></transition>
       </start-state>
      
      
      <state name="tt">
       <transition to="tonepulse"></transition>
      </state>
      
       <decision name="tonepulse">
       <transition to="what">
       <condition>x == 1</condition>
      
       </transition>
       <transition to="transfer">
       <condition>x == 2</condition>
       </transition>
      
      </decision>
       <state name="what is the purpose of the call"> <transition to="end"></transition>
      </state>
       <state name="transfer to customer service department"> <transition to="end"></transition>
      </state>
      
      
      
      
       <end-state name="end"> </end-state>
      
      </process-definition>


        • 1. Re: decision node throw an exception
          abhikal

          Soory the fine missing line of this issue is

          Hi

          Please help me understand that why i get an Exception from JBOSS when i try to transict from state node to decision node . if i remove the tag and use tag the program runs fine.
          for your knoweledge i have executed the same program on eclipse and its running perfect.
          is is problem due to version of JBOSS JBPM server, because in console i get the warning that transtion to decision tag is resolved

          • 2. Re: decision node throw an exception
            kukeltje

            what do you mean by

            if i remove the tag and use tag the program runs fine


            btw, the to="transfer" and to="what" point to non-eisting states. Isn't that your problem?