public class DecisionState extends TransitionableState
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.
CAPTION_PROPERTY, DESCRIPTION_PROPERTY
Constructor and Description |
---|
DecisionState(Flow flow,
java.lang.String stateId)
Creates a new decision state.
|
Modifier and Type | Method and Description |
---|---|
protected void |
doEnter(RequestControlContext context)
Specialization of State's
doEnter template method that executes behavior specific to this state
type in polymorphic fashion. |
appendToString, exit, getExitActionList, getRequiredTransition, getTransition, getTransitions, getTransitionSet, handleEvent
doPreEntryActions, enter, equals, getEntryActionList, getExceptionHandlerSet, getFlow, getId, getOwner, handleException, hashCode, isStartState, isViewState, toString
getAttributes, getCaption, getDescription, setCaption, setDescription
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getId, getOwner, isViewState
getAttributes, getCaption, getDescription
public DecisionState(Flow flow, java.lang.String stateId) throws java.lang.IllegalArgumentException
flow
- the owning flowstateId
- the state identifier (must be unique to the flow)java.lang.IllegalArgumentException
- when this state cannot be added to given flow, e.g. because the id is not uniqueprotected void doEnter(RequestControlContext context) throws FlowExecutionException
doEnter
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.
doEnter
in class State
context
- the control context for the currently executing flow, used by this state to manipulate the flow
executionFlowExecutionException
- if an exception occurs in this state