Class ActionEval
- java.lang.Object
-
- org.apache.hop.workflow.action.ActionBase
-
- org.apache.hop.workflow.actions.eval.ActionEval
-
- All Implemented Interfaces:
Cloneable,IAttributes,ICheckResultSource,IExtensionData,IHasLogChannel,ILoggingObject,IVariables,org.apache.hop.resource.IResourceHolder,org.apache.hop.workflow.action.IAction
@Action(id="EVAL", name="i18n::ActionEval.Name", description="i18n::ActionEval.Description", image="eval.svg", categoryDescription="i18n:org.apache.hop.workflow:ActionCategory.Category.Scripting", keywords="i18n::ActionEval.keyword", documentationUrl="/workflow/actions/eval.html") public class ActionEval extends org.apache.hop.workflow.action.ActionBase implements Cloneable, org.apache.hop.workflow.action.IActionAction type to evaluate the result of a previous action. It uses a piece of javascript to do this.
-
-
Constructor Summary
Constructors Constructor Description ActionEval()ActionEval(String n, String scr)ActionEval(ActionEval other)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheck(List<ICheckResult> remarks, org.apache.hop.workflow.WorkflowMeta workflowMeta, IVariables variables, IHopMetadataProvider metadataProvider)Objectclone()booleanevaluate(Result result, org.apache.hop.workflow.engine.IWorkflowEngine<org.apache.hop.workflow.WorkflowMeta> parentWorkflow, Result prevResult)Evaluate the result of the execution of previous action.Resultexecute(Result prevResult, int nr)Execute this action and return the result.StringgetScript()booleanisEvaluation()booleanisUnconditional()booleanresetErrorsBeforeExecution()voidsetScript(String s)-
Methods inherited from class org.apache.hop.workflow.action.ActionBase
clear, copyFrom, equals, exportResources, getAttribute, getAttributes, getAttributesMap, getContainerId, getDescription, getDialogClassName, getEntryTransformSetVariable, getEntryTransformSetVariablesMap, getExtensionDataMap, getFilename, getLogChannel, getLogChannelId, getLogLevel, getMetadataProvider, getName, getObjectCopy, getObjectName, getObjectType, getParent, getParentVariables, getParentWorkflow, getParentWorkflowMeta, getPluginId, getRealFilename, getReferencedObjectDescriptions, getRegistrationDate, getResourceDependencies, getSqlStatements, getTypeDesc, getTypeId, getUsedDatabaseConnections, getVariable, getVariable, getVariableBoolean, getVariableNames, getVariables, getXml, hasChanged, hashCode, initializeFrom, isBasic, isDebug, isDetailed, isForcingSeparateLogging, isGatheringMetrics, isPipeline, isReferencedObjectEnabled, isRowlevel, isStart, isWorkflow, loadReferencedObject, loadXml, loadXml, logBasic, logBasic, logDebug, logDebug, logDetailed, logDetailed, logError, logError, logError, logMinimal, logMinimal, logRowlevel, logRowlevel, resolve, resolve, resolve, setAttribute, setAttributes, setAttributesMap, setChanged, setChanged, setContainerObjectId, setDescription, setEntryTransformSetVariable, setForcingSeparateLogging, setGatheringMetrics, setLogLevel, setMetadataProvider, setName, setParentVariables, setParentWorkflow, setParentWorkflowMeta, setPluginId, setVariable, setVariables, shareWith, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.hop.workflow.action.IAction
clear, exportResources, getDescription, getDialogClassName, getFilename, getLogChannel, getName, getParentWorkflow, getParentWorkflowMeta, getPluginId, getRealFilename, getReferencedObjectDescriptions, getResourceDependencies, getSqlStatements, getXml, hasChanged, isPipeline, isReferencedObjectEnabled, isStart, isWorkflow, loadReferencedObject, loadXml, setChanged, setChanged, setDescription, setMetadataProvider, setName, setParentWorkflow, setParentWorkflowMeta, setPluginId
-
Methods inherited from interface org.apache.hop.core.IExtensionData
getExtensionDataMap
-
Methods inherited from interface org.apache.hop.core.variables.IVariables
copyFrom, getParentVariables, getVariable, getVariable, getVariableBoolean, getVariableNames, initializeFrom, resolve, resolve, resolve, setParentVariables, setVariable, setVariables, shareWith
-
-
-
-
Constructor Detail
-
ActionEval
public ActionEval()
-
ActionEval
public ActionEval(ActionEval other)
-
-
Method Detail
-
clone
public Object clone()
- Specified by:
clonein interfaceorg.apache.hop.workflow.action.IAction- Overrides:
clonein classorg.apache.hop.workflow.action.ActionBase
-
setScript
public void setScript(String s)
-
getScript
public String getScript()
-
evaluate
public boolean evaluate(Result result, org.apache.hop.workflow.engine.IWorkflowEngine<org.apache.hop.workflow.WorkflowMeta> parentWorkflow, Result prevResult)
Evaluate the result of the execution of previous action.- Parameters:
result- The result to evaulate.prevResult- the previous resultparentWorkflow- the parent workflow- Returns:
- The boolean result of the evaluation script.
-
execute
public Result execute(Result prevResult, int nr)
Execute this action and return the result. In this case it means, just set the result boolean in the Result class.- Specified by:
executein interfaceorg.apache.hop.workflow.action.IAction- Parameters:
prevResult- The result of the previous execution- Returns:
- The Result of the execution.
-
resetErrorsBeforeExecution
public boolean resetErrorsBeforeExecution()
- Specified by:
resetErrorsBeforeExecutionin interfaceorg.apache.hop.workflow.action.IAction- Overrides:
resetErrorsBeforeExecutionin classorg.apache.hop.workflow.action.ActionBase
-
isEvaluation
public boolean isEvaluation()
- Specified by:
isEvaluationin interfaceorg.apache.hop.workflow.action.IAction- Overrides:
isEvaluationin classorg.apache.hop.workflow.action.ActionBase
-
isUnconditional
public boolean isUnconditional()
- Specified by:
isUnconditionalin interfaceorg.apache.hop.workflow.action.IAction- Overrides:
isUnconditionalin classorg.apache.hop.workflow.action.ActionBase
-
check
public void check(List<ICheckResult> remarks, org.apache.hop.workflow.WorkflowMeta workflowMeta, IVariables variables, IHopMetadataProvider metadataProvider)
- Specified by:
checkin interfaceorg.apache.hop.workflow.action.IAction- Overrides:
checkin classorg.apache.hop.workflow.action.ActionBase
-
-