public class ActionState extends TransitionableState
If more than one action is configured they are executed in an ordered chain until one returns a result event that matches a state transition out of this state. This is a form of the Chain of Responsibility (CoR) pattern.
The result of an action's execution is typically the criteria for a transition out of this state. Additional
information in the current RequestContext
may also be tested as part of custom transitional criteria,
allowing for sophisticated transition expressions that reason on contextual state.
Action
CAPTION_PROPERTY, DESCRIPTION_PROPERTY
Constructor and Description |
---|
ActionState(Flow flow,
String id)
Creates a new action state.
|
Modifier and Type | Method and Description |
---|---|
ActionList |
getActionList()
Returns the list of actions executable by this action state.
|
Transition |
getRequiredTransition(RequestContext context)
Get a transition in this state for given flow execution request context.
|
exit, getExitActionList, getTransition, getTransitions, getTransitionSet, handleEvent
enter, equals, getEntryActionList, getExceptionHandlerSet, getFlow, getId, getOwner, handleException, hashCode, isStartState, isViewState, toString
getAttributes, getCaption, getDescription, setCaption, setDescription
getId, getOwner, isViewState
getAttributes, getCaption, getDescription
public ActionState(Flow flow, String id) throws IllegalArgumentException
flow
- the owning flowid
- the state identifier (must be unique to the flow)IllegalArgumentException
- when this state cannot be added to given flow, e.g. beasue the id is not uniquegetActionList()
public ActionList getActionList()
public Transition getRequiredTransition(RequestContext context) throws NoMatchingTransitionException
TransitionableState
getRequiredTransition
in class TransitionableState
NoMatchingTransitionException
- when a matching transition cannot be found