This DTD defines the web flow XML syntax. Web flows capture the page flow in (part of) a web application.
XML documents that conform to this DTD should declare the following doctype:
<!DOCTYPE web-flow PUBLIC "-//ERVACON//DTD SPRING WEB FLOW//EN" "http://www.ervacon.com/dtd/web-flow.dtd">
DTD source: web-flow.dtd
| <web-flow> |
Defines the root element for a web flow definition. Web flows are composed of a number of states.
Element's model :
<web-flow>'s children Name Cardinality action-state Any number end-state Any number flow-state Any number start-state Only one view-state Any number
<web-flow>'s attributes Name Values Default name
(start-state,(action-state | view-state | flow-state | end-state)+)
| name | Attribute of web-flow |
Name of the web flow.
Required
| <start-state/> | Child of web-flow |
Defines the start state of the flow. This identifies the state where flow execution will begin.
<start-state>'s attributes Name Values Default state IDREF
This tag is always empty.
| state | Attribute of start-state |
Name of the first state of the flow.
Possible values : IDREF - Required
| <action-state> |
Defines an action state: a state where an action is executed. Transitions triggered by the action(s) lead on to other states.
Element's model :
<action-state>'s children Name Cardinality action At least one transition At least one
<action-state>'s attributes Name Values Default id ID
(action+,transition+)
| id | Attribute of action-state |
Unique id of an action state.
Possible values : ID - Required
| <view-state> |
Defines a view state: a state where a view will be rendered. Transitions triggered by the view lead on to other states.
Element's model :
<view-state>'s children Name Cardinality transition Any number
<view-state>'s attributes Name Values Default id ID view
(transition*)
| id | Attribute of view-state |
Unique id of a view state.
Possible values : ID - Required
| view | Attribute of view-state |
Name of the view that will be rendered. This is optional. When not present, the response should have been generated elsewhere, e.g. in an action of an action state.
| <flow-state> |
Defines a flow state: a state where another flow is executed. When the sub flow reaches an end state, the corresponding transition in this state is triggered to continue the flow.
Element's model :
<flow-state>'s children Name Cardinality transition Any number
<flow-state>'s attributes Name Values Default flow id ID model-mapper
(transition*)
| id | Attribute of flow-state |
Unique id of a flow state.
Possible values : ID - Required
| flow | Attribute of flow-state |
Name of the flow that will be rendered. This is the name of a bean in the application context associated with the flow controller.
Required
| model-mapper | Attribute of flow-state |
Optional name of a mapper that will map model data to and from the sub flow. This is the name of a bean in the application context associated with the flow controller.
| <end-state/> |
Defines an end state: a state that terminates the flow.
<end-state>'s attributes Name Values Default id ID view
This tag is always empty.
| id | Attribute of end-state |
Unique id of an end state.
Possible values : ID - Required
| view | Attribute of end-state |
Name of the view that will be rendered. This is optional.
| <transition/> | Child of action-state,view-state,flow-state |
Defines a transition to another state.
<transition>'s attributes Name Values Default name to IDREF
This tag is always empty.
| name | Attribute of transition |
Name of the transition. This name is of the form "[actionId'.']event". So the name of the event that will trigger the transition is prepended with the id of the action that signals the event. Both are cancatenated using a dot. So when you have an action with id "myAction" that signals an event "ok", the name of the corresponding transition should be "myAction.ok".
For the events signaled by a view state or a subflow state, no action is involved so the transition name is simply the name of the event that triggers the transition ("ok" in the previous example).
Required
| to | Attribute of transition |
Target state of the transition.
Possible values : IDREF - Required
| <action/> | Child of action-state |
Defines an action that is executed by the flow in an action state.
<action>'s attributes Name Values Default bean name
This tag is always empty.
| name | Attribute of action |
Name of the action.
Required
| bean | Attribute of action |
Name of the bean definition of the action in the application context hierarchy linked with the flow. This is similar to the <ref bean="myBean"/> notation of the Spring beans DTD.
Required