9 Replies Latest reply on Jan 15, 2008 6:10 AM by pmuir

    Pageflow: Illegal Navigation Error

    skanky78

      i'm using jpbm pageflows together with seam. the problems is, that i'm getting an "illegal navigation" error when i click the link which starts the pageflow (see below for an example). at the moment i can't get the reason why this happens...is this a bug or am i doing something wrong?


      pageflow definition:

      <?xml version="1.0"?>
      
      <pageflow-definition
       xmlns="http://jboss.com/products/seam/pageflow"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation=
       "http://jboss.com/products/seam/pageflow http://jboss.com/products/seam/pageflow-2.0.xsd"
       name="createShop">
      
       <start-page name="start" view-id="/pages/shop/step1.xhtml">
       <redirect/>
       <transition name="next" to="step2"/>
       <transition name="cancel" to="cancel"/>
       </start-page>
      
       <page name="step2" view-id="/pages/shop/step2.xhtml">
       <redirect/>
       <transition name="cancel" to="cancel"/>
       <transition name="complete" to="complete" />
       </page>
      
       <page name="complete" view-id="/pages/shop/complete.xhtml">
       <end-conversation/>
       <redirect/>
       </page>
      
       <page name="cancel" view-id="/pages/shop/step1.xhtml">
       <end-conversation before-redirect="true"/>
       <redirect/>
       </page>
      
      </pageflow-definition>
      

      how it is used:

      <s:link action="start" propagation="begin" pageflow="createShop" value="start"/>


      ps: i'm using the latest official jboss seam release (seam 2)

        • 1. Re: Pageflow: Illegal Navigation Error
          skanky78

          No one with an idea what i'm doing wrong?

          cheers,
          sven

          • 2. Re: Pageflow: Illegal Navigation Error
            skanky78

            i'm using plain tomcat 6.x with the following settings in the components.xml

            <transaction:no-transaction />
            <core:init transaction-management-enabled="false"/>
            
             <!-- For use with jBPM pageflow or process management -->
             <bpm:jbpm>
             <bpm:process-definitions></bpm:process-definitions>
             <bpm:pageflow-definitions>
             <value>shop_wizard.jpdl.xml</value>
             </bpm:pageflow-definitions>
             </bpm:jbpm>
            
            


            could the disabled transaction be a reason for my described problem?

            cheers,
            sven

            • 3. Re: Pageflow: Illegal Navigation Error

              you need to be on step1.xhtml before you start the pageflow

              • 4. Re: Pageflow: Illegal Navigation Error

                http://docs.jboss.com/seam/2.0.0.GA/reference/en/html/jbpm.html#d0e5301

                If we are beginning the pageflow during the RENDER_RESPONSE phase—during a @Factory or @Create method, for example—we consider ourselves to be already at the page being rendered, and use a <start-page> node as the first node in the pageflow, as in the example above.

                But if the pageflow is begun as the result of an action listener invocation, the outcome of the action listener determines which is the first page to be rendered. In this case, we use a <start-state> as the first node in the pageflow, and declare a transition for each possible outcome:

                • 5. Re: Pageflow: Illegal Navigation Error
                  skanky78

                  first of all, thank you for your reply! :)

                  i have several entry-points (link to the same wizard from different pages) from where the wizard is called. how could i map this in jpdl?

                  <?xml version="1.0"?>
                  
                  <pageflow-definition
                   xmlns="http://jboss.com/products/seam/pageflow"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xsi:schemaLocation=
                   "http://jboss.com/products/seam/pageflow http://jboss.com/products/seam/pageflow-2.0.xsd"
                   name="createShop">
                  
                   <start-page name="step1" view-id="/pages/shop/step1.xhtml" >
                   <redirect/>
                   <transition name="next" to="step2"/>
                   <transition name="cancel" to="cancel"/>
                   </start-page>
                  
                   <page name="step2" view-id="/pages/shop/step2.xhtml">
                   <redirect/>
                   <transition name="next" to="step3"/>
                   <transition name="cancel" to="cancel" />
                   </page>
                  
                   <page name="step3" view-id="/pages/shop/step3.xhtml">
                   <redirect/>
                   <transition name="next" to="step4"/>
                   <transition name="cancel" to="cancel" />
                   </page>
                  
                   <page name="step4" view-id="/pages/shop/step4.xhtml">
                   <redirect/>
                   <transition name="cancel" to="cancel"/>
                   <transition name="complete" to="complete" />
                   </page>
                  
                   <page name="complete" view-id="/pages/shop/complete.xhtml">
                   <end-conversation/>
                   <redirect/>
                   </page>
                  
                   <page name="cancel" view-id="/pages/index.xhtml">
                   <end-conversation before-redirect="true"/>
                   <redirect/>
                   </page>
                  
                  </pageflow-definition>


                  how can i start the wizard from other pages like otherpage1.xhml and otherpage2.xhml? maybe define multiple start-pages?

                  cheers,
                  sven

                  • 6. Re: Pageflow: Illegal Navigation Error
                    tjakopec

                    I have the same problem, but only on some pages! Any one know how to fix this?

                    • 7. Re: Pageflow: Illegal Navigation Error
                      pmuir

                      You can only define a single entry point with a pageflow, sorry.

                      • 8. Re: Pageflow: Illegal Navigation Error
                        tjakopec

                         

                        "pete.muir@jboss.org" wrote:
                        You can only define a single entry point with a pageflow, sorry.


                        I really don't understand what you mean :(

                        I did a little digging, and this is my findings:

                        I have two pageflows, "Radna mjesta" and "Kriteriji". On one pageflows I get illegal navigation, on other nothing.

                        Radna mjesta pageflow
                        <pageflow-definition xmlns="http://jboss.com/products/seam/pageflow"
                         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                         xsi:schemaLocation="http://jboss.com/products/seam/pageflow http://jboss.com/products/seam/pageflow-1.2.xsd"
                         name="radnoMjesto">
                        
                         <start-page name="radnoMjesto"
                         view-id="/kadrovska/maticni/sifarnici/radnoMjesto/PregledRadnoMjesto.jsp"
                         timeout="1800000">
                         <redirect />
                         <description>
                         #{messages['kadrovska.maticni.sifarnik.radnoMjesto.pregled']}
                         </description>
                        
                         </start-page>
                        
                        
                        
                        </pageflow-definition>
                        



                        Kriteriji pageflow

                        <pageflow-definition xmlns="http://jboss.com/products/seam/pageflow"
                         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                         xsi:schemaLocation="http://jboss.com/products/seam/pageflow http://jboss.com/products/seam/pageflow-1.2.xsd"
                         name="kriterij">
                        
                         <start-page name="kriterij"
                         view-id="/kadrovska/maticni/sifarnici/kriterij/PregledKriterij.jsp"
                         timeout="1800000">
                         <redirect />
                         <description>
                         #{messages['kadrovska.maticni.sifarnik.kriterij.pregled']}
                         </description>
                        
                         </start-page>
                        
                        
                        </pageflow-definition>
                        



                        This is the way I call this pageflows (via value binding)


                        <t:dataList id="lista" var="p" value="#{oper.poslovi}" layout="orderedList">
                        <s:link view="#{p.link}"
                        pageflow="#{p.pageflow}" propagation="begin"
                        styleClass="posaoKatalog" value="#{p.naziv.naziv}" />
                        </t:dataList>
                        


                        When I call Radna mjesta I get illegal navigation, and when I call Kriteriji everything is fine.


                        I try to put s:link without value binding and then everything is fine. No illegal navigation on Radna Mjesta

                        <s:link view="/kadrovska/maticni/sifarnici/radnoMjesto/PregledRadnoMjesto.jsp"
                        pageflow="radnoMjesto" propagation="begin"
                        styleClass="posaoKatalog" value="Radna mjesta" />
                        
                        <s:link view="/kadrovska/maticni/sifarnici/kriterij/PregledKriterij.jsp"
                        pageflow="kriterij" propagation="begin"
                        styleClass="kriterij" value="Kriteriji" />
                        


                        At the end of this post I will like to ask for help on this issue. What should I do to stop getting illegal navigation.

                        Thanks!

                        • 9. Re: Pageflow: Illegal Navigation Error
                          pmuir

                           

                          i have several entry-points (link to the same wizard from different pages) from where the wizard is called. how could i map this in jpdl?


                          I was answering this. But I guess this isn't your problem, and because you just posted on an old topic you got the wrong answer. Try starting a *new* topic and clearly explain *your* problem.