10 Replies Latest reply on Mar 30, 2006 8:14 AM by kcounsell

    jBPM and the back button

    liudan2005

      I'm considering using jBPM with Seam as we've got a lot of pageflows and processes to deal with. Had a look at Seam doc and noticed back button won't be supported if jbpm is used.

      Is it gonna be easy to enable back button with jbpm? If this is gonna take a lot of effort to implement, I'd rather simply use JSF navigation rules.

        • 1. Re: jBPM and the back button
          tom.baeyens

          that shouldn't be too hard. you should build a mapping of the view-id's to the jbpm page nodes. and before the jbpm page navigation is activated, the token should be positioned in the node of the view id represented by the request.

          i'm not sure, but i believe that the view-ids were the page node names. in that case, the mapping from viewId to pagenode is already available with processDefinition.getNode(viewId);

          • 2. Re: jBPM and the back button
            gavin.king

            Ah, yes, we should support this.

            Actually the name of the node is different to the view-id, since multiple nodes can point to the same page.

            What you would need to do is store the node name in the Seam PAGE scope. I'll add this to JIRA.

            What is the actual code to reposition the token? (I'm too lazy to check the docs.)

            • 3. Re: jBPM and the back button
              liudan2005

              I'm still not quite sure how to do it cause I'm not familiar with jBPM yet. It would be great if you can add the sample code to dvd example. From what you've described, we're now gonna adopt jBPM for our project. Thanks for your help.

              • 4. Re: jBPM and the back button
                tom.baeyens

                gavin,

                Token.setNode(Node)

                You might need ProcessDefinition.getNode(String name); to look up the node. But better is to put the node itself in the pagescope. All jBPM objects are serializable.

                • 5. Re: jBPM and the back button
                  gavin.king

                  Yes, i found it on the plane. I implemented optional backbutton support for pageflows ;)

                  • 6. Re: jBPM and the back button
                    gavin.king

                     

                    "liudan2005" wrote:
                    I'm still not quite sure how to do it cause I'm not familiar with jBPM yet. It would be great if you can add the sample code to dvd example. From what you've described, we're now gonna adopt jBPM for our project. Thanks for your help.


                    When I finish checking this into CVS, all you'll need to do is:

                    <page view-id="/foo.jsp" backable="true">
                     ...
                    </page>


                    • 7. Re: jBPM and the back button

                       

                      "gavin.king@jboss.com" wrote:

                      When I finish checking this into CVS, all you'll need to do is:

                      <page view-id="/foo.jsp" backable="true">
                       ...
                      </page>

                      Using "backable" might be a little confusing only because we have backing beans floating around in JSF world. Would "revisitable" be more descriptive?

                      It'll be a useful addition either way -- thanks for implementing this.

                      • 8. Re: jBPM and the back button
                        gavin.king

                        I don't love the name....

                        • 9. Re: jBPM and the back button
                          theute

                          I tend to agree with kcounsell. It was my first feeling when seeing "backable".

                          I would propose "backwardable" it's not a nice name though but it removes the confusion IMO.

                          • 10. Re: jBPM and the back button

                            I'm all for removing ambiguity. "Backwardable" seems clear enough.