6 Replies Latest reply on Oct 1, 2008 9:42 PM by Ronald van Kuijk

    At end of task, return to "home" page?

    John Wooten Newbie

      I have modified the jbpm console to allow a click on the task instance number to display that task in the "home" area of the page. Upon completing the task, I would like for the "submit" button to end the task AND return the user to the "home" page. (It has a list of the task instances they can service). Also I'd like the "cancel" button to return to the home page.

      I'd appreciate any help in figuring out how to do this.

        • 1. Re: At end of task, return to
          Ronald van Kuijk Master

          it's all (basic) JSF...

          Secondly I do not hope you are building an end-user UI based on the console since that is not what it is intended for. Lot of changes comming up in the console e.g. a switch from JSF to GWT (do not ask me why).

          • 2. Re: At end of task, return to
            John Wooten Newbie

            Understand it's all basic JSF. Question is, which jsf tag and where to put it in order to have Cancel and Submit send the user back to the preset home.jsf?

            Yes, understand about the end-user, just no time at present as we are having to do a proof-of-concept to get the go-ahead to do the end-user UI.

            Would appreciate just a bit more info.

            Also, How do I prevent the "Comment" automatically following each task completion?

            • 3. Re: At end of task, return to
              John Wooten Newbie

              More,
              In task.xhtml we have a section in an <h:form>
              where <j4j:taskForm transitionTarget="#{transition}" which will cause the transition to occur and assign the task to the next actor. Then there is a <j4j:loadTask to cause the loading of the task unless the button pressed was 'cancel', Next follows the applyVariableMap, and then a mysterious <j4j:addComment. Now if I remove this, a comment is still added! It would appear as if that was the purpose of this statement, but alas!

              The a <j4j:completeTask. Now here is where I think something might be altered, but I don't know how. What does navigate="false" mean? what are the <n:nav outcome="cancel" redirect="true" storeMessages="true" statements doing?

              Is there a place where this is explained? I'd be glad to RTFM if I could locate one that had this translated in it!

              Thanks,

              • 4. Re: At end of task, return to
                Ronald van Kuijk Master

                 

                Is there a place where this is explained?

                no, sorry

                I'd be glad to RTFM


                I know ;-)

                if I could locate one that had this translated in it!
                Fat change, since it was not intended to be end-user targeted with these kinds of specific wishes.

                the jsf4jbpm code and to some extend the gravel code is your best option to see what realy happens

                btw building a custom ui for a processdefinition with seam/jsf is fairly quick.

                Personally, I'd leave the 'back to home' out in the demo and just mention that it will be in there in the final version. I did that once and had no problem at all with this customer.


                • 5. Re: At end of task, return to
                  John Wooten Newbie

                  On the tasks.xhtml page I found the section where there was a view="form" and changed the
                  <n:nav input="submit" to use a url="home.jsf" />
                  <n:nav input="cancel" to use a url="home.jsf" />
                  and removed the redirect="true"
                  This causes the task to go back to the home.jsf when completed.
                  Also added a button to the comment page so that if you clicked "Cancel" it went directly to the home page.
                  The Save button on that page also goes directly to home after saving the comment.

                  • 6. Re: At end of task, return to
                    Ronald van Kuijk Master

                    great to hear.. congratulations.

                    Personally, I still like some of the j4j tags to be extended, documented and used e.g. in seam to be able to have a kind of seam-gen-jbpm which generates a nice app for a forkflow.