Spring Webflow 1.0 Rc4 Upgrade Guide

User Manual:

Open the PDF directly: View PDF PDF.
Page Count: 5

DownloadSpring-webflow-1.0-rc4-upgrade-guide Upgrade-guide
Open PDF In BrowserView PDF
Spring Web Flow 1.0 RC4 Upgrade Guide
By Keith Donald and Erwin Vervaet

As the final release candidate before Spring Web Flow 1.0 final, Spring Web Flow 1.0
RC4 introduces powerful new features such as render actions (1), evaluate actions (2),
set actions (3), flow execution attributes (4), and flash scope (5). It provides enhanced
documentation, better flow definition validation, smart defaults, and a complete custom
Spring 2.0 configuration schema for configuring the flow execution engine.
On the road to a generally available 1.0 final release in the Spring 2.0 final timeframe,
Spring Web Flow 1.0 RC4 also introduces several user affecting changes. This upgrade
guide exists to communicate those changes and support users in an upgrade.
We sincerely appreciate your patience on the road to Spring Web Flow 1.0. Because of
your feedback to date we can say confidently Spring Web Flow is the most powerful and
complete UI flow engine available today. We also believe 1.0 RC4 is the strongest and
most stable release to date and that you will experience why we believe that when you
work with it.
The main user affecting changes begin on the next page, ordered by their relevance.

1. Flow definitions now use XML schema instead of XML DTD.
Previous:





Now:





Note: the XSD support requires Xerces 2 on JDK 1.4 or JDK 5.
2. Bean (POJO) Action XML has changed.
Previous:





Now:









3. A stable public API has been extracted from the more-volatile flow execution
engine. As a result, 1.0 RC3 public APIs such as the RequestContext have
been moved around.
Recommendation: when upgrading to 1.0 RC4 run a fresh Organize Imports on your
Spring Web Flow types such as Actions to import relocated types from their new
locations.
4. Some signatures on the RequestContext have changed.

- public Flow getActiveFlow() throws IllegalStateException;
+ public FlowDefinition getActiveFlow() throws IllegalStateException;
Flow definition is an extracted interface part of the stable definition package. “Flow” is now the default FlowDefinition
implementation part of the more volatile engine and encapsulated.
- public State getCurrentState() throws IllegalStateException;
+ public StateDefinition getCurrentState() throws IllegalStateException;
State definition is an extracted interface part of the stable definition package. “State” is now the base StateDefinition
implementation part of the more volatile engine and encapsulated.
- public AttributeMap getRequestScope();
+ public MutableAttributeMap getRequestScope();
In 1.0 RC3, Attribute was a class and part of the root webflow package. Now, MutableAttributeMap is an extracted interface part of
the stable core.collection package. “AttributeMap” is its superinterface also part of the core.collection package. Core map operations
such as get and put are the same. The map implementation is encapsulated.
- public AttributeMap getFlowScope();
+ public MutableAttributeMap getFlowScope();
The same notes above apply.
- public AttributeMap getConversationScope();
+ public MutableAttributeMap getConversationScope();
The same notes above apply.

5. Some system defaults have changed.
FormAction.formErrorsScope
- ScopeType.REQUEST
+ ScopeType.FLOW
alwaysRedirectOnPause
- false
+ true
repositoryType
- simple (default)
+ continuation

6. The way you configure the Spring Web Flow system has changed.
Previous on Spring 1.2.8:













Now on Spring 1.2.8:









If you are using Spring 2.0 you can take advantage of the new webflow-config XSD:










This is generally recommended as it gives you auto-complete and better validation. This
form is Spring 2.0 only.
7. Transition event id matching expressions are now case sensitive.
This may affect your flow definitions if you were mixing case between event ids in your
flows with those returned from actions or views. In the Spring Web Flow samples,
numberguess was affected:
- 
+ 

… as the criteria for transition was the GuessResult JDK 5 enum, whose enum names
were all caps.
Did we miss documenting something that affected you?
- Visit http://forum.springframework.org to tell us about it. We will amend
this document.
- We also recommend you review the sample applications, reference manual,
and change log.
References
(1)

render actions are always executed before a view (response) is rendered.

(2)

evaluate-actions evaluate expressions against the state of the flow. Expressions
can retrieve property values, invoke methods, etc. Evaluation results can drive
state transitions and can be exposed to the flow automatically.

(3)

set-actions set flow variable values during the course of flow execution. You may
set values in any supported scope: request, flash, flow, or conversation.

(4)

User-assigned attributes may influence flow execution behavior. The
“alwaysRedirectOnPause” attribute forces a redirect each time an execution
pauses, to achieve POST+REDIRECT+GET automatically.

(5)

Data placed in flash scope lives through the current request and the next request
into the active flow session. Flash scope is shorter than flow scope but longer than
request scope.



Source Exif Data:
File Type                       : PDF
File Type Extension             : pdf
MIME Type                       : application/pdf
PDF Version                     : 1.3
Linearized                      : No
Page Count                      : 5
Producer                        : AFPL Ghostscript 8.51
Create Date                     : 2006:09:27 03:26:55-04:00
Modify Date                     : 2006:09:27 03:26:55-04:00
Title                           : spring-webflow-1.0-rc4-upgrade-guide
Creator                         : PDFCreator Version 0.8.1
Author                          : Keith
EXIF Metadata provided by EXIF.tools

Navigation menu