public class SubflowState extends TransitionableState
A subflow state may be configured to map input data from its flow -- acting as the parent flow -- down to the subflow
when the subflow is spawned. In addition, output data produced by the subflow may be mapped up to the parent flow
when the subflow ends and the parent flow resumes. See the
SubflowAttributeMapper interface definition for
more information on how to do this. The logic for ending a subflow is located in the
|Constructor and Description|
Create a new subflow state.
|Modifier and Type||Method and Description|
Subclasses may override this hook method to print their internal state to a string.
Specialization of State's
Called on completion of the subflow to handle the subflow result event as determined by the end state reached by the subflow.
Set the attribute mapper used to map model data between the parent and child flow.
exit, getExitActionList, getRequiredTransition, getTransition, getTransitions, getTransitionSet
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
public SubflowState(Flow flow, java.lang.String id, Expression subflow) throws java.lang.IllegalArgumentException
flow- the owning flow
id- the state identifier (must be unique to the flow)
subflow- the subflow to spawn
java.lang.IllegalArgumentException- when this state cannot be added to given flow, e.g. because the id is not unique
public void setAttributeMapper(SubflowAttributeMapper attributeMapper)
protected void doEnter(RequestControlContext context) throws FlowExecutionException
doEntertemplate method that executes behaviour specific to this state type in polymorphic fashion.
Entering this state, creates the subflow input map and spawns the subflow in the current flow execution.
public boolean handleEvent(RequestControlContext context)
protected void appendToString(org.springframework.core.style.ToStringCreator creator)