diff --git a/spring-webflow-reference/src/flow-definition-field-mappings.xml b/spring-webflow-reference/src/flow-definition-field-mappings.xml new file mode 100644 index 00000000..d9659d73 --- /dev/null +++ b/spring-webflow-reference/src/flow-definition-field-mappings.xml @@ -0,0 +1,1126 @@ + + + Flow Definition Language 1.0 to 2.0 Mappings + + The flow definition language has changed since the 1.0 release. + This is a listing of the language elements in the 1.0 release, and how they convert to element in the 2.0 release. + While most of the changes are semantic, there are a few structural changes. + Please see the upgrade guide for more details about changes between Web Flow 1.0 and 2.0. + + + Mappings + + + + + + + + + + + + SWF 1.0 + + + SWF 2.0 + + + Comments + + + + + + + action + + + * + + + use evaluate + + + + + bean + + + * + + + + + name + + + * + + + + + method + + + * + + + + + + + action-state + + + action-state + + + + + id + + + id + + + + + * + + + parent + + + + + + + argument + + + * + + + arguments can be used in evaluate + + + + + expression + + + + + parameter-type + + + + + + + attribute + + + attribute + + + + + name + + + name + + + + + type + + + type + + + + + value + + + value + + + + + + + attribute-mapper + + + * + + + input/output can be in flow/subflow directly + + + + + bean + + + * + + + now subflow-state subflow-attribute-mapper + + + + + + + bean-action + + + * + + + use evaluate + + + + + bean + + + * + + + + + name + + + * + + + + + method + + + * + + + + + + + decision-state + + + decision-state + + + + + id + + + id + + + + + * + + + parent + + + + + + + end-actions + + + on-end + + + + + + + end-state + + + end-state + + + + + id + + + id + + + + + view + + + view + + + + + * + + + parent + + + + + * + + + commit + + + + + + + entry-actions + + + on-entry + + + + + + + evaluate-action + + + evaluate + + + + + expression + + + expression + + + + + name + + + * + + + use attribute name=”name” + + + + + * + + + result + + + + + * + + + result-type + + + + + + + evaluation-result + + + * + + + use result attribute on evaluate + + + + + name + + + * + + + + + scope + + + * + + + + + + + exception-handler + + + exception-handler + + + + + bean + + + bean + + + + + + + exit-actions + + + on-exit + + + + + + + flow + + + flow + + + + + * + + + start-state + + + + + * + + + parent + + + + + * + + + abstract + + + + + + + global-transitions + + + global-transitions + + + + + + + if + + + if + + + + + test + + + test + + + + + then + + + then + + + + + else + + + else + + + + + + + import + + + bean-import + + + + + resource + + + resource + + + + + + + inline-flow + + + * + + + convert to top level flow + + + + + id + + + * + + + + + + + input-attribute + + + input + + + + + name + + + name + + + + + scope + + + * + + + prefix name with scope, ie flowScope.foo + + + + + required + + + required + + + + + * + + + type + + + + + * + + + value + + + + + + + input-mapper + + + * + + + input can be in flow/subflow directly + + + + + + + mapping + + + input or output + + + + + source + + + name or value + + + name when in flow element, value when in subflow-state element + + + + + target + + + name or value + + + name when in flow element, value when in subflow-state element + + + + + target-collection + + + * + + + no longer supported + + + + + from + + + * + + + detected automatically + + + + + to + + + type + + + + + required + + + required + + + + + + + method-argument + + + * + + + use evaluate + + + + + + + method-result + + + * + + + use evaluate + + + + + name + + + * + + + + + scope + + + * + + + + + + + output-attribute + + + output + + + + + name + + + name + + + + + scope + + + * + + + prefix name with scope, ie flowScope.foo + + + + + required + + + required + + + + + * + + + type + + + + + * + + + value + + + + + + + output-mapper + + + * + + + output can be in flow/subflow directly + + + + + + + render-actions + + + on-render + + + + + + + set + + + set + + + + + attribute + + + name + + + + + scope + + + * + + + prefix name with scope, ie flowScope.foo + + + + + value + + + value + + + + + name + + + * + + + use attribute name=”name” + + + + + * + + + type + + + + + + + start-actions + + + on-start + + + + + + + start-state + + + * + + + now attribute on flow, or implicit + + + + + idref + + + * + + + + + + + subflow-state + + + subflow-state + + + + + id + + + id + + + + + flow + + + subflow + + + + + * + + + parent + + + + + * + + + subflow-attribute-mapper + + + + + + + transition + + + transition + + + + + on + + + on + + + + + on-exception + + + on-exception + + + + + to + + + to + + + + + * + + + bind + + + + + + + value + + + value + + + + + + + var + + + var + + + + + name + + + name + + + + + class + + + class + + + + + scope + + + * + + + always flow scope + + + + + bean + + + * + + + no longer supported + + + + + + + view-state + + + view-state + + + + + id + + + id + + + + + view + + + view + + + + + * + + + parent + + + + + * + + + redirect + + + + + * + + + popup + + + + + * + + + model + + + + + * + + + history + + + + + + + * + + + persistence-context + + + + + + + * + + + render + + + + + * + + + fragments + + + + + + + * + + + secured + + + + + * + + + attributes + + + + + * + + + match + + + + +
+
diff --git a/spring-webflow-reference/src/spring-webflow-reference.xml b/spring-webflow-reference/src/spring-webflow-reference.xml index 79531737..6daf75d2 100644 --- a/spring-webflow-reference/src/spring-webflow-reference.xml +++ b/spring-webflow-reference/src/spring-webflow-reference.xml @@ -7,6 +7,8 @@ + + ]> @@ -70,5 +72,7 @@ ⪙ &flow-security; &flow-inheritance; + &upgrade-guide; + &flow-definition-field-mappings; diff --git a/spring-webflow-reference/src/upgrade-guide.xml b/spring-webflow-reference/src/upgrade-guide.xml new file mode 100644 index 00000000..ecf388cf --- /dev/null +++ b/spring-webflow-reference/src/upgrade-guide.xml @@ -0,0 +1,221 @@ + + + Upgrading from 1.0 + + Flow Definition Language + + Flow Definition Updater Tool + + An automated tool is available to aid in the conversion of existing 1.0 flows to the new 2.0 syntax. + The tool will convert all the old tag names into their new equivalents, if needed. + While the tool will make a best effort attempt at conversion, there is not a one-to-one mapping for all 1.0 concepts. + If the tool was unable to convert a portion of the flow, it will be marked with a WARNING comment in the resulting flow. + + + The conversion tool requires spring-webflow.jar, spring-core.jar and an XSLT 1.0 engine. + Xalan 2.7.1 or later is strongly recommended. + + + The tool can be run from the command line with the following command. + Required libraries must be available on the classpath. + The source must be a single flow to convert. + The resulting converted flow will be sent to standard output. + + +java org.springframework.webflow.engine.model.builder.xml.WebFlowUpgrader flowToUpgrade.xml + + + Flow Definition Updater Tool Warnings + + argument parameter-type no longer supported + + Bean actions have been deprecated in favor of EL based evaluate expressions. + The EL expression is able to accept method parameters directly, so there is no longer a need for the argument tag. + A side effect of this change is that method arguments must be of the correct type before invoking the action. + + + + inline-flow is no longer supported + + Inline flow are no longer supported. + The contents of the inline flow must be moved into a new top-level flow. + The inline flow's content has been converted for your convenience. + + + + mapping target-collection is no longer supported + + Output mappings can no longer add an item to a collection. + Only assignment is supported. + + + + var bean is no longer supported + + The var bean attribute is no longer needed to allow the flow access to a spring bean. + All spring beans can be resolved via EL. + + + + var scope is no longer supported + + The var element will automatically place all variable into flow scope. + Conversation scope was previously allowed. + + + + + + EL Expressions + + EL expressions are used heavily throughout the flow definition language. + Many of the attributes that appear to be plain text are actually interpreted as EL. + The standard EL delimiters (either ${} or #{}) are not necessary and will often cause an exception if they are included. + + + EL delimiters may need to be removed manually from the converted flow. + + + + + Web Flow Configuration + + In Web Flow 1.0 there were two options available for configuring Web Flow, with standard spring bean or with the webflow config schema. + The schema configuration option simplifies the configuration process keeping long internal class name hidden and contextual auto-complete. + The schema configuration option is the standard way to configure Web Flow 2.0 + + + Web Flow Bean Configuration + + The bean configuration method used in Web Flow 1.0 is no longer supported. + The schema configuration method should be used instead. + In particular beans defining FlowExecutorFactoryBean and XmlFlowRegistryFactoryBean should be updated. + Continue reading Web Flow Schema Configuration for details. + + + + Web Flow Schema Configuration + + The configuration schema has change slightly in 2.0. + The simplest way to update your application is modify the version of the schema to 2.0 then fix any errors. + The most common change is add 'flow-' to the name of elements defined by the schema. + + + ]]> + + flow-executor + + The flow executor is the core of Web Flow. + This element replaces previous bean definitions for FlowExecutorFactoryBean. + + + ]]> + + + flow-execution-listeners + + Flow execution listeners are also defined in the flow executor. + Listeners are defined using standard bean definitions and added by reference. + + + + + + + + + ]]> + + + flow-registry + + The flow-registry contains a set of flow-locations. + Every flow definition used by Web Flow must be added to the registry. + This element replaces previous bean definitions for XmlFlowRegistryFactoryBean. + + + + + ]]> + + + + Flow Controller + + The package name for flow controllers has changed from org.springframework.webflow.executor.mvc.FlowController and is now org.springframework.webflow.mvc.servlet.FlowController for Servlet MVC requests. + The portlet flow controller org.springframework.webflow.executor.mvc.PortletFlowController has been replaced by a flow handler adapter available at org.springframework.webflow.mvc.portlet.FlowHandlerAdapter. + It will need to be updated in the bean definitions. + + + The flowExecutor can no longer be set via a mutator. + It must be set as a constructor argument. + + + + + ]]> + + + Flow Request URL Handler + + The default URL handler has changed in Web Flow 2.0. + The flow identifier is now inferred from the URL rather then passed explicitly. + In order to maintain comparability with existing views and URL structures using Web Flow 1.0 a ParameterBasedFlowUrlHandler is available. + + + + + + ]]> + + + Custom View Resolvers + + + + Web Flow Concepts + + OGNL vs EL + + Web Flow 1.0 used OGNL exclusively for expressions within the flow definitions. + Web Flow 2.0 adds support for Unified EL. + United EL is used when it is available, OGNL will continue to be used when a Unified EL implementation is not available. + + + + Flash Scope + + + External Redirects + + + Views + + Views are handled differently in Web Flow 2.0. + Previously, Web Flow returned a reference to the view to render. + Then a view resolver would render the view. + Web Flow 2.0 will both select and render views. + + + + JavaServer Faces + + + Automatic Model Binding + + + \ No newline at end of file