6 Replies Latest reply on Jan 24, 2006 8:19 AM by Gavin King

    User request for "outcome" out of pageflow

    Timo Schnölzer Newbie

      Hi all,

      my pageflow is running fine and i wonder how to solve the following:

      user is in a conversation (with pageflow) and clicks on a generell link (e.g. from header -> settings or myAccount).

      This raises an exception like:

      08:46:07,578 ERROR StandardWrapperValve : Servlet.service() for servlet Faces Servlet threw exception
      org.jbpm.JbpmException: couldn't signal without specifying a leaving transition : transition is null


      how can i disallow this in a general manner???

      Thx for ANY help

      Timo

        • 1. Re: User request for
          Gavin King Master

          OK, so this is a link which is supposed to be exiting the conversation, right?

          Then either:

          (1) Make it an ordinary <a href=...>... or a <h:outputLink ...> </h:outputLink>

          (2) Specify <f:param name="conversationId" value="new"/> inside the <h:commandLink ... />

          The basic idea here is that if you want to do ad hoc navigation, you need to get back outside of the conversation, since the conversation is "busy" executing a pageflow?

          Does that solve your problem?

          (If it doesn't let me know and I will make whatever changes are needed to make the navigation stuff more flexible.)

          • 2. Re: User request for
            Timo Schnölzer Newbie

            Hi Gavin,

            the case is that i have a running conversation, e.g. booking a hotel with three pages. now, the user is on the 2nd page.
            now the page has some generell ad hoc! navigations out of the conversation scope. when user clicks on e.g. settings, i get the above error.
            i was looking for a kind of ifOutcomeInvalid(outcome="confirmEndOfConversationOrProceedOutcome") annotation on class level.

            Otherwise i see not a elegant way to block user requests out of "busy" conversation flows.

            thx for input

            Timo

            • 3. Re: User request for
              Gavin King Master

              Oh ok, this is interesting.

              So:

              (1) you *do* want to leave the conversation scope, as I suggested

              (2) but you want to present the user a challenge screen *first*

              Well, this seems doable, let me see. It's too late for me to test this idea, so it might not be perfect, but please try it:

              First, write a link that breaks out of the conversation, but remembers the conversationId as a parameter:

              <h:outputLink value="challengePage.jsp">
               <f:param name="oldConversationId" value="#{conversation.id}"/>
              </h:outputLink>


              Then, on the challenge page, let the user go back to the conversation, like so:

              <h:outputLink>
               <f:param name="conversationId" value="#{param['oldConversationId']}"/>
              </h:outputLink>


              I *think* that Seam will then automagically force you back to the original view-id that you came from. (If not, we'll need to do a teensy bit more work.)

              Does that make sense?

              Let me know if it solves your problem.



              • 4. Re: User request for
                Timo Schnölzer Newbie

                Hi G.

                my problem is not solved.

                My Pageflow is doing fine and the response is rendering the correct pages using pageflow via jbpm.

                <pageflow-definition xmlns="urn:jboss.org:seam-pageflow-1.0"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xsi:schemaLocation="urn:jboss.org:seam-pageflow-1.0 http://www.jboss.com/products/seam/seam-pageflow-1.0.xsd"
                name="timoflow">

                <start-state name="start">
                <transition to="timo1"/>
                </start-state>

                <page name="timo1" view-id="/timo1.xhtml" redirect="true">
                <transition name="timo2" to="timo2"/>
                </page>

                <page name="timo2" view-id="/timo2.xhtml" redirect="true">
                <transition name="timo3" to="timo3"/>
                </page>

                <page name="timo3" view-id="/timo3.xhtml" redirect="true">
                <transition name="timo4" to="timo4"/>
                </page>

                <page name="timo4" view-id="/timo4.xhtml" redirect="true">
                <end-conversation />
                </page>

                </pageflow-definition>


                now when i use a link which is not addressed in the pageflow, (again like MyAccount or Settings) I get to error:

                08:46:07,578 ERROR StandardWrapperValve : Servlet.service() for servlet Faces Servlet threw exception
                org.jbpm.JbpmException: couldn't signal without specifying a leaving transition : transition is null


                which i can understand. these links are aviable in the whole application as these are located in the header - and in case of my stateful navigation in one usecase i am getting the error.

                How can i catch this???

                my understanding would be:

                use a annotation in the pageflow starting class like:

                ifOutcomeInvalid(outcome="confirmEndOfConversationOrProceedWithCorrectOutcome")

                Is there any solution for avoiding the error in a way???



                • 5. Re: User request for
                  Timo Schnölzer Newbie

                  my pageflow.xml was not pasted in the right way:

                  <pageflow-definition xmlns="urn:jboss.org:seam-pageflow-1.0"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xsi:schemaLocation="urn:jboss.org:seam-pageflow-1.0 http://www.jboss.com/products/seam/seam-pageflow-1.0.xsd"
                   name="timoflow">
                  
                   <start-state name="start">
                   <transition to="timo1"/>
                   </start-state>
                  
                   <page name="timo1" view-id="/timo1.xhtml" redirect="true">
                   <transition name="timo2" to="timo2"/>
                   </page>
                  
                   <page name="timo2" view-id="/timo2.xhtml" redirect="true">
                   <transition name="timo3" to="timo3"/>
                   </page>
                  
                   <page name="timo3" view-id="/timo3.xhtml" redirect="true">
                   <transition name="timo4" to="timo4"/>
                   </page>
                  
                   <page name="timo4" view-id="/timo4.xhtml" redirect="true">
                   <end-conversation />
                   </page>
                  
                  </pageflow-definition>


                  • 6. Re: User request for
                    Gavin King Master

                     

                    now when i use a link which is not addressed in the pageflow, (again like MyAccount or Settings) I get to error:



                    What does your link look like?

                    It was to be an <h:outputLink> like I posted above. NOT an <h:commandLink> which would propagate the conversation context.

                    Did you read carefully what I wrote?