Package com.aquima.interactions.flow
Interface IFlowHandler
- All Known Implementing Classes:
FlowHandler
public interface IFlowHandler
This interface should be implemented by the client using the flow engine to influence the behavior of the flow
engine. This interface contains methods to adjust the actual flow behavior (process & choose) and several methods
that will be invoked to notify the client of the current flow state.
- Since:
- 7.0
- Author:
- O. Kerpershoek, F. van der Meer
-
Method Summary
Modifier and TypeMethodDescriptionThis method returns the profile which is used to evaluate conditions during the flow evaluations.void
onConditionException
(Exception error) Will be called when an exception during evaluation of a condition occurs.void
onFlowAborted
(IFlowDetails flow) This method is invoked to notify the client that the flow with the specified name has been aborted.void
onFlowAccessException
(FlowAccessException exception) This method will be invoked when a flow could not be started due to a security exception.void
onFlowCompleted
(IFlowDetails flow) This method is invoked to notify the client that the flow with the specified name has completed.void
onFlowContinue
(String flowName) This method is invoked to notify the client that the flow with the specified name has continued.void
onFlowExceptionHandled
(FlowNodeException exception) Notifies the client that an exception in the flow has been handled by taking the exception exit of a service or function callvoid
onFlowStart
(IFlowDetails flow) This method is invoked when the flow is started.void
onFlowWillStart
(IFlowDetails flow) This method is invoked just before starting a flow.void
onRepeatContextEnd
(IRepeatContext repeatContext) This method is invoked to notify the client that a repeat context has ended for a subflow.void
onRepeatContextStart
(IRepeatContext repeatContext) This method is invoked to notify the client that a repeat context has started for a subflow.void
onRetry
(IRetryNodeDetails event) This method will be invoked when the flow engine encounters a retry event node in the flow.process
(IActionNodeDetails action) This method will be invoked when the flow engine encounters an action node in the flow.void
processEvent
(IEventNodeDetails event) This method will be invoked when the flow engine encounters an event node in the flow.
-
Method Details
-
process
This method will be invoked when the flow engine encounters an action node in the flow. The implementation of this method is responsible for the actual execution of the action based on the information provided by the action node.- Parameters:
action
- The action node that should be processed by the client.- Returns:
- The exit event which will map to an edge in the flow.
- Throws:
Exception
- This exception may be thrown by the handler when the processing of the action node fails.
-
onFlowAccessException
This method will be invoked when a flow could not be started due to a security exception. The client may choose to ignore the exception and continue with the flow, or re-throw the exception, in which case the flow will be aborted.- Parameters:
exception
- The security exception that was raised when attempting to start the flow.- Throws:
FlowException
- This exception may be thrown by the client to abort the flow.
-
onFlowWillStart
This method is invoked just before starting a flow. The implementation of the handler may perform some additional checks, and veto the start of the flow if needed by throwing a FlowAccessException.- Parameters:
flow
- The flow that will be started.- Throws:
FlowAccessException
- This exception may be IFlowNodeDetails to indicate the flow should NOT be started.
-
onFlowStart
This method is invoked when the flow is started.- Parameters:
flow
- The flow that is just started.
-
onConditionException
Will be called when an exception during evaluation of a condition occurs.- Parameters:
error
- The exception.
-
onFlowCompleted
This method is invoked to notify the client that the flow with the specified name has completed.- Parameters:
flow
- The details of the flow that has been completed.
-
onFlowAborted
This method is invoked to notify the client that the flow with the specified name has been aborted.- Parameters:
flow
- The details of the flow that has been aborted.
-
onFlowContinue
This method is invoked to notify the client that the flow with the specified name has continued.- Parameters:
flowName
- The name of the flow that has been continued.
-
getProfile
InferenceContext getProfile()This method returns the profile which is used to evaluate conditions during the flow evaluations.- Returns:
- An inference context which is used for condition evaluations.
-
onRepeatContextStart
This method is invoked to notify the client that a repeat context has started for a subflow.- Parameters:
repeatContext
- Contains information regarding the start of an iteration- Since:
- 8.3
-
onRepeatContextEnd
This method is invoked to notify the client that a repeat context has ended for a subflow.- Parameters:
repeatContext
- Contains information regarding the end of an iteration- Since:
- 8.3
-
onFlowExceptionHandled
Notifies the client that an exception in the flow has been handled by taking the exception exit of a service or function call- Parameters:
exception
- - The exception that was handled- Since:
- 11.0
-
processEvent
This method will be invoked when the flow engine encounters an event node in the flow. The implementation of this method is responsible for the actual execution of the event based on the information provided by the event node.- Parameters:
event
- The event node that should be processed by the client.- Since:
- 15.12
-
onRetry
This method will be invoked when the flow engine encounters a retry event node in the flow. The implementation of this method is responsible for the actual execution of the event based on the information provided by the retry event node.- Parameters:
event
- The retry event node that should be processed by the client.- Since:
- 17.5
-