• Post Reply Bookmark Topic Watch Topic
  • New Topic

Similarities between Faces Flows and Spring Web Flow

 
Mehmet Salgar
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

a while ago I wrote a blog discussion the difficulties we encounter with JSF when we have too much Ajax functionality which can be found here.

https://mehmetsalgar.wordpress.com/2014/05/22/extremely-ajaxified-web-application-with-spring-webflow-primefaces-and-state-machines/

In the mentioned project in this blog I used Spring Web Flow to satisfy some requirements but now that development of the Spring Web Flow stopped I like to check what Faces Flows can present to satisfy the same requirements.

From a quick look similarities between Spring Web Flow and Faces Flows are obvious but there is one specific point I like to ask.

In SWF it is possible to define flowing element at the beginning of an flow.



which will trigger an event when you will start executing a flow, I look to the Faces Flows flow descriptors but I can see an element that fullify similar requirement.

Can anybody tell me a similar functionality built into the Faces Flow or not?

And is there a way to configure Faces Flows that it reacts to events from the users like the following.



Thanks in advance.
 
Tim Holloway
Bartender
Posts: 18408
58
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think probably the closest approximation to built-in workflow notifications in JSF are what you'd get using Conversation Scope.

The idea of being notified when something validates in JSF is meaningless. JSF validates all incoming values in a single lifecycle stage. If any of those values fails to validate, the appropriate errors are generated and the JSF lifecycle short-circuits. If, instead, all values validate, the next lifecycle phase runs any ValueChangeListeners that may have been assigned (for values that have changed), followed by posting the changed values to the Model (backing bean). You could employ a phase listener to run when the lifecycle advanced to the next phase, that's about it.
 
Mehmet Salgar
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The event I mention is attached to the lifecycle of the flow not to the JSF.

So what I was expecting Faces Flow being so similar to the SWF it will also raise en event when a flow starts.
 
Tim Holloway
Bartender
Posts: 18408
58
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSF, as originally conceived was based on the idea of working with individual HTML form pages.

Workflows - where a sequence of related pages is processed - was not a primary design goal.

Since, in the real world, multiple pages is probably more common than not, some efforts have been made to support the workflow concept. But as far as I am concerned, there's a long way to go before JSF handles that smoothly.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!