Class ExternalFlow

  • All Implemented Interfaces:
    AdditionalInformationHandler, CleanUpHandler, Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, QuickInfoSupporter, ShallowCopySupporter<Actor>, SizeOfHandler, Stoppable, StoppableWithFeedback, VariablesInspectionHandler, VariableChangeListener, Actor, ErrorHandler, ExternalActorFileHandler, Serializable, Comparable

    public class ExternalFlow
    extends AbstractActor
    implements ExternalActorFileHandler
    Allows to execute a complete external Flow rather than just an external actor.

    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
     
    -name <java.lang.String> (property: name)
        The name of the actor.
        default: ExternalFlow
     
    -annotation <adams.core.base.BaseAnnotation> (property: annotations)
        The annotations to attach to this actor.
        default: 
     
    -skip <boolean> (property: skip)
        If set to true, transformation is skipped and the input token is just forwarded 
        as it is.
        default: false
     
    -stop-flow-on-error <boolean> (property: stopFlowOnError)
        If set to true, the flow execution at this level gets stopped in case this
        actor encounters an error; the error gets propagated; useful for critical
        actors.
        default: false
     
    -silent <boolean> (property: silent)
        If enabled, then no errors are output in the console; Note: the enclosing
        actor handler must have this enabled as well.
        default: false
     
    -file <adams.core.io.FlowFile> (property: flowFile)
        The file containing the external flow.
        default: ${CWD}
     
    -execution-type <SYNCHRONOUS|SYNCHRONOUS_IMMEDIATE_CLEANUP|ASYNCHRONOUS> (property: executionType)
        Determines how the flow is executed.
        default: SYNCHRONOUS
     
    -headless-mode <boolean> (property: headlessMode)
        Whether to execute the flow in headless mode.
        default: false
     
    -non-interactive-mode <boolean> (property: nonInteractiveMode)
        Whether to run flow in non-interactive mode (disable interactivity of actors
        implementing adams.flow.core.AutomatableInteraction).
        default: false
     
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_ActorFile

        protected FlowFile m_ActorFile
        the file the external flow is stored in.
      • m_HeadlessMode

        protected boolean m_HeadlessMode
        whether to run in headless mode.
      • m_NonInteractiveMode

        protected boolean m_NonInteractiveMode
        whether to run in non-interactive mode.
      • m_ExternalFlow

        protected Actor m_ExternalFlow
        the external flow itself.
      • m_FlowFileIsVariable

        protected Boolean m_FlowFileIsVariable
        indicates whether a variable is attached to the external file.
      • m_FlowFileVariable

        protected String m_FlowFileVariable
        the variable attached to the external file.
      • m_FlowFileChanged

        protected boolean m_FlowFileChanged
        whether the external flow file has changed.
    • Constructor Detail

      • ExternalFlow

        public ExternalFlow()
    • Method Detail

      • actorFileTipText

        public String actorFileTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setExecutionType

        public void setExecutionType​(ExternalFlow.ExecutionType value)
        Sets how to execute the flow.
        Parameters:
        value - the type
      • executionTypeTipText

        public String executionTypeTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setHeadlessMode

        public void setHeadlessMode​(boolean value)
        Sets whether to execute the flow in headless mode.
        Parameters:
        value - true if headless
      • getHeadlessMode

        public boolean getHeadlessMode()
        Returns whether to execute the flow in headless mode.
        Returns:
        true if headless
      • headlessModeTipText

        public String headlessModeTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setNonInteractiveMode

        public void setNonInteractiveMode​(boolean value)
        Sets whether to run the flow in non-interactive mode.
        Parameters:
        value - true if non-interactive
      • getNonInteractiveMode

        public boolean getNonInteractiveMode()
        Returns whether to run the flow in non-interactive mode.
        Returns:
        true if non-interactive
      • nonInteractiveModeTipText

        public String nonInteractiveModeTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setUpExternalActor

        public String setUpExternalActor()
        Sets up the external actor.
        Returns:
        null if everything is fine, otherwise error message
      • cleanUpExternalActor

        public void cleanUpExternalActor()
        Cleans up the external actor.
      • setUp

        public String setUp()
        Description copied from class: AbstractActor
        Initializes the item for flow execution. Also calls the reset() method first before anything else.
        Specified by:
        setUp in interface Actor
        Overrides:
        setUp in class AbstractActor
        Returns:
        null if everything is fine, otherwise error message
        See Also:
        AbstractActor.reset()
      • doExecute

        protected String doExecute()
        Executes the flow item.
        Specified by:
        doExecute in class AbstractActor
        Returns:
        null if everything is fine, otherwise error message
      • wrapUp

        public void wrapUp()
        Cleans up after the execution has finished. Graphical output is left untouched.
        Specified by:
        wrapUp in interface Actor
        Overrides:
        wrapUp in class AbstractActor