Interface IWorkflowEventHandler

All Superinterfaces:
IActivatableWorkflowObject, IWorkflowObject, Serializable
All Known Implementing Classes:
AbstractEventSourceWorkflowEventHandler, AbstractWorkflowEventHandler, BadMailWorkflowEventHandler, DataGroupWorkflowEventHandler, FileSystemWorkflowEventHandler, GlobalTimerWorkflowEventHandler, GroovyScriptWorkflowEventHandler, IMAPMessageWorkflowEventHandler, IxBrokerWorkflowEventHandler, JMSWorkflowEventHandler, MaildirWorkflowEventHandler, MQTTWorkflowEventHandler, NoopWorkflowEventHandler, SessionLoginWorkflowEventHandler, TimerActionWorkflowEventHandler, TimerJobCompletionWorkflowEventHandler, TimerJobSchedulingWorkflowEventHandler, UDPDatagramWorkflowEventHandler, UserWorkflowEventHandler

public interface IWorkflowEventHandler extends IWorkflowObject, IActivatableWorkflowObject
This is the interface for workflow event handlers.

Classes that implement this interface should have the WorkflowEventHandler name suffix.

Since:
Intrexx 5.0.
  • Field Summary

    Fields inherited from interface de.uplanet.lucy.server.workflow.IWorkflowObject

    GUID_COMPARATOR
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the efferent transition of this workflow event handler.
    boolean
    Check if this workflow event handler is active or inactive.
    boolean
    Check if this workflow event handler is configured to handle external events, i.e.
    boolean
    isHandlerFor(IWorkflowEvent p_evt, de.uplanet.lucy.server.workflow.IWorkflowProcessingContext p_wfCtx)
    Check if this event handler may handle the given event.
    process(IWorkflowEvent p_evt, de.uplanet.lucy.server.workflow.IWorkflowProcessingContext p_wfCtx, de.uplanet.lucy.server.IProcessingContext p_ctx)
    Process a workflow event in the given context.
    void
    setActive(boolean p_bActive)
    Set this workflow event handler active or inactive.
    void
    Set the efferent transition of this workflow event handler.
    void
    setHandleExternalEvents(boolean p_bHandleExternalEvents)
    Set the external event handler property.

    Methods inherited from interface de.uplanet.lucy.server.workflow.IWorkflowObject

    getGuid
  • Method Details

    • getEfferentTransition

      WorkflowTransition getEfferentTransition()
      Get the efferent transition of this workflow event handler.
      Returns:
      The efferent transition, or null.
    • setEfferentTransition

      void setEfferentTransition(WorkflowTransition p_wfTransition)
      Set the efferent transition of this workflow event handler.
      Parameters:
      p_wfTransition - The transition to be set.
    • isActive

      boolean isActive()
      Check if this workflow event handler is active or inactive.

      See process(IWorkflowEvent, IWorkflowProcessingContext, IProcessingContext) for the general contract of the activation state.

      Specified by:
      isActive in interface IActivatableWorkflowObject
      Returns:
      The activation state of this workflow event handler.
    • setActive

      void setActive(boolean p_bActive)
      Set this workflow event handler active or inactive.

      See process(IWorkflowEvent, IWorkflowProcessingContext, IProcessingContext) for the general contract of the activation state.

      Specified by:
      setActive in interface IActivatableWorkflowObject
      Parameters:
      p_bActive - The new activation state to be set.
    • isHandleExternalEvents

      boolean isHandleExternalEvents()
      Check if this workflow event handler is configured to handle external events, i.e. events that are not created by other workflows, or the workflow engine itself.

      The default value of this property is true.

      Returns:
      true if this event handler handles external events, or false otherwise.
    • setHandleExternalEvents

      void setHandleExternalEvents(boolean p_bHandleExternalEvents)
      Set the external event handler property.
      Parameters:
      p_bHandleExternalEvents - The new value.
      See Also:
    • isHandlerFor

      boolean isHandlerFor(IWorkflowEvent p_evt, de.uplanet.lucy.server.workflow.IWorkflowProcessingContext p_wfCtx)
      Check if this event handler may handle the given event.

      This method should return false if this event handler's state is inactive.

      Note: despite this method returns true the event handler is not required to return its efferent transition when process is being called.

      Parameters:
      p_evt - The event.
      p_wfCtx - The workflow processing context.
      Returns:
      true if this event handler may process this event, or false otherwise.
    • process

      WorkflowTransition process(IWorkflowEvent p_evt, de.uplanet.lucy.server.workflow.IWorkflowProcessingContext p_wfCtx, de.uplanet.lucy.server.IProcessingContext p_ctx) throws InterruptedException, Exception
      Process a workflow event in the given context.

      This method is called by the workflow engine if a call to isHandlerFor returned true. However this method is not required to return a non-null efferent transition in such cases.

      A workflow event handler must return null if it is not active.

      Parameters:
      p_evt - The event to be processed.
      p_wfCtx - The workflow processing context.
      p_ctx - The processing context.
      Returns:
      The efferent transition, or null.
      Throws:
      InterruptedException - If processing of this event handler has been interrupted.
      Exception - If an error occurred.