Package com.aquima.interactions.flow
Interface IFlowEngine
- All Known Implementing Classes:
FlowEngine
public interface IFlowEngine
This object contains all information on flows within an application.
This class is not serializable.
- Since:
- 5.0
- Author:
- O. Kerpershoek
-
Method Summary
Modifier and TypeMethodDescriptionboolean
allowFlowingOnErrors
(IFlowState flowState) Determines if flowing is allowed even if validation errors are present on current pagecontinueFlow
(IFlowState state, ExitEvent pageEvent, IFlowHandler handler, IDebugger debugger) This method will continue the flow from the point indicated by the flow state.This method returns an array containing all the available flows from the flow engine.getDcmWidgetFlowDefinition
(String flowName) Returns the definition of the DCM widget flow with the given name.getExternalFlowDefinition
(String flowName) Returns the definition of the external flow with the given name.This method returns a details object for the specified flow.getFlowCrawler
(InferenceContext profile) Creates an instance of a class that implements the visitor pattern to navigate the structure of the flowModel contained by this flow-enginegetFunctionFlowDefinition
(String flowName) This method will check if a function flow exists with the given name and return the related {IFunctionFlowDefinition
}revertToFlow
(String name, IFlowState state, IFlowHandler handler, IDebugger debugger) Revert the flow state to the flow node specified by name and start this flow.startFlow
(String name, IFlowHandler handler, IDebugger debugger) This method starts the flow indicated by the flow name with the specified flow handler.
-
Method Details
-
getAvailableFlows
IFlowDetails[] getAvailableFlows()This method returns an array containing all the available flows from the flow engine.- Returns:
- an array containing all the available flows from the flow engine.
-
getFlow
This method returns a details object for the specified flow. The name of the flow is not case sensitive.- Parameters:
flowName
- The name of the flow for which the details are requested.- Returns:
- The flow details for the specified flow name.
- Throws:
UnknownFlowException
- This exception is thrown when no flow with the specified name could be found.
-
startFlow
This method starts the flow indicated by the flow name with the specified flow handler.- Parameters:
name
- The name of the flow that should be started.handler
- The handler that should be used when processing the flow.debugger
- A debugger instance that is attached, may be null.- Returns:
- Object containing the path that was followed and the result node that was reached.
- Throws:
FlowException
- This exception is thrown when the flow could not be started.
-
revertToFlow
Revert the flow state to the flow node specified by name and start this flow. Returns null is the node is not found in the flow state. All flow nodes that are passed during revert will call the onFlowAborted method of the handler.- Parameters:
name
- The name of the flow that should be started.state
- The previous flow state.handler
- The handler that should be used when processing the flow.debugger
- A debugger instance that is attached, may be null.- Returns:
- Object containing the path that was followed and the result node that was reached.
- Throws:
FlowException
- This exception is thrown when the flow could not be started from the current flow state.
-
continueFlow
IFlowState continueFlow(IFlowState state, ExitEvent pageEvent, IFlowHandler handler, IDebugger debugger) This method will continue the flow from the point indicated by the flow state.- Parameters:
state
- The previous flow state from which the flow should continue.pageEvent
- The exit state for the last result node, which determines the next action in the flow engine.handler
- The handler that should be used when processing the flow.debugger
- A debugger instance that is attached, may be null.- Returns:
- Object containing the path that was followed and the result node that was reached.
- Throws:
FlowException
- This exception is thrown when the flow could not continue to the next result node.
-
getFunctionFlowDefinition
This method will check if a function flow exists with the given name and return the related {IFunctionFlowDefinition
}- Parameters:
flowName
- The name of the flow- Returns:
- Object containing the function flow definition
- Throws:
UnknownFlowException
- This exception is thrown when the flow does not existInvalidFunctionFlowException
- This exception is thrown when the flow does exist, but is not a function flow
-
getExternalFlowDefinition
Returns the definition of the external flow with the given name.- Parameters:
flowName
- the name of the external flow- Returns:
- the definition of the external flow
- Throws:
UnknownFlowException
- if no flow with the given name existsInvalidExternalFlowException
- if the flow with the given name is not an external flow
-
getDcmWidgetFlowDefinition
Returns the definition of the DCM widget flow with the given name.- Parameters:
flowName
- the name of the DCM widget flow- Returns:
- the definition of the DCM widget flow
- Throws:
UnknownFlowException
- if no flow with the given name existsInvalidDcmWidgetFlowException
- if the flow with the given name is not a DCM widget flow
-
allowFlowingOnErrors
Determines if flowing is allowed even if validation errors are present on current page- Parameters:
flowState
- current flowState of this session- Returns:
- boolean true if flowing can continue
-
getFlowCrawler
Creates an instance of a class that implements the visitor pattern to navigate the structure of the flowModel contained by this flow-engine- Parameters:
profile
- instance of InferenceContext, cannot be null- Returns:
- instance of FlowCrawler
-