org.springframework.webflow.execution
Interface FlowExecutionStorage

All Known Implementing Classes:
ClientContinuationFlowExecutionStorage, HttpSessionContinuationFlowExecutionStorage, HttpSessionFlowExecutionStorage

public interface FlowExecutionStorage

Storage strategy for flow executions. A flow execution manager uses this interface to load and save flow executions.

Note that the flow execution storage strategy can have an impact on application transaction management for a flow execution. For instance, the default application transaction synchronization implementation (FlowScopeTokenTransactionSynchronizer) uses a simple synchronizer token stored in the flow scope, which implies that there is a single flow execution for an application transaction. Some flow execution storage strategies (like ClientContinuationFlowExecutionStorage) create copies (clones) of a flow execution to enable free browsing in a flow. Those strategies are not compatible with the default application transaction implementation. Usually this is not a problem since free browing is not really compatible with any kind of transactional semantics. If required, you can always plug in another transaction synchronizer, e.g. one that stores a transaction token in the database, no longer requiring a single flow execution per application transaction.

Author:
Erwin Vervaet, Keith Donald
See Also:
FlowExecutionManager, FlowExecution

Method Summary
 FlowExecution load(java.io.Serializable id, Event requestingEvent)
          Load an existing flow execution, identified by given unique id, from the storage.
 void remove(java.io.Serializable id, Event requestingEvent)
          Remove the identified flow execution from the storage.
 java.io.Serializable save(java.io.Serializable id, FlowExecution flowExecution, Event requestingEvent)
          Save given flow execution in the storage.
 

Method Detail

load

FlowExecution load(java.io.Serializable id,
                   Event requestingEvent)
                   throws NoSuchFlowExecutionException,
                          FlowExecutionStorageException
Load an existing flow execution, identified by given unique id, from the storage.

Parameters:
id - the unique id of the flow execution, as returned by the save method
requestingEvent - the event requesting the load of the flow execution
Returns:
the loaded flow execution
Throws:
NoSuchFlowExecutionException - when there is no flow execution with specified id in the storage
FlowExecutionStorageException - when there is a technical problem accessing the flow execution storage

save

java.io.Serializable save(java.io.Serializable id,
                          FlowExecution flowExecution,
                          Event requestingEvent)
                          throws FlowExecutionStorageException
Save given flow execution in the storage.

Parameters:
id - the unique id of the flow execution, or null if the flow execution does not yet have an id (e.g. was not previously saved)
requestingEvent - the event requesting the save of the flow execution
flowExecution - the flow execution to save
Returns:
the unique id that actually identifies the saved flow execution, this could be different from the id passed into the method
Throws:
FlowExecutionStorageException - when there is a technical problem accessing the flow execution storage

remove

void remove(java.io.Serializable id,
            Event requestingEvent)
            throws FlowExecutionStorageException
Remove the identified flow execution from the storage.

Parameters:
id - the unique id of the flow execution, as returned by the save method
requestingEvent - the event requesting the remove of the flow execution
Throws:
FlowExecutionStorageException - when there is a technical problem accessing the flow execution storage


Copyright © 2005. All Rights Reserved.