views:

509

answers:

2

Hello,

I'm new to the Spring MVC Framework and Webflow, and ofcourse, I've been thrown on a project involving these technologies. I'm having a problem that I can't get answered on the Spring website forums, so I thought I'd check with the smart people on this forum.

I have a view (i.e. screen) which when I exit, I want to go to different screens depending on the event that caused me to exit. So, I basically have multiple "transition on" statements for the various event. So far so good. The problem occurs when I perform multiple "evaluate expressions" within each of these transitions. I get very unpredictable results. It almost seems that sometime only the first evaluate gets executed and my app hangs. The samples and documentation I've referenced are very simple in nature. Generally, they don't evaluate expressions with transitions. However, I need to set up variables specific to the screen I'm going to.

I know there are action and decision state tags, but I run into similiar problems when I insert multple "expression evaluates."

Can anyone offer any insights on how to what I'm trying to accomplish?

For the record, I'm working on a new project where most of the people are new to web development. We're "refreshing" our major product from an older, client server architecture to a new web based version. So, I have no resources here to go to help. The 2 people here who supposedly know a little about web flow seem stumped too. I suspect when I was told to just "use their sample code" I am attempting to emulate code from people who weren't sure of what they were doing either.

Thanks

Frank

A: 

Well, I don't think you are providing enough information. But transitions and evaluate have only one way of working:

http://static.springsource.org/spring-webflow/docs/2.0.x/reference/htmlsingle/spring-webflow-reference.html#view-transitions

When you execute transition actions the transition will not be executed if any of them return false. So, the result of a transition cannot be unpredictable. It can be executed or not, depending on transition actions, binding and validation.

If you check your logs you will probably see a bit better where is the problem. Maybe there is a binding error, or the actions are throwing errors. Do you have any exception message to throw some light at this.

A: 

Another thing worth to mention is that within a transition, if the evaluate expression return false, it will skip the rest. So if you need to execute multiple commands, you may need to consider using 'set', action-states, and/or decision states.

Nhut Le