1 Reply Latest reply on Mar 13, 2007 1:43 PM by bapu patil

    DelegationException in processInstance.signal()

    bapu patil Newbie

      I am trying to test a simple processDefinition in servlet...i always get ' DelegationException in processInstance.signal();'


      org.jbpm.graph.def.DelegationException
      org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:352)
      org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:346)
      org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:249)
      org.jbpm.graph.def.GraphElement.executeActions(GraphElement.java:212)
      org.jbpm.graph.def.GraphElement.fireAndPropagateEvent(GraphElement.java:182)
      org.jbpm.graph.def.GraphElement.fireEvent(GraphElement.java:166)
      org.jbpm.graph.def.Node.enter(Node.java:301)
      org.jbpm.graph.def.Transition.take(Transition.java:119)
      org.jbpm.graph.def.Node.leave(Node.java:383)
      org.jbpm.graph.node.StartState.leave(StartState.java:70)
      org.jbpm.graph.exe.Token.signal(Token.java:178)
      org.jbpm.graph.exe.Token.signal(Token.java:123)
      org.jbpm.graph.exe.ProcessInstance.signal(ProcessInstance.java:217)
      org.example.web.WorkflowExcecuteServlet.SimpleNodeActionsFlow(WorkflowExcecuteServlet.java:162)

      Servlet code looks like this..

      DefnString is :

      <process-definition>
      <start-state>
      <transition to=\'start\'/>
      </start-state>
      <state name=\'start\'>
      <event type=\'node-enter\'>
      <action class=\'org.example.web.MyActionHandler\'/>
      <event type=\'node-leave\'>
      <action class=\'org.example.web.MyActionHandler\'/>
      <transition to=\'end\'/>
      <end-state name=\'end\' />
      </process-definition>


      ProcessDefinition processDefinition = ProcessDefinition.parseXmlString( defnString );

      ProcessInstance processInstance =
      new ProcessInstance(processDefinition);


      // The next signal will cause the execution to leave the start
      // state and enter the state 's'. So the state 's' is entered
      // and hence the action is executed.
      processInstance.signal();


      Can you someone help me ..what is wrong with this code?


      thanks
      BG

        • 1. Re: DelegationException in processInstance.signal()
          bapu patil Newbie

          It seems like JBPM (in servlet) is unable to find my ActionHandler (org.example.web.MyActionHandler) class. I have include org.example.web.MyActionHandler as part of the same war (WEB-INF/classes) where my servlet also exist. Why cann't JBPM find the actionhandler...?

          Is there a separate JBPM configuration file where i need to specify the classpath for org.example.web.MyActionHandler?

          i started to suspect...does JBPM really work in servlet environment?