4 Replies Latest reply on Oct 16, 2006 4:58 AM by Gerald Tretter

    About decision node, I need help

    Fei Xu Newbie

      Hi, I meet a problem, anyone could help me?
      I want to add a DecisionNode in my process definition, this is the first sample:

      <start-state name="start">
       <task name="NewApply" swimlane="proposer"></task>
       <transition name="" to="DepLeader"></transition>
       </start-state>
       <task-node name="DepLeaderApprove">
       <task name="DepLeaderUpdte" swimlane="depleader"></task>
       <transition name="" to="NeedUnitLeader"></transition>
       </task-node>
       <decision name="NeedUnitLeader">
       <handler class="com.test.action.NeedUnitleaderApproveHandler">
       </handler>
       <transition name="ToUnitLeader" to="UnitLeaderApprove"></transition>
       <transition name="ToUser" to="UserConfirm"></transition>
       </decision>
       <task-node name="UnitLeaderApprove">
       <task name="UnitLeaderUpdte" swimlane="unitleader"></task>
       <transition name="" to="UserConfirm"></transition>
       </task-node>
       ...

      It is OK.
      But I want to add a task node after the DepLeaderApprove node to realize the return to sender function.
      This is the second sample:

      <start-state name="start">
       <task name="NewApply" swimlane="proposer"></task>
       <transition name="" to="DepLeader"></transition>
       </start-state>
       <task-node name="DepLeaderApprove">
       <task name="DepLeaderUpdte" swimlane="depleader"></task>
       <transition name="" to="NeedUnitLeader"></transition>
       </task-node>
       <task-node name="Modify">
       <task name="ModifyApply" swimlane="proposer"></task>
       <transition name="" to="DepLeaderApprove"></transition>
       </task-node>
       <decision name="NeedUnitLeader">
       <handler class="com.test.action.NeedUnitleaderApproveHandler">
       </handler>
       <transition name="ToUnitLeader" to="UnitLeaderApprove"></transition>
       <transition name="ToUser" to="UserConfirm"></transition>
       </decision>
       <task-node name="UnitLeaderApprove">
       <task name="UnitLeaderUpdte" swimlane="unitleader"></task>
       <transition name="" to="UserConfirm"></transition>
       </task-node>
       ...

      After I deploy this, when the DepLeader open the instance from home page on Node'DepLeaderApprove', an exception throw like this:

      type Exception report
      
      message
      
      description The server encountered an internal error () that prevented it from fulfilling this request.
      
      exception
      
      javax.servlet.ServletException: Error calling action method of component with id _id1_5:_id4
       javax.faces.webapp.FacesServlet.service(FacesServlet.java:109)
       org.jbpm.webapp.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:55)
       org.jbpm.web.JbpmContextFilter.doFilter(JbpmContextFilter.java:83)
       org.jbpm.webapp.filter.LogFilter.doFilter(LogFilter.java:59)
       org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
      
      
      root cause
      
      javax.faces.FacesException: Error calling action method of component with id _id1_5:_id4
       org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:74)
       javax.faces.component.UICommand.broadcast(UICommand.java:106)
       javax.faces.component.UIData.broadcast(UIData.java:338)
       javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:90)
       javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:164)
       org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:271)
       org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
       javax.faces.webapp.FacesServlet.service(FacesServlet.java:94)
       org.jbpm.webapp.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:55)
       org.jbpm.web.JbpmContextFilter.doFilter(JbpmContextFilter.java:83)
       org.jbpm.webapp.filter.LogFilter.doFilter(LogFilter.java:59)
       org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)

      Anyone could tell me the reason? thanks



        • 1. Re: About decision node, I need help
          Ronald van Kuijk Master

          Post the stacktrace from the logging, not the ones on the screen......

          • 2. Re: About decision node, I need help
            Fei Xu Newbie

            I add these info from console

            17:40:56,390 ERROR [[FacesServlet]] Servlet.service() for servlet FacesServlet t
            hrew exception
            javax.faces.FacesException: Error calling action method of component with id _id1_0:_id4
             at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:74)
             at javax.faces.component.UICommand.broadcast(UICommand.java:106)
             at javax.faces.component.UIData.broadcast(UIData.java:338)
             at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:90)
             at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:164)
             at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:271)
             at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
             at javax.faces.webapp.FacesServlet.service(FacesServlet.java:94)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
             at org.jbpm.webapp.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:55)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
             at org.jbpm.web.JbpmContextFilter.doFilter(JbpmContextFilter.java:83)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
             at org.jbpm.webapp.filter.LogFilter.doFilter(LogFilter.java:59)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
             at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
             at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
             at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
             at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
             at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
             at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
             at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
             at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
             at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
             at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
             at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
             at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
             at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
             at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
             at java.lang.Thread.run(Thread.java:595)
            Caused by: javax.faces.el.EvaluationException: Exception while invoking expression #{homeBean.selectTaskInstance}
             at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:153)
             at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63)
             ... 35 more
            Caused by: java.lang.NullPointerException: value
             at javax.faces.model.SelectItem.setValue(SelectItem.java:116)
             at org.jbpm.webapp.bean.TaskBean.initialize(TaskBean.java:130)
             at org.jbpm.webapp.bean.HomeBean.selectTaskInstance(HomeBean.java:63)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:129)
             ... 36 more
            17:41:00,000 DEBUG [JbpmContextInfo] creating jbpm context with service factorie
            s '[message, scheduler, logging, persistence, authentication]'


            • 3. Re: About decision node, I need help
              Fei Xu Newbie

              Hi, my buddies
              I think I got the solution.
              When add more than two transitions from one node (tack node or decision) , each transition must have name.
              If one transition's name is null, this exception will be thrown.

              • 4. Re: About decision node, I need help
                Gerald Tretter Newbie

                i think you can leave out the name if you don't call it explicitly, but then you have to leave the name out as a whole, that means you must not write name="" just lave the name property out.