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 Details

    • process

      ExitEvent process(IActionNodeDetails action) throws Exception
      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

      void onFlowAccessException(FlowAccessException exception)
      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

      void onFlowWillStart(IFlowDetails flow)
      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

      void onFlowStart(IFlowDetails flow)
      This method is invoked when the flow is started.
      Parameters:
      flow - The flow that is just started.
    • onConditionException

      void onConditionException(Exception error)
      Will be called when an exception during evaluation of a condition occurs.
      Parameters:
      error - The exception.
    • onFlowCompleted

      void onFlowCompleted(IFlowDetails flow)
      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

      void onFlowAborted(IFlowDetails flow)
      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

      void onFlowContinue(String flowName)
      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

      void onRepeatContextStart(IRepeatContext repeatContext)
      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

      void onRepeatContextEnd(IRepeatContext repeatContext)
      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

      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 call
      Parameters:
      exception - - The exception that was handled
      Since:
      11.0
    • processEvent

      void processEvent(IEventNodeDetails event)
      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