A transitionable state that spawns a subflow when executed. When the subflow
this state spawns ends, the ending result is used as grounds for a state
transition out of this state.
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
FlowAttributeMapper interface definition for more information on how
to do this. The logic for ending a subflow is located in the
EndState implementation.
See Also:org.springframework.webflow.engine.FlowAttributeMapper See Also:org.springframework.webflow.engine.EndState author: Keith Donald author: Erwin Vervaet
Constructor Summary
public
SubflowState(Flow flow, String id, Flow subflow) Create a new subflow state.
Parameters: flow - the owning flow Parameters: id - the state identifier (must be unique to the flow) Parameters: subflow - the subflow to spawn throws: IllegalArgumentException - when this state cannot be added to givenflow, e.g.
doEnter(RequestControlContext context) Specialization of State's doEnter template method that
executes behaviour specific to this state type in polymorphic fashion.
onEvent(RequestControlContext context) Called on completion of the subflow to handle the subflow result event as
determined by the end state reached by the subflow.
Create a new subflow state.
Parameters: flow - the owning flow Parameters: id - the state identifier (must be unique to the flow) Parameters: subflow - the subflow to spawn throws: IllegalArgumentException - when this state cannot be added to givenflow, e.g. because the id is not unique See Also:SubflowState.setAttributeMapper(FlowAttributeMapper)
Specialization of State's doEnter template 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.
Parameters: context - the control context for the currently executing flow, usedby this state to manipulate the flow execution a view selection containing model and view information needed torender the results of the state execution throws: FlowExecutionException - if an exception occurs in this state