Class GroovyScriptWorkflowCondition
- java.lang.Object
-
- de.uplanet.lucy.server.workflow.condition.AbstractWorkflowCondition
-
- de.uplanet.lucy.server.workflow.condition.GroovyScriptWorkflowCondition
-
- All Implemented Interfaces:
IActivatableWorkflowObject
,ICustomConfigurableWorkflowObject
,IGroovyConfigurableWorkflowObject
,INamedWorkflowObject
,INeedWorkflow
,INeedWorkflowDirectory
,IWorkflowCondition
,IWorkflowObject
,Serializable
public final class GroovyScriptWorkflowCondition extends AbstractWorkflowCondition implements INeedWorkflowDirectory, IGroovyConfigurableWorkflowObject
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface de.uplanet.lucy.server.workflow.IWorkflowObject
GUID_COMPARATOR
-
-
Constructor Summary
Constructors Constructor Description GroovyScriptWorkflowCondition(String p_strGuid)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,String>
getCustomProperties()
Get the custom properties.String
getScriptPath()
Get the path of the Groovy script.Path
getWorkflowDirectory()
Get the workflow directory.boolean
isCacheCompiledScript()
This flag controls whether compiled Groovy script classes should be cached or not.boolean
isDisablePrintOutput()
This flag controls whether script standard output (println
etc.) should be suppressed or not.WorkflowTransition[]
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
setCacheCompiledScript(boolean p_bCacheCompiledScript)
This flag controls whether compiled Groovy script classes should be cached or not.void
setCustomProperties(Map<String,String> p_customProperties)
Set the custom properties.void
setDisablePrintOutput(boolean p_bDisablePrintOutput)
This flag controls whether script standard output (println
etc.) should be suppressed or not.void
setScriptPath(String p_strScript)
Set the path of the Groovy script.void
setWorkflowDirectory(Path p_dir)
Set the workflow directory.-
Methods inherited from class de.uplanet.lucy.server.workflow.condition.AbstractWorkflowCondition
getAfferentTransition, getEfferentTransitions, getGuid, getName, getWorkflow, isActive, setActive, setAfferentTransition, setEfferentTransitions, setName, setWorkflow, toString
-
-
-
-
Constructor Detail
-
GroovyScriptWorkflowCondition
public GroovyScriptWorkflowCondition(String p_strGuid)
-
-
Method Detail
-
getWorkflowDirectory
public Path getWorkflowDirectory()
Description copied from interface:INeedWorkflowDirectory
Get the workflow directory.- Specified by:
getWorkflowDirectory
in interfaceINeedWorkflowDirectory
- Returns:
- The workflow directory.
-
setWorkflowDirectory
public void setWorkflowDirectory(Path p_dir)
Description copied from interface:INeedWorkflowDirectory
Set the workflow directory.- Specified by:
setWorkflowDirectory
in interfaceINeedWorkflowDirectory
- 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 interfaceIGroovyConfigurableWorkflowObject
- Returns:
true
if compiled Groovy script classes should be cached, orfalse
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 interfaceIGroovyConfigurableWorkflowObject
- Parameters:
p_bCacheCompiledScript
-true
if compiled Groovy script classes should be cached, orfalse
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 interfaceIGroovyConfigurableWorkflowObject
- Returns:
true
if script standard output should be suppressed, orfalse
otherwise.
-
setDisablePrintOutput
public void setDisablePrintOutput(boolean p_bDisablePrintOutput)
This flag controls whether script standard output (println
etc.) should be suppressed or not.- Specified by:
setDisablePrintOutput
in interfaceIGroovyConfigurableWorkflowObject
- Parameters:
p_bDisablePrintOutput
-true
if script standard output should be suppressed, orfalse
otherwise.
-
getCustomProperties
public Map<String,String> getCustomProperties()
Description copied from interface:ICustomConfigurableWorkflowObject
Get the custom properties.- Specified by:
getCustomProperties
in interfaceICustomConfigurableWorkflowObject
- 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 interfaceICustomConfigurableWorkflowObject
- Parameters:
p_customProperties
- The custom properties to be set (must not benull
).
-
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:IWorkflowCondition
Process a workflow event in the given context.The workflow engine will follow the resulting transitions in the order they were returned in the array.
Normally, a workflow condition should return
null
or an empty array if it is notactive
.- Specified by:
process
in interfaceIWorkflowCondition
- Parameters:
p_evt
- The event to be processed.p_wfCtx
- The workflow processing context.p_ctx
- The processing context.- Returns:
- The efferent transitions, or an empty array, or
null
. - Throws:
InterruptedException
- If processing of this condition has been interrupted.Exception
- If an error occurred.
-
-