public interface FlowDefinition extends Annotated
A flow definition is a reusable, self-contained controller module that defines a blue print for an executable user task. Flows typically orchestrate controlled navigations or dialogs within web applications to guide users through fulfillment of a business process/goal that takes place over a series of steps, modeled as states.
Structurally a flow definition is composed of a set of states. A state
is a point in a flow
where a behavior is executed; for example, showing a view, executing an action, spawning a subflow, or terminating
the flow. Different types of states execute different behaviors in a polymorphic fashion. Most states are
transitionable states
, meaning they can respond to events by taking the flow
from one state to another.
Each flow has exactly one start state
which defines the starting point of the program.
This interface exposes the flow's identifier, states, and other definitional attributes. It is suitable for introspection by tools as well as user-code at flow execution time.
Flow definitions may be annotated with attributes.
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Destroy this flow definition, releasing any resources.
|
org.springframework.context.ApplicationContext |
getApplicationContext()
Returns a reference to application context hosting application objects and services used by this flow definition.
|
java.lang.ClassLoader |
getClassLoader()
Returns the class loader used by this flow definition to load classes.
|
java.lang.String |
getId()
Returns the unique id of this flow.
|
java.lang.String[] |
getPossibleOutcomes()
Returns the outcomes that are possible for this flow to reach.
|
StateDefinition |
getStartState()
Return this flow's starting point.
|
StateDefinition |
getState(java.lang.String id)
Returns the state definition with the specified id.
|
boolean |
inDevelopment()
Returns true if this flow definition is currently in development (running in development mode).
|
getAttributes, getCaption, getDescription
java.lang.String getId()
StateDefinition getStartState()
StateDefinition getState(java.lang.String id) throws java.lang.IllegalArgumentException
id
- the state idjava.lang.IllegalArgumentException
- if a state with this id does not existjava.lang.String[] getPossibleOutcomes()
java.lang.ClassLoader getClassLoader()
org.springframework.context.ApplicationContext getApplicationContext()
boolean inDevelopment()
void destroy()