-
1. Re: Stateful behaviour jPDL [Back button error!]
theute Jun 27, 2006 8:07 AM (in response to simonbb)I just fixed the problem you faced in the number guess example.
You can see the back-button disabled in any conversation, try the DVD registration or the booking example. -
2. Re: Stateful behaviour jPDL [Back button error!]
simonbb Jun 27, 2006 12:45 PM (in response to simonbb)But whats about the other problem DVD-Store back-end (also a bug)? e.g. on your demo-website:
http://dvdstore.demo.jboss.com
-Do an order with e.g. user1
-Go to the back-end
-choose order-management3
-assign an open order
- click ship
- enter a tracking number and click ship
and after that click back.. and it's still possible to go back and click
ship ... after that following happens: see Error below
And I don't understand.. this should not be possible ..
Per Default back button actions are disabled in JPDL /JBPM workflows or
not?
As long I don't use back="enabled" it should work? or is there a back="disabled" (I don't see a disabled in the Documentation).exception
javax.servlet.ServletException: /ship.xhtml @54,101 value="#{ship.track}":
$Proxy370
org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:58)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
root cause
javax.servlet.ServletException: /ship.xhtml @54,101 value="#{ship.track}":
$Proxy370
javax.faces.webapp.FacesServlet.service(FacesServlet.java:121)
org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:30)
org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:45)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
... -
3. Re: Stateful behaviour jPDL [Back button error!]
theute Jun 27, 2006 12:53 PM (in response to simonbb)Yes there is a bug that you found on the DVDdemo store, please report it on Jira. It seems related on back button when a conversation ends on a stateful session bean.
There is no back="enabled" in that example, so if a user click on back and try to ship again, it should bring the user to the page he was before clicking back (without "shipping" again). But again, there is a bug on that particular case that we need to fix.
By default back is disabled. -
4. Re: Stateful behaviour jPDL [Back button error!]
norman.richards Jun 28, 2006 12:11 PM (in response to simonbb)Actually, the back button is working ok in this case. The actual fundamental problem here is that BusinessProcessInterceptor and the @EndTask annotation. The EndTask throws an exception because there is no task associated with that method, even though though the conversational interceptor did the right thing and redirected. I opened JBSEAM-287 for this issue.
There are some other things in the ship task that don't play nicely with the back button. I'll fix up the DVD store examples tonight to illustrate how to better deal with back button. -
5. Re: Stateful behaviour jPDL [Back button error!]
gavin.king Jun 28, 2006 12:13 PM (in response to simonbb)Actually, I think we have several related issues here, eg:
http://jira.jboss.com/jira/browse/JBSEAM-284 -
6. Re: Stateful behaviour jPDL [Back button error!]
gavin.king Jun 28, 2006 2:51 PM (in response to simonbb)"thomas.heute@jboss.com" wrote:
I just fixed the problem you faced in the number guess example.
You can see the back-button disabled in any conversation, try the DVD registration or the booking example.
This actually resulted from a Bad bug in Seam where redirects that occurred during the RESTORE_VIEW phase (such as illegal navigation redirects) were causing Seam to not clean up properly after itself. Very Bad!
Anyway, fixed now in CVS. Hopefully I did not break something else ;-) -
7. Re: Stateful behaviour jPDL [Back button error!]
gavin.king Jul 1, 2006 7:12 AM (in response to simonbb)This thread motivated me to go off and fix a bunch of related problems. I think if you try out the CVS version of the DVD store, you'll be much happier with how it handles backbuttoning ;-)
Thanks :) -
8. Re: Stateful behaviour jPDL [Back button error!]
marcobuss Jul 6, 2006 10:09 AM (in response to simonbb)I`m also very interesting in handling the backbuttoning.
How is Seam recognisees the use of the Back-Button? -
9. Re: Stateful behaviour jPDL [Back button error!]
jcalvert Jul 6, 2006 11:27 AM (in response to simonbb)I built the HEAD from CVS of Seam and rebuilt the DVD store application. I was in fact able to produce a bug:
1) Add two different titles to the cart.
2) Open the cart in two different windows/tabs.
3) In the first window/tab, check 'Remove' on the top title, then click the update button.
4) Go to the second window/tab where both titles still show. Set the quantity of the first title, (the one that was just deleted) to some value, IE 10, and click update.
5) The page refreshes showing the second product with the quantity you just attempted to set on the first.
Perhaps this sounds like bizzare behavior to execute on the application. However I'm evaluating Seam as a framework for a re-write of a very workflow oriented web app. The thing that caught my interest was the idea of conversationing to prevent odd things from happening due to back button use as we have many non-savvy users that don't listen to "don't do that". Bizzare things like that happen daily.
I understand part of it is that the DVD store application is supposed to be a simple demo, but if there's some way I could modify it such that the application was smart as to the illegality of the action, and handled it properly, that would be great. A big challenge for the application I'm developing on is going back and coding for each individual illegal type action. If it could somehow sense "this person tried to step back in the conversation" elegantly, that would be great! -
10. Re: Stateful behaviour jPDL [Back button error!]
theute Jul 6, 2006 11:36 AM (in response to simonbb)That's the expected behavior in that scenario since the shopping cart is bound to the Session. (not in a conversation).
If you look at other places (like the registration part or the booking demo) where it is using a conversation this would not happen.If it could somehow sense "this person tried to step back in the conversation" elegantly
It does it. -
11. Re: Stateful behaviour jPDL [Back button error!]
jcalvert Jul 6, 2006 12:05 PM (in response to simonbb)Would it be reasonable to make the shopping cart (or any other actionable list of items) conversational as opposed to session bound? In other words such that each hit to the shopping cart is part of a single conversation. Is there a reason why one would not want to do this?
There's a similar behavior in the booking demo, as far as having two windows open looking at "Current Bookings" and then canceling one, and then in the other window attempting to cancel that same booking inadvertantly cancels the other. However, the code shows the BookingListAction to be SESSION scope, so I assume that's why. -
12. Re: Stateful behaviour jPDL [Back button error!]
theute Jul 6, 2006 12:10 PM (in response to simonbb)"jcalvert" wrote:
Would it be reasonable to make the shopping cart (or any other actionable list of items) conversational as opposed to session bound? In other words such that each hit to the shopping cart is part of a single conversation. Is there a reason why one would not want to do this?
You could"jcalvert" wrote:
There's a similar behavior in the booking demo, as far as having two windows open looking at "Current Bookings" and then canceling one, and then in the other window attempting to cancel that same booking inadvertantly cancels the other. However, the code shows the BookingListAction to be SESSION scope, so I assume that's why
Unless i misunderstand the scenario, that would be the expected behavior no ? -
13. Re: Stateful behaviour jPDL [Back button error!]
jcalvert Jul 6, 2006 12:10 PM (in response to simonbb)It might bear adding that the problem I'm thinking of is users in a web application using the back button to go to a previously rendered page that no longer accurately reflects the state of the data. This would be simple enough by simply stamping the page with a sequence to make sure it's not stale, but it's required that we not prohibit the user to make a valid action from that stale page.
-
14. Re: Stateful behaviour jPDL [Back button error!]
theute Jul 6, 2006 12:20 PM (in response to simonbb)Try this: http://dvdstore.demo.jboss.com/new_account.seam
You can see there that if a user press back button (go to a stale page) and try to resubmit the form, Seam detects it and we display an error message (for the sake of showing this in an example)
You can also accept that a user uses the back button in the pageflow (to correct himself), look at the documentation.