Class ExecuteProcess

  • All Implemented Interfaces:
    java.io.Serializable, BaseStepExtender, Step

    @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
    Knowledge Flow step that can execute static system commands or commands that are dynamically defined by the values of attributes in incoming instance or environment connections.
    Version:
    $Revision: $
    Author:
    Mark Hall (mhall{[at]}pentaho{[dot]}com)
    See Also:
    Serialized Form
    • Constructor Detail

      • ExecuteProcess

        public ExecuteProcess()
    • Method Detail

      • getRaiseExceptionOnCommandFailure

        public boolean getRaiseExceptionOnCommandFailure()
        Get to raise an exception when a command fails completely (i.e. doesn't exist or something) vs the case of a non-zero exit status. If not raising an exception, then output indicating failure (with exist status = 1 in the case of instance connections) will be generated.
        Returns:
        true if an exception is to be generated on catastrophic command failure
      • setRaiseExceptionOnCommandFailure

        public void setRaiseExceptionOnCommandFailure​(boolean raiseExceptionOnCommandFailure)
        Set to raise an exception when a command fails completely (i.e. doesn't exist or something) vs the case of a non-zero exit status. If not raising an exception, then output indicating failure (with exist status = 1 in the case of instance connections) will be generated.
        Parameters:
        raiseExceptionOnCommandFailure - if an exception is to be generated on catastrophic command failure
      • getUseDynamic

        public boolean getUseDynamic()
        Get whether to execute dynamic commands
        Returns:
        true if dynamic commands are to be executed
      • setUseDynamic

        public void setUseDynamic​(boolean useDynamic)
        Set whether to execute dynamic commands
        Parameters:
        useDynamic - true if dynamic commands are to be executed
      • getStaticCmd

        public java.lang.String getStaticCmd()
        Get the static command to be executed
        Returns:
        the static command to be executed
      • setStaticCmd

        public void setStaticCmd​(java.lang.String cmd)
        Set the static command to be executed
        Parameters:
        cmd - the static command to be executed
      • getStaticArgs

        public java.lang.String getStaticArgs()
        Get the arguments for the static command
        Returns:
        the arguments for the static command
      • setStaticArgs

        public void setStaticArgs​(java.lang.String args)
        Set the arguments for the static command
        Parameters:
        args - the arguments for the static command
      • getStaticWorkingDir

        public java.lang.String getStaticWorkingDir()
        Get the working directory for the static command
        Returns:
        the working directory for the static command
      • setStaticWorkingDir

        public void setStaticWorkingDir​(java.lang.String workingDir)
        Set the working directory for the static command
        Parameters:
        workingDir - the working directory for the static command
      • getDynamicCmdField

        public java.lang.String getDynamicCmdField()
        Get the name of the attribute in the incoming instance structure that contains the command to execute
        Returns:
        the name of the attribute containing the command to execute
      • setDynamicCmdField

        public void setDynamicCmdField​(java.lang.String cmdField)
        Set the name of the attribute in the incoming instance structure that contains the command to execute
        Parameters:
        cmdField - the name of the attribute containing the command to execute
      • getDynamicArgsField

        public java.lang.String getDynamicArgsField()
        Get the name of the attribute in the incoming instance structure that contains the arguments to the command to execute
        Returns:
        the name of the attribute containing the command's arguments
      • setDynamicArgsField

        public 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
        Parameters:
        argsField - the name of the attribute containing the command's arguments
      • getDynamicWorkingDirField

        public 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
        Returns:
        the name of the attribute containing the command's working directory
      • setDynamicWorkingDirField

        public 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
        Parameters:
        workingDirField - the name of the attribute containing the command's working directory
      • getIncomingConnectionTypes

        public java.util.List<java.lang.String> getIncomingConnectionTypes()
        Get the acceptable incoming connection types at this point in time
        Returns:
        a list of acceptable incoming connection types
      • getOutgoingConnectionTypes

        public java.util.List<java.lang.String> getOutgoingConnectionTypes()
        Get a list of possible outgoing connection types at this point in time
        Returns:
        a list of possible outgoing connection types
      • outputStructureForConnectionType

        public Instances outputStructureForConnectionType​(java.lang.String connectionName)
                                                   throws WekaException
        Get, if possible, the outgoing instance structure for the supplied incoming connection type
        Specified by:
        outputStructureForConnectionType in interface Step
        Overrides:
        outputStructureForConnectionType in class BaseStep
        Parameters:
        connectionName - the name of the connection type to get the output structure for
        Returns:
        an Instances object or null if outgoing structure is not applicable or cannot be determined
        Throws:
        WekaException - if a problem occurs
      • getCustomEditorForStep

        public java.lang.String getCustomEditorForStep()
        Get the name of the editor dialog for this step
        Specified by:
        getCustomEditorForStep in interface Step
        Overrides:
        getCustomEditorForStep in class BaseStep
        Returns:
        the name of the editor dialog for this step