Class GroovyScriptWorkflowEventHandler

java.lang.Object
de.uplanet.lucy.server.workflow.eventhandler.AbstractWorkflowEventHandler
de.uplanet.lucy.server.workflow.eventhandler.GroovyScriptWorkflowEventHandler
All Implemented Interfaces:
IActivatableWorkflowObject, ICustomConfigurableWorkflowObject, IGroovyConfigurableWorkflowObject, INamedWorkflowObject, INeedWorkflow, INeedWorkflowDirectory, IWorkflowEventHandler, IWorkflowObject, Serializable

public final class GroovyScriptWorkflowEventHandler extends AbstractWorkflowEventHandler implements INeedWorkflowDirectory, IGroovyConfigurableWorkflowObject
See Also:
  • Constructor Details

    • GroovyScriptWorkflowEventHandler

      public GroovyScriptWorkflowEventHandler(String p_strGuid)
  • Method Details

    • getEventHandling

      public de.uplanet.lucy.workflow.PRI_SUB_EVENT_HANDLING getEventHandling()
    • setEventHandling

      public void setEventHandling(de.uplanet.lucy.workflow.PRI_SUB_EVENT_HANDLING p_eventHandling)
    • getWorkflowDirectory

      public Path getWorkflowDirectory()
      Description copied from interface: INeedWorkflowDirectory
      Get the workflow directory.
      Specified by:
      getWorkflowDirectory in interface INeedWorkflowDirectory
      Returns:
      The workflow directory.
    • setWorkflowDirectory

      public void setWorkflowDirectory(Path p_dir)
      Description copied from interface: INeedWorkflowDirectory
      Set the workflow directory.
      Specified by:
      setWorkflowDirectory in interface INeedWorkflowDirectory
      Parameters:
      p_dir - The workflow directory.
    • getScriptPath

      public String getScriptPath()
      Get the path of the Groovy script.
      Returns:
      The path of the Groovy script.
    • setScriptPath

      public void setScriptPath(String p_strScript)
      Set the path of the Groovy script.
      Parameters:
      p_strScript - The path of the Groovy script.
    • isCacheCompiledScript

      public boolean isCacheCompiledScript()
      Description copied from interface: IGroovyConfigurableWorkflowObject
      This flag controls whether compiled Groovy script classes should be cached or not.

      The default value is true.

      Specified by:
      isCacheCompiledScript in interface IGroovyConfigurableWorkflowObject
      Returns:
      true if compiled Groovy script classes should be cached, or false otherwise.
    • setCacheCompiledScript

      public void setCacheCompiledScript(boolean p_bCacheCompiledScript)
      Description copied from interface: IGroovyConfigurableWorkflowObject
      This flag controls whether compiled Groovy script classes should be cached or not.
      Specified by:
      setCacheCompiledScript in interface IGroovyConfigurableWorkflowObject
      Parameters:
      p_bCacheCompiledScript - true if compiled Groovy script classes should be cached, or false otherwise.
    • isDisablePrintOutput

      public boolean isDisablePrintOutput()
      Description copied from interface: IGroovyConfigurableWorkflowObject
      This flag controls whether script standard output (println etc.) should be suppressed or not.
      Specified by:
      isDisablePrintOutput in interface IGroovyConfigurableWorkflowObject
      Returns:
      true if script standard output should be suppressed, or false otherwise.
    • setDisablePrintOutput

      public void setDisablePrintOutput(boolean p_bDisablePrintOutput)
      Description copied from interface: IGroovyConfigurableWorkflowObject
      This flag controls whether script standard output (println etc.) should be suppressed or not.
      Specified by:
      setDisablePrintOutput in interface IGroovyConfigurableWorkflowObject
      Parameters:
      p_bDisablePrintOutput - true if script standard output should be suppressed, or false otherwise.
    • getCustomProperties

      public Map<String,String> getCustomProperties()
      Description copied from interface: ICustomConfigurableWorkflowObject
      Get the custom properties.
      Specified by:
      getCustomProperties in interface ICustomConfigurableWorkflowObject
      Returns:
      The custom properties.
    • setCustomProperties

      public void setCustomProperties(Map<String,String> p_customProperties)
      Description copied from interface: ICustomConfigurableWorkflowObject
      Set the custom properties.
      Specified by:
      setCustomProperties in interface ICustomConfigurableWorkflowObject
      Parameters:
      p_customProperties - The custom properties to be set (must not be null).
    • getHandledEventClasses

      public List<String> getHandledEventClasses()
    • setHandledEventClasses

      public void setHandledEventClasses(List<String> p_handledEventClasses)
    • isHandlerFor

      public boolean isHandlerFor(IWorkflowEvent p_evt, de.uplanet.lucy.server.workflow.IWorkflowProcessingContext p_wfCtx)
      Description copied from interface: IWorkflowEventHandler
      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.

      Specified by:
      isHandlerFor in interface IWorkflowEventHandler
      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

      public WorkflowTransition process(IWorkflowEvent p_evt, de.uplanet.lucy.server.workflow.IWorkflowProcessingContext p_wfCtx, de.uplanet.lucy.server.IProcessingContext p_ctx) throws Exception
      Description copied from interface: IWorkflowEventHandler
      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.

      Specified by:
      process in interface IWorkflowEventHandler
      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:
      Exception - If an error occurred.