0 Replies Latest reply on Oct 28, 2008 7:51 PM by Neil C

    Nested Pageflow Failing on Two Counts

    Neil C Novice

      I have an order processing pageflow that works just fine on its own, but two weird things happen when I nest it inside a larger pageflow:



      •   The flow goes to the first page node but doesn't stay there as a transition is executed without any action by the user (since the action is supposed to fire with the press of a button).




      • I get an exception when I attempt to save the order to the database: java.lang.IllegalStateException: pageflow has not yet started



      Here first is the relevant portion of the parent pageflow (Note that a long-running conversation is in place before this begins):


         <page view-id="/sales/orderDetails.jspx" name="orderDetails">
            <redirect/>
            <transition name="convertOrder" to="conversion">
               <action expression="#{conversionAction.convertOrder}"/>
            </transition>
         </page>
         <process-state name="conversion">
            <sub-process name="orderFulfillmentPageflow"/>
            <transition to="end-process"/>
         </process-state>
         <end-state name="end-process"/>
      


       
      Here now is the relevant portion of the nested pageflow:


      <pageflow-definition name="orderFulfillmentPageflow"...>
         <start-page view-id="/sales/beginOrder.jspx" name="orderInitiation">
            <description>Begin Order</description>
            <redirect/>
            <transition name="shop" to="selection"/>
         </start-page>
         <page view-id="/sales/shop.jspx" name="selection">
      .
      .
      .
         </page>
         <page view-id="/sales/confirm.jspx" name="confirmation">
            <description>Confirmation</description>
            <redirect/>
            <transition name="submitOrder" to="end">
               <action expression="#{orderFulfillmentAction.submitOrder}"/>
            </transition>
         </page>
         <page view-id="/sales/home.jspx" name="end">
            <end-conversation/>
            <redirect/>
            <transition to="end-process"/>
         </page>
         <end-state name="end-process"/>
      



      When I nest this flow, the application activates the shop transition and moves to the selection node on its own.  And when I activate the submitOrder action, which persists the order, I get the java.lang.IllegalStateException: pageflow has not yet started.


      Here are the logs.  First, for the skipped page:


      27 Oct 2008 18:03:18,078: DEBUG org.jbpm.graph.exe.Token.unlock - token[0] is unlocked by token[0]
      27 Oct 2008 18:03:18,078: DEBUG org.jbpm.graph.def.GraphElement.fireEvent - event 'node-enter' on 'ProcessState(conversion)' for 'Token(/)'
      27 Oct 2008 18:03:18,078: DEBUG org.jbpm.graph.def.GraphElement.fireEvent - event 'process-start' on 'ProcessDefinition(orderFulfillmentPageflow)' for 'Token(/)'
      27 Oct 2008 18:03:18,078: DEBUG org.jbpm.graph.def.GraphElement.fireEvent - event 'subprocess-created' on 'ProcessState(conversion)' for 'Token(/)'
      27 Oct 2008 18:03:18,078: DEBUG org.jbpm.graph.def.GraphElement.fireEvent - event 'before-signal' on 'Page(orderInitiation)' for 'Token(/)'
      27 Oct 2008 18:03:18,078: DEBUG org.jbpm.graph.def.GraphElement.fireEvent - event 'node-leave' on 'Page(orderInitiation)' for 'Token(/)'
      27 Oct 2008 18:03:18,078: DEBUG org.jbpm.graph.def.GraphElement.fireEvent - event 'transition' on 'Transition(shop)' for 'Token(/)'
      27 Oct 2008 18:03:18,078: DEBUG org.jbpm.graph.def.GraphElement.fireEvent - event 'node-enter' on 'Page(selection)' for 'Token(/)'
      27 Oct 2008 18:03:18,078: DEBUG org.jbpm.graph.def.GraphElement.fireEvent - event 'after-signal' on 'Page(orderInitiation)' for 'Token(/)'
      27 Oct 2008 18:03:18,078: DEBUG org.jbpm.graph.def.GraphElement.fireEvent - event 'after-signal' on 'Page(orderDetails)' for 'Token(/)'
      27 Oct 2008 18:03:18,078: DEBUG org.jbpm.JbpmContext.close - closing JbpmContext
      



      Second, for the exception:



      27 Oct 2008 18:03:32,259: DEBUG org.jbpm.graph.exe.Token.unlock - token[0] is unlocked by token[0]
      27 Oct 2008 18:03:32,279: ERROR org.jbpm.graph.def.GraphElement.executeAction - action threw exception: couldn't evaluate expression '#{orderFulfillmentAction.submitOrder}'
      .
      .
      .
      .
      java.lang.IllegalStateException: pageflow has not yet started
           at org.jboss.seam.pageflow.Pageflow.getNode(Pageflow.java:172)
           at org.jboss.seam.faces.FacesPage.storePageflow(FacesPage.java:74)
           at org.jboss.seam.jsf.SeamPhaseListener.beforeRenderResponse(SeamPhaseListener.java:474)
           at org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:146)
           at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:116)
           at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:222)
           at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
           at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
           at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:223)
           at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
           at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
           at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
           at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
           at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:154)
           at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:260)
           at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:366)
           at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:493)
           at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
           at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
      





      Any insight into why these things happen is appreciated.


      Thanks.