-
1. Re: New stuff in CVS
gavin.king Jan 3, 2006 1:23 PM (in response to gavin.king)By the way, here is an example of a page flow:
<process-definition name="shopping"> <start-state name="start"> <transition to="browse"/> </start-state> <page name="browse" view-id="/browse.xhtml"> <transition name="browse" to="browse"/> <transition name="checkout" to="checkout"/> </page> <page name="checkout" view-id="/checkout.xhtml"> <transition name="checkout" to="checkout"/> <transition name="complete" to="complete"/> </page> <page name="complete" view-id="/complete.xhtml"> <end-conversation /> </page> </process-definition>
This replaces the role of JSF navigation rules, for applications with complex user interactions.
But you can do more than that - Here is an example where the page flow also takes on the role of calling actions:<process-definition name="shopping"> <start-state name="start"> <transition to="browse"/> </start-state> <page name="browse" view-id="/browse.xhtml"> <transition name="addToCart" to="browse"> <action expression="#{cart.add}" /> </transition> <transition name="checkout" to="checkout"/> </page> <page name="checkout" view-id="/checkout.xhtml"> <transition name="update" to="checkout"> <action expression="#{cart.update}" /> </transition> <transition name="complete" to="validate"/> </page> <decision name="validate" expression="#{cart.purchase}"> <transition name="success" to="complete"/> <transition name="failed" to="checkout"/> </decision> <page name="complete" view-id="/complete.xhtml"> <end-conversation /> </page> </process-definition>
In this case, your action listeners would no longer be known to the view. The view would only know the logical transition names in the jPDL file. -
2. Re: New stuff in CVS
gavin.king Jan 3, 2006 1:24 PM (in response to gavin.king)And here is an example of a business process definition:
<process-definition name="OrderManagement"> <start-state> <transition to="decide"/> </start-state> <decision name="decide" expression="#{orderApproval.howLargeIsOrder}"> <transition name="large order" to="approval"/> <transition name="small order" to="process"/> </decision> <task-node name="approval"> <task name="approve"> <assignment pooled-actors="reviewers" /> </task> <transition name="approve" to="process"/> <transition name="reject" to="complete"/> </task-node> <task-node name="process"> <task name="ship"> <assignment pooled-actors="#{shipperAssignment.pooledActors}" /> </task> <transition name="shipped" to="complete"> <action expression="#{afterShipping.log}"/> </transition> </task-node> <end-state name="complete"/> </process-definition>
See how we are using basically the same language for orchestrating conversational user interactions as for orchestrating long-running, persistent, multi-user business processes. -
3. Re: New stuff in CVS
gavin.king Jan 4, 2006 10:39 AM (in response to gavin.king)One more new thing:
A number of people have complained about the use of postbacks in the demos. This is the natural mode of operation for JSF, however, JSF does support redirect-after-post by sticking<redirect />
in the navigation rules.
Unfortunately, this would break Seam 1.0 beta 1 because the conversation context did not get propagated across a browser redirect.
This is now solved. All you need to do is install a servlet filter, and Seam will propagate its conversation id across all redirects. This means the refresh and forward buttons work transparently, and the address bar displays the correct URL. I've actually updated the booking demo to use redirects, since so many people complained about that.
You can even do redirects from jPDL pageflow, using:<page name="browse" view-id="/browse.xhtml" redirect="true"> ... </page>
Hope this is helpful. -
4. Re: New stuff in CVS
robjellinghaus Jan 4, 2006 8:29 PM (in response to gavin.king)How much work would it be to make all the samples run outside JBoss? i.e. create noejb versions of the dvdstore, issuetracker, etc.?
Also, what's the process for submitting patches? JIRA?
Cheers!
Rob -
5. Re: New stuff in CVS
gavin.king Jan 4, 2006 10:20 PM (in response to gavin.king)Should not be much work I guess. It's mainly futzing with build scripts, which is absolutely not My Thing. I suck at Ant almost as much as a suck at bash.
Yep, patches can go in JIRA. Feature/design discussions can take place here for now, so that everyone can contribute if they like.
Cheers mate... -
6. Re: New stuff in CVS
theute Jan 5, 2006 3:43 AM (in response to gavin.king)Rob, y
ou can still make the dvdstore working outside JBoss while using EJB. (We just have scripts to make booking and noejb work in Tomcat)