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:
-
Field Summary
Fields inherited from interface de.uplanet.lucy.server.workflow.IWorkflowObject
GUID_COMPARATOR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the custom properties.de.uplanet.lucy.workflow.PRI_SUB_EVENT_HANDLINGGet the path of the Groovy script.Get the workflow directory.booleanThis flag controls whether compiled Groovy script classes should be cached or not.booleanThis flag controls whether script standard output (printlnetc.) should be suppressed or not.booleanisHandlerFor(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.voidsetCacheCompiledScript(boolean p_bCacheCompiledScript) This flag controls whether compiled Groovy script classes should be cached or not.voidsetCustomProperties(Map<String, String> p_customProperties) Set the custom properties.voidsetDisablePrintOutput(boolean p_bDisablePrintOutput) This flag controls whether script standard output (printlnetc.) should be suppressed or not.voidsetEventHandling(de.uplanet.lucy.workflow.PRI_SUB_EVENT_HANDLING p_eventHandling) voidsetHandledEventClasses(List<String> p_handledEventClasses) voidsetScriptPath(String p_strScript) Set the path of the Groovy script.voidsetWorkflowDirectory(Path p_dir) Set the workflow directory.Methods inherited from class de.uplanet.lucy.server.workflow.eventhandler.AbstractWorkflowEventHandler
getEfferentTransition, getGuid, getName, getWorkflow, isActive, isHandleExternalEvents, setActive, setEfferentTransition, setHandleExternalEvents, setName, setWorkflow
-
Constructor Details
-
GroovyScriptWorkflowEventHandler
-
-
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
Description copied from interface:INeedWorkflowDirectoryGet the workflow directory.- Specified by:
getWorkflowDirectoryin interfaceINeedWorkflowDirectory- Returns:
- The workflow directory.
-
setWorkflowDirectory
Description copied from interface:INeedWorkflowDirectorySet the workflow directory.- Specified by:
setWorkflowDirectoryin interfaceINeedWorkflowDirectory- Parameters:
p_dir- The workflow directory.
-
getScriptPath
Get the path of the Groovy script.- Returns:
- The path of the Groovy script.
-
setScriptPath
Set the path of the Groovy script.- Parameters:
p_strScript- The path of the Groovy script.
-
isCacheCompiledScript
public boolean isCacheCompiledScript()Description copied from interface:IGroovyConfigurableWorkflowObjectThis flag controls whether compiled Groovy script classes should be cached or not.The default value is
true.- Specified by:
isCacheCompiledScriptin interfaceIGroovyConfigurableWorkflowObject- Returns:
trueif compiled Groovy script classes should be cached, orfalseotherwise.
-
setCacheCompiledScript
public void setCacheCompiledScript(boolean p_bCacheCompiledScript) Description copied from interface:IGroovyConfigurableWorkflowObjectThis flag controls whether compiled Groovy script classes should be cached or not.- Specified by:
setCacheCompiledScriptin interfaceIGroovyConfigurableWorkflowObject- Parameters:
p_bCacheCompiledScript-trueif compiled Groovy script classes should be cached, orfalseotherwise.
-
isDisablePrintOutput
public boolean isDisablePrintOutput()Description copied from interface:IGroovyConfigurableWorkflowObjectThis flag controls whether script standard output (printlnetc.) should be suppressed or not.- Specified by:
isDisablePrintOutputin interfaceIGroovyConfigurableWorkflowObject- Returns:
trueif script standard output should be suppressed, orfalseotherwise.
-
setDisablePrintOutput
public void setDisablePrintOutput(boolean p_bDisablePrintOutput) Description copied from interface:IGroovyConfigurableWorkflowObjectThis flag controls whether script standard output (printlnetc.) should be suppressed or not.- Specified by:
setDisablePrintOutputin interfaceIGroovyConfigurableWorkflowObject- Parameters:
p_bDisablePrintOutput-trueif script standard output should be suppressed, orfalseotherwise.
-
getCustomProperties
Description copied from interface:ICustomConfigurableWorkflowObjectGet the custom properties.- Specified by:
getCustomPropertiesin interfaceICustomConfigurableWorkflowObject- Returns:
- The custom properties.
-
setCustomProperties
Description copied from interface:ICustomConfigurableWorkflowObjectSet the custom properties.- Specified by:
setCustomPropertiesin interfaceICustomConfigurableWorkflowObject- Parameters:
p_customProperties- The custom properties to be set (must not benull).
-
getHandledEventClasses
-
setHandledEventClasses
-
isHandlerFor
public boolean isHandlerFor(IWorkflowEvent p_evt, de.uplanet.lucy.server.workflow.IWorkflowProcessingContext p_wfCtx) Description copied from interface:IWorkflowEventHandlerCheck if this event handler may handle the given event.This method should return
falseif this event handler's state is inactive.Note: despite this method returns
truethe event handler is not required to return its efferent transition whenprocessis being called.- Specified by:
isHandlerForin interfaceIWorkflowEventHandler- Parameters:
p_evt- The event.p_wfCtx- The workflow processing context.- Returns:
trueif this event handler may process this event, orfalseotherwise.
-
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:IWorkflowEventHandlerProcess a workflow event in the given context.This method is called by the workflow engine if a call to
isHandlerForreturnedtrue. However this method is not required to return a non-null efferent transition in such cases.A workflow event handler must return
nullif it is notactive.- Specified by:
processin interfaceIWorkflowEventHandler- 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.
-