@KFStep(name="ExecuteProcess", category="Tools", toolTipText="Execute either static or dynamic processes. Dynamic processes can have commands, arguments and working directories specified in the values of incoming string/nominal attributes in data-based or environment connections.", iconPath="weka/gui/knowledgeflow/icons/ExecuteProcess.gif") public class ExecuteProcess extends BaseStep
Constructor and Description |
---|
ExecuteProcess() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getCustomEditorForStep()
Get the name of the editor dialog for this step
|
java.lang.String |
getDynamicArgsField()
Get the name of the attribute in the incoming instance structure that
contains the arguments to the command to execute
|
java.lang.String |
getDynamicCmdField()
Get the name of the attribute in the incoming instance structure that
contains the command to execute
|
java.lang.String |
getDynamicWorkingDirField()
Get the name of the attribute in the incoming instance structure that
containst the working directory for the command to execute
|
java.util.List<java.lang.String> |
getIncomingConnectionTypes()
Get the acceptable incoming connection types at this point in time
|
java.util.List<java.lang.String> |
getOutgoingConnectionTypes()
Get a list of possible outgoing connection types at this point in time
|
boolean |
getRaiseExceptionOnCommandFailure()
Get to raise an exception when a command fails completely (i.e.
|
java.lang.String |
getStaticArgs()
Get the arguments for the static command
|
java.lang.String |
getStaticCmd()
Get the static command to be executed
|
java.lang.String |
getStaticWorkingDir()
Get the working directory for the static command
|
boolean |
getUseDynamic()
Get whether to execute dynamic commands
|
Instances |
outputStructureForConnectionType(java.lang.String connectionName)
Get, if possible, the outgoing instance structure for the supplied incoming
connection type
|
void |
processIncoming(Data data)
Process an incoming Data object
|
void |
setDynamicArgsField(java.lang.String argsField)
Set the name of the attribute in the incoming instance structure that
contains the arguments to the command to execute
|
void |
setDynamicCmdField(java.lang.String cmdField)
Set the name of the attribute in the incoming instance structure that
contains the command to execute
|
void |
setDynamicWorkingDirField(java.lang.String workingDirField)
Set the name of the attribute in the incoming instance structure that
containst the working directory for the command to execute
|
void |
setRaiseExceptionOnCommandFailure(boolean raiseExceptionOnCommandFailure)
Set to raise an exception when a command fails completely (i.e.
|
void |
setStaticArgs(java.lang.String args)
Set the arguments for the static command
|
void |
setStaticCmd(java.lang.String cmd)
Set the static command to be executed
|
void |
setStaticWorkingDir(java.lang.String workingDir)
Set the working directory for the static command
|
void |
setUseDynamic(boolean useDynamic)
Set whether to execute dynamic commands
|
void |
start()
Start processing if operating as a start point in a flow
|
void |
stepInit()
Initialize the step
|
environmentSubstitute, getDefaultSettings, getInteractiveViewers, getInteractiveViewersImpls, getName, getStepManager, globalInfo, isResourceIntensive, isStopRequested, outputStructureForConnectionType, setName, setStepIsResourceIntensive, setStepManager, setStepMustRunSingleThreaded, stepMustRunSingleThreaded, stop
public boolean getRaiseExceptionOnCommandFailure()
public void setRaiseExceptionOnCommandFailure(boolean raiseExceptionOnCommandFailure)
raiseExceptionOnCommandFailure
- if an exception is to be generated on
catastrophic command failurepublic boolean getUseDynamic()
public void setUseDynamic(boolean useDynamic)
useDynamic
- true if dynamic commands are to be executedpublic java.lang.String getStaticCmd()
public void setStaticCmd(java.lang.String cmd)
cmd
- the static command to be executedpublic java.lang.String getStaticArgs()
public void setStaticArgs(java.lang.String args)
args
- the arguments for the static commandpublic java.lang.String getStaticWorkingDir()
public void setStaticWorkingDir(java.lang.String workingDir)
workingDir
- the working directory for the static commandpublic java.lang.String getDynamicCmdField()
public void setDynamicCmdField(java.lang.String cmdField)
cmdField
- the name of the attribute containing the command to executepublic java.lang.String getDynamicArgsField()
public void setDynamicArgsField(java.lang.String argsField)
argsField
- the name of the attribute containing the command's
argumentspublic java.lang.String getDynamicWorkingDirField()
public void setDynamicWorkingDirField(java.lang.String workingDirField)
workingDirField
- the name of the attribute containing the command's
working directorypublic void stepInit() throws WekaException
WekaException
- if a problem occurspublic void start() throws WekaException
start
in interface BaseStepExtender
start
in interface Step
start
in class BaseStep
WekaException
- if a problem occurspublic void processIncoming(Data data) throws WekaException
processIncoming
in interface BaseStepExtender
processIncoming
in interface Step
processIncoming
in class BaseStep
data
- the payload to processWekaException
- if a problem occurspublic java.util.List<java.lang.String> getIncomingConnectionTypes()
public java.util.List<java.lang.String> getOutgoingConnectionTypes()
public Instances outputStructureForConnectionType(java.lang.String connectionName) throws WekaException
outputStructureForConnectionType
in interface Step
outputStructureForConnectionType
in class BaseStep
connectionName
- the name of the connection type to get the output
structure forWekaException
- if a problem occurspublic java.lang.String getCustomEditorForStep()
getCustomEditorForStep
in interface Step
getCustomEditorForStep
in class BaseStep