Class DecisionState
java.lang.Object
org.springframework.webflow.core.AnnotatedObject
org.springframework.webflow.engine.State
org.springframework.webflow.engine.TransitionableState
org.springframework.webflow.engine.DecisionState
- All Implemented Interfaces:
Annotated
,StateDefinition
,TransitionableStateDefinition
A simple transitionable state that when entered will execute the first transition whose matching criteria evaluates
to
true
in the context
of the current request.
A decision state is a convenient, simple way to encapsulate reusable state transition logic in one place.
- Author:
- Keith Donald
-
Field Summary
Fields inherited from class org.springframework.webflow.core.AnnotatedObject
CAPTION_PROPERTY, DESCRIPTION_PROPERTY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
doEnter
(RequestControlContext context) Specialization of State'sdoEnter
template method that executes behavior specific to this state type in polymorphic fashion.Methods inherited from class org.springframework.webflow.engine.TransitionableState
appendToString, exit, getExitActionList, getRequiredTransition, getTransition, getTransitions, getTransitionSet, handleEvent
Methods inherited from class org.springframework.webflow.engine.State
doPreEntryActions, enter, equals, getEntryActionList, getExceptionHandlerSet, getFlow, getId, getOwner, handleException, hashCode, isStartState, isViewState, toString
Methods inherited from class org.springframework.webflow.core.AnnotatedObject
getAttributes, getCaption, getDescription, setCaption, setDescription
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.springframework.webflow.core.Annotated
getAttributes, getCaption, getDescription
Methods inherited from interface org.springframework.webflow.definition.StateDefinition
getId, getOwner, isViewState
-
Constructor Details
-
DecisionState
Creates a new decision state.- Parameters:
flow
- the owning flowstateId
- the state identifier (must be unique to the flow)- Throws:
IllegalArgumentException
- when this state cannot be added to given flow, e.g. because the id is not unique
-
-
Method Details
-
doEnter
Specialization of State'sdoEnter
template method that executes behavior specific to this state type in polymorphic fashion.Simply looks up the first transition that matches the state of the context and executes it.
- Specified by:
doEnter
in classState
- Parameters:
context
- the control context for the currently executing flow, used by this state to manipulate the flow execution- Throws:
FlowExecutionException
- if an exception occurs in this state
-