6 Replies Latest reply on Jan 5, 2006 3:43 AM by theute

    New stuff in CVS

    gavin.king

      So, if you take a look in CVS today, you will find the following new features:

      * Workspace management (conversation switcher/conversation list/breadcrumbs)
      * Nested conversations
      * The PAGE scope
      * jPDL pageflows
      * Massively better jBPM integration
      - including support for JSF-EL expressions inside jPDL
      * Support for Seam requests via any servlet (Ajax/SOAP/etc)

      In addition, you really should check out the following demos:

      * The revised DVD Store Demo, showing off the new jBPM-related features
      * The new issue tracker demo, showing off nested conversations and workspace management

      So, we are very close to delivering on the promised functionality of Seam 1.0. The big missing piece is Portal.

      I will attempt to explain these new features in blogs over the next week or so, as I update the docs for 1.0 beta 2.

      Hope you guys like it :)

        • 1. Re: New stuff in CVS
          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

            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

              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

                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

                  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

                    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)