org.springframework.webflow.executor
Interface FlowExecutor

All Known Implementing Classes:
FlowExecutorImpl

public interface FlowExecutor

The central facade and entry-point service interface into the Spring Web Flow system for driving the executions of flow definitions. This interface defines a coarse-grained system boundary suitable for invocation by most clients.

Implementations of this interface abstract away much of the internal complexity of the web flow execution subsystem, which consists of launching and resuming managed flow executions from repositories.

Author:
Keith Donald

Method Summary
 ResponseInstruction launch(java.lang.String flowDefinitionId, ExternalContext context)
          Launch a new execution of identified flow definition in the context of the current external client request.
 ResponseInstruction refresh(java.lang.String flowExecutionKey, ExternalContext context)
          Reissue the last response instruction issued by the flow execution.
 ResponseInstruction resume(java.lang.String flowExecutionKey, java.lang.String eventId, ExternalContext context)
          Resume an existing, paused flow execution by signaling an event against its current state.
 

Method Detail

launch

ResponseInstruction launch(java.lang.String flowDefinitionId,
                           ExternalContext context)
                           throws FlowException
Launch a new execution of identified flow definition in the context of the current external client request.

Parameters:
flowDefinitionId - the unique id of the flow definition to launch
context - the external context representing the state of a request into Spring Web Flow from an external system
Returns:
the starting response instruction
Throws:
FlowException - if an exception occured launching the new flow execution

resume

ResponseInstruction resume(java.lang.String flowExecutionKey,
                           java.lang.String eventId,
                           ExternalContext context)
                           throws FlowException
Resume an existing, paused flow execution by signaling an event against its current state.

Parameters:
flowExecutionKey - the identifying key of a paused flow execution that is waiting to resume on the occurrence of a user event
eventId - the user event that occured
context - the external context representing the state of a request into Spring Web Flow from an external system
Returns:
the next response instruction
Throws:
FlowException - if an exception occured resuming the existing flow execution

refresh

ResponseInstruction refresh(java.lang.String flowExecutionKey,
                            ExternalContext context)
                            throws FlowException
Reissue the last response instruction issued by the flow execution. This is a logical refresh operation that allows the "current response" to be re-issued. This operation is idempotent and does not affect the state of the flow execution.

Parameters:
flowExecutionKey - the identifying key of a paused flow execution that is waiting to resume on the ocurrence of a user event
context - the external context representing the state of a request into Spring Web Flow from an external system
Returns:
the current response instruction
Throws:
FlowException - if an exception occured retrieving the current response instruction


Copyright © 2004-2007. All Rights Reserved.