Package adams.flow.control
Class Flow
-
- All Implemented Interfaces:
AdditionalInformationHandler
,CleanUpHandler
,Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,Pausable
,QuickInfoSupporter
,ShallowCopySupporter<Actor>
,SizeOfHandler
,Stoppable
,StoppableWithFeedback
,VariablesHandler
,VariablesInspectionHandler
,LogEntryHandler
,MutableLogEntryHandler
,FlowPauseStateListener
,VariableChangeListener
,AtomicExecution
,ScopeHandler
,StorageHandler
,Actor
,ActorHandler
,ControlActor
,ErrorHandler
,Event
,Flushable
,MutableActorHandler
,PauseStateHandler
,StopRestrictor
,SubFlowWrapUp
,TriggerableEvent
,FlowExecutionListeningSupporter
,Serializable
,Comparable
public class Flow extends MutableConnectedControlActor implements MutableLogEntryHandler, StorageHandler, VariablesHandler, TriggerableEvent, PauseStateHandler, FlowExecutionListeningSupporter, ScopeHandler, StopRestrictor
Container object for actors, used for executing a flow.
-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: Flow
-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
-finish-before-stopping <boolean> (property: finishBeforeStopping) If enabled, actor first finishes processing all data before stopping. default: false
-stopping-timeout <int> (property: stoppingTimeout) The timeout in milliseconds when waiting for actors to finish (<= 0 for infinity; see 'finishBeforeStopping'). default: -1 minimum: -1
-actor <adams.flow.core.Actor> [-actor ...] (property: actors) All the actors that define this flow. default:
-read-only <boolean> (property: readOnly) If set to true, the flow is marked as read-only and the user gets prompted whether to succeed before allowing it to be edited. default: false
-error-handling <ACTORS_ALWAYS_STOP_ON_ERROR|ACTORS_DECIDE_TO_STOP_ON_ERROR> (property: errorHandling) Defines how errors are handled that occur during execution of the flow; ACTORS_DECIDE_TO_STOP_ON_ERROR stops the flow only if the actor has the ' stopFlowOnError' flag set. default: ACTORS_ALWAYS_STOP_ON_ERROR
-log-errors <boolean> (property: logErrors) If set to true, errors are logged and can be retrieved after execution. default: false
-execute-on-error <adams.core.io.FlowFile> (property: executeOnError) The external flow to execute in case the flow finishes with an error; allows the user to call a clean-up flow. default: ${CWD}
-execute-on-finish <adams.core.io.FlowFile> (property: executeOnFinish) The external flow to execute in case the flow finishes normal, without any errors. default: ${CWD}
-flow-execution-listening-enabled <boolean> (property: flowExecutionListeningEnabled) Enables/disables the flow execution listener. default: false
-flow-execution-listener <adams.flow.execution.FlowExecutionListener> (property: flowExecutionListener) The listener for the flow execution; must be enabled explicitly. default: adams.flow.execution.NullListener
-flow-restart-manager <adams.flow.control.flowrestart.AbstractFlowRestartManager> (property: flowRestartManager) The manager for restarting the flow. default: adams.flow.control.flowrestart.NullManager
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Flow.ErrorHandling
Enum for the error handling within the flow.-
Nested classes/interfaces inherited from interface adams.flow.control.ScopeHandler
ScopeHandler.ScopeHandling
-
-
Field Summary
Fields Modifier and Type Field Description static String
FILENAME
the filename for flow settings.protected Actor
m_AfterExecuteActor
the actor that was executed after the flow finished.protected CallableNamesRecorder
m_CallableNames
the callable names.protected int
m_DefaultCloseOperation
the default close operation.protected boolean
m_EnforceCallableNameCheck
whether the callable name check is enforced.protected Flow.ErrorHandling
m_ErrorHandling
the error handling.protected FlowFile
m_ExecuteOnError
the external flow to execute in case of an abnormal stop.protected Actor
m_ExecuteOnErrorActor
the external actor to execute in case of an abnormal stop.protected FlowFile
m_ExecuteOnFinish
the external flow to execute in case the flow finishes normal.protected Actor
m_ExecuteOnFinishActor
the external actor to execute in case the flow finishes normal.protected FlowExecutionListener
m_FlowExecutionListener
the execution listener to use.protected boolean
m_FlowExecutionListeningEnabled
whether flow execution listening is enabled.protected boolean
m_FlowExecutionListeningStarted
whether flow execution listening has started.protected int
m_FlowID
the flow ID.protected AbstractFlowRestartManager
m_FlowRestartManager
the manager for restarting the flow.protected boolean
m_Headless
whether the execution is to be headless, i.e., no GUI components.protected ArrayList<LogEntry>
m_LogEntries
for storing the LogEntry records.protected boolean
m_LogErrors
whether to store errors (as LogEntry records).protected Component
m_ParentComponent
the parent component to use for interactive actors.protected PauseStateManager
m_PauseStateManager
for managing the pause state.protected boolean
m_ReadOnly
whether to mark this flow as read-only (user gets prompted).protected boolean
m_Register
whether to register the flow.protected Storage
m_Storage
the storage for temporary data.protected FlowVariables
m_Variables
the 'local' variables.protected Map<Window,String>
m_WindowRegister
the register for windows.-
Fields inherited from class adams.flow.control.MutableConnectedControlActor
m_Actors
-
Fields inherited from class adams.flow.control.AbstractDirectedControlActor
m_Director, m_FinishBeforeStopping, m_StoppingTimeout, m_StoppingWarningInterval
-
Fields inherited from class adams.flow.control.AbstractControlActor
m_Compatibility, m_SetUpSubActors
-
Fields inherited from class adams.flow.core.AbstractActor
m_Annotations, m_BackupState, m_DetectedObjectVariables, m_DetectedVariables, m_ErrorHandler, m_Executed, m_Executing, m_ExecutionListeningSupporter, m_FullName, m_LoggingPrefix, m_Name, m_Parent, m_ScopeHandler, m_Self, m_Silent, m_Skip, m_StopFlowOnError, m_StopMessage, m_Stopped, m_StorageHandler, m_VariablesUpdated
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
Fields inherited from interface adams.flow.core.Actor
FILE_EXTENSION, FILE_EXTENSION_GZ
-
-
Constructor Summary
Constructors Constructor Description Flow()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
actorsTipText()
Returns the tip text for this property.void
addBreakpoint(AbstractBreakpoint breakpoint, AbstractScopeRestriction restriction, boolean showView)
Adds the breakpoint to its flow execution listener setup.String
addCallableName(ActorHandler handler, Actor actor)
Adds the callable name to the list of used ones.void
addLogEntry(LogEntry entry)
Adds the LogEntry record to the internal list (in case logging is enabled).boolean
canStartListeningAtRuntime()
Returns whether listeners can be attached at runtime.void
cleanUp()
Cleans up after the execution has finished.void
clearLogEntries()
Removes all currently stored LogEntry records.int
countLogEntries()
Returns the number of stored LogEntry records.void
defineOptions()
Adds options to the internal list of options.protected void
deregisterGraphicalFlowExecutionListener(FlowExecutionListener l)
Deregisters the graphical flow execution listener.void
deregisterWindow(Window window)
Removes the window from the register.void
destroy()
Frees up memory in a "destructive" non-reversible way.protected String
doExecute()
Executes the actor.String
errorHandlingTipText()
Returns the tip text for this property.String
execute()
Executes the flow item.String
executeOnErrorTipText()
Returns the tip text for this property.String
executeOnFinishTipText()
Returns the tip text for this property.String
flowExecutionListenerTipText()
Returns the tip text for this property.String
flowExecutionListeningEnabledTipText()
Returns the tip text for this property.String
flowRestartManagerTipText()
Returns the tip text for this property.protected void
forceVariables(Variables value)
Updates the Variables instance in use.ActorHandlerInfo
getActorHandlerInfo()
Returns some information about the actor handler, e.g., whether it can contain standalones and the actor execution.AbstractApplicationFrame
getApplicationFrame()
UsesgetParentComponent()
to determine the application frame.int
getDefaultCloseOperation()
Returns the default close operation for frames.boolean
getEnforceCallableNameCheck()
Returns whether the check of callable names is enforced.Flow.ErrorHandling
getErrorHandling()
Returns how errors are handled.FlowFile
getExecuteOnError()
Returns the external flow to execute in case the flow finishes with an error.FlowFile
getExecuteOnFinish()
Returns the external flow to execute in case the flow finishes without any errors.FlowExecutionListener
getFlowExecutionListener()
Returns the current listener in use.int
getFlowID()
Returns the flow ID (runtime).AbstractFlowRestartManager
getFlowRestartManager()
Returns the restart manager in use.String
getFullName()
Returns the full name of the actor, i.e., the concatenated names of all parents.protected GraphicalFlowExecutionListenersHandler
getGraphicalFlowExecutionListenersHandler()
Retrieves the handler for GraphicalFlowExecutionListener objects.Variables
getLocalVariables()
Returns the Variables instance to use.List<LogEntry>
getLogEntries()
Returns the stored LogEntry records.LogEntry
getLogEntry(int index)
Returns the specified LogEntry record.boolean
getLogErrors()
Returns whether errors are logged.Component
getParentComponent()
Returns the current parent component for interactive actors.PauseStateManager
getPauseStateManager()
Returns the pause state manager.String
getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.boolean
getReadOnly()
Returns whether the flow is marked as read-only and the user gets prompted whether to succeed before allowing it to be edited.boolean
getRegister()
Returns whether to register the flow with the running flows registry, making it visible to remote commands.Actor
getRoot()
Returns the root of this actor, e.g., the group at the highest level.Storage
getStorage()
Returns the storage container.Variables
getVariables()
Returns the Variables instance to use.Map<Window,String>
getWindowRegister()
Returns the current register.String
globalInfo()
Returns a string describing the object.protected void
initialize()
Initializes the members.boolean
isCallableNameUsed(ActorHandler handler, Actor actor)
Checks whether a callable name is already in use.boolean
isFlowExecutionListeningEnabled()
Returns whether flow execution listening is enabled.boolean
isHeadless()
Returns whether the actor is run in headless mode.boolean
isRestrictedStop()
Returns whether the stop was a restricted one (that can be resumed).boolean
isRestrictingStops()
Returns whether stops are being restricted.String
logErrorsTipText()
Returns the tip text for this property.String
readOnlyTipText()
Returns the tip text for this property.protected void
registerGraphicalFlowExecutionListener(FlowExecutionListener l)
Registers the graphical flow execution listener.void
registerWindow(Window window, String title)
Adds the window to the register.LogEntry
removeLogEntry(int index)
Removes the specified LogEntry record from the internal list.protected void
reset()
Resets the scheme.void
restrictedStopExecution()
Stops the (restricted) execution.void
restrictedStopExecution(String msg)
Stops the (restricted) execution.void
setDefaultCloseOperation(int value)
Sets the default close operation for frames.void
setEnforceCallableNameCheck(boolean value)
Sets whether to enforce the callable name check.void
setErrorHandling(Flow.ErrorHandling value)
Sets how errors are handled.void
setExecuteOnError(FlowFile value)
Sets the external flow to execute in case the flow finishes with an error.void
setExecuteOnFinish(FlowFile value)
Sets the external flow to execute in case the flow finishes without any errors.void
setFlowExecutionListener(FlowExecutionListener l)
Sets the listener to use.void
setFlowExecutionListeningEnabled(boolean value)
Sets whether flow execution listening is enabled.void
setFlowRestartManager(AbstractFlowRestartManager value)
Sets the restart manager to use.void
setHeadless(boolean value)
Sets whether the actor is to be run in headless mode, i.e., suppressing GUI components.void
setLogErrors(boolean value)
Sets whether to log errors.void
setParentComponent(Component value)
Sets the use for interactive actors.void
setReadOnly(boolean value)
Sets whether the flow is marked as read-only and the user gets prompted whether to succeed before allowing it to be edited.void
setRegister(boolean value)
Sets whether to register the flow with the running flows registry, making it visible to remote commands.String
setUp()
Initializes the item for flow execution.protected String
setUpSubActors()
Performs the setUp of the sub-actors.void
setVariables(Variables value)
Ignored.void
showGraphicalFlowExecutionListeners()
Displays the graphical flow executions listeners tab.boolean
startListeningAtRuntime(FlowExecutionListener l)
Attaches the listener and starts listening.void
wrapUp()
Finishes up the execution.-
Methods inherited from class adams.flow.control.MutableConnectedControlActor
add, add, get, getActors, indexOf, remove, removeAll, set, setActors, size
-
Methods inherited from class adams.flow.control.AbstractConnectedControlActor
check, checkConnections, classesToString
-
Methods inherited from class adams.flow.control.AbstractDirectedControlActor
finishBeforeStoppingTipText, flushExecution, getDirector, getFinishBeforeStopping, getStoppingTimeout, getStoppingWarningInterval, newDirector, setFinishBeforeStopping, setStoppingTimeout, setStoppingWarningInterval, stopExecution, stoppingTimeoutTipText, stoppingWarningIntervalTipText, updateVariables
-
Methods inherited from class adams.flow.control.AbstractControlActor
active, canInspectOptions, firstActive, firstInputConsumer, flowPauseStateChanged, isPaused, isSubFlowWrappedUp, lastActive, pauseExecution, preExecute, resumeExecution, setParent, updateParent, wrapUpSubFlow
-
Methods inherited from class adams.flow.core.AbstractActor
annotationsTipText, backupState, canPerformSetUpCheck, compareTo, configureLogger, equals, finalUpdateVariables, findVariables, findVariables, forCommandLine, forName, forName, getAdditionalInformation, getAnnotations, getDefaultName, getDetectedVariables, getErrorHandler, getFlowActors, getFlowExecutionListeningSupporter, getName, getNextSibling, getParent, getPreviousSibling, getScopeHandler, getSilent, getSkip, getStopFlowOnError, getStopMessage, getStorageHandler, handleError, handleException, hasErrorHandler, hasStopMessage, index, isBackedUp, isExecuted, isExecuting, isFinished, isStopped, nameTipText, performSetUpChecks, performVariableChecks, postExecute, pruneBackup, pruneBackup, restoreState, setAnnotations, setErrorHandler, setName, setSilent, setSkip, setStopFlowOnError, shallowCopy, shallowCopy, silentTipText, sizeOf, skipTipText, stopExecution, stopFlowOnErrorTipText, updateDetectedVariables, updatePrefix, variableChanged
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, finishInit, getDefaultLoggingLevel, getOptionManager, loggingLevelTipText, newOptionManager, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.flow.core.Actor
compareTo, equals, findVariables, getAnnotations, getDefaultName, getDetectedVariables, getErrorHandler, getFlowExecutionListeningSupporter, getName, getNextSibling, getParent, getPreviousSibling, getScopeHandler, getSilent, getSkip, getStopFlowOnError, getStopMessage, getStorageHandler, handleError, hasErrorHandler, hasStopMessage, index, isExecuted, isFinished, isStopped, setAnnotations, setErrorHandler, setName, setParent, setSilent, setSkip, setStopFlowOnError, shallowCopy, shallowCopy, sizeOf, stopExecution, stopExecution, toCommandLine, variableChanged
-
Methods inherited from interface adams.flow.core.ActorHandler
check, firstActive, flushExecution, get, indexOf, lastActive, set, size
-
Methods inherited from interface adams.core.AdditionalInformationHandler
getAdditionalInformation
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel, setLoggingLevel
-
Methods inherited from interface adams.core.logging.LoggingSupporter
getLogger, isLoggingEnabled
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, getOptionManager
-
Methods inherited from interface adams.core.VariablesInspectionHandler
canInspectOptions
-
-
-
-
Field Detail
-
FILENAME
public static final String FILENAME
the filename for flow settings.- See Also:
- Constant Field Values
-
m_ReadOnly
protected boolean m_ReadOnly
whether to mark this flow as read-only (user gets prompted).
-
m_ErrorHandling
protected Flow.ErrorHandling m_ErrorHandling
the error handling.
-
m_LogErrors
protected boolean m_LogErrors
whether to store errors (as LogEntry records).
-
m_Storage
protected transient Storage m_Storage
the storage for temporary data.
-
m_Variables
protected FlowVariables m_Variables
the 'local' variables.
-
m_ExecuteOnError
protected FlowFile m_ExecuteOnError
the external flow to execute in case of an abnormal stop.
-
m_ExecuteOnErrorActor
protected Actor m_ExecuteOnErrorActor
the external actor to execute in case of an abnormal stop.
-
m_ExecuteOnFinish
protected FlowFile m_ExecuteOnFinish
the external flow to execute in case the flow finishes normal.
-
m_ExecuteOnFinishActor
protected Actor m_ExecuteOnFinishActor
the external actor to execute in case the flow finishes normal.
-
m_AfterExecuteActor
protected Actor m_AfterExecuteActor
the actor that was executed after the flow finished.
-
m_PauseStateManager
protected PauseStateManager m_PauseStateManager
for managing the pause state.
-
m_FlowExecutionListeningEnabled
protected boolean m_FlowExecutionListeningEnabled
whether flow execution listening is enabled.
-
m_FlowExecutionListeningStarted
protected boolean m_FlowExecutionListeningStarted
whether flow execution listening has started.
-
m_FlowExecutionListener
protected FlowExecutionListener m_FlowExecutionListener
the execution listener to use.
-
m_FlowRestartManager
protected AbstractFlowRestartManager m_FlowRestartManager
the manager for restarting the flow.
-
m_CallableNames
protected CallableNamesRecorder m_CallableNames
the callable names.
-
m_EnforceCallableNameCheck
protected boolean m_EnforceCallableNameCheck
whether the callable name check is enforced.
-
m_ParentComponent
protected transient Component m_ParentComponent
the parent component to use for interactive actors.
-
m_DefaultCloseOperation
protected int m_DefaultCloseOperation
the default close operation.
-
m_Headless
protected boolean m_Headless
whether the execution is to be headless, i.e., no GUI components.
-
m_FlowID
protected int m_FlowID
the flow ID.
-
m_Register
protected boolean m_Register
whether to register the flow.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceGlobalInfoSupporter
- Specified by:
globalInfo
in classAbstractOptionHandler
- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classMutableConnectedControlActor
-
initialize
protected void initialize()
Initializes the members.- Overrides:
initialize
in classMutableConnectedControlActor
-
reset
protected void reset()
Resets the scheme.- Overrides:
reset
in classAbstractControlActor
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.- Specified by:
getQuickInfo
in interfaceActor
- Specified by:
getQuickInfo
in interfaceQuickInfoSupporter
- Overrides:
getQuickInfo
in classAbstractDirectedControlActor
- Returns:
- null if no info available, otherwise short string
-
actorsTipText
public String actorsTipText()
Returns the tip text for this property.- Specified by:
actorsTipText
in classMutableConnectedControlActor
- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setReadOnly
public void setReadOnly(boolean value)
Sets whether the flow is marked as read-only and the user gets prompted whether to succeed before allowing it to be edited.- Parameters:
value
- true if read only
-
getReadOnly
public boolean getReadOnly()
Returns whether the flow is marked as read-only and the user gets prompted whether to succeed before allowing it to be edited.- Returns:
- true if read only
-
readOnlyTipText
public String readOnlyTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setErrorHandling
public void setErrorHandling(Flow.ErrorHandling value)
Sets how errors are handled.- Parameters:
value
- the error handling
-
getErrorHandling
public Flow.ErrorHandling getErrorHandling()
Returns how errors are handled.- Returns:
- the error handling
-
errorHandlingTipText
public String errorHandlingTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setLogErrors
public void setLogErrors(boolean value)
Sets whether to log errors.- Parameters:
value
- true if to log errors
-
getLogErrors
public boolean getLogErrors()
Returns whether errors are logged.- Returns:
- true if errors are logged
-
logErrorsTipText
public String logErrorsTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setExecuteOnError
public void setExecuteOnError(FlowFile value)
Sets the external flow to execute in case the flow finishes with an error.- Parameters:
value
- the external flow
-
getExecuteOnError
public FlowFile getExecuteOnError()
Returns the external flow to execute in case the flow finishes with an error.- Returns:
- the external flow
-
executeOnErrorTipText
public String executeOnErrorTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setExecuteOnFinish
public void setExecuteOnFinish(FlowFile value)
Sets the external flow to execute in case the flow finishes without any errors.- Parameters:
value
- the external flow
-
getExecuteOnFinish
public FlowFile getExecuteOnFinish()
Returns the external flow to execute in case the flow finishes without any errors.- Returns:
- the external flow
-
executeOnFinishTipText
public String executeOnFinishTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setFlowExecutionListeningEnabled
public void setFlowExecutionListeningEnabled(boolean value)
Sets whether flow execution listening is enabled.- Specified by:
setFlowExecutionListeningEnabled
in interfaceFlowExecutionListeningSupporter
- Parameters:
value
- true if to enable listening
-
isFlowExecutionListeningEnabled
public boolean isFlowExecutionListeningEnabled()
Returns whether flow execution listening is enabled.- Specified by:
isFlowExecutionListeningEnabled
in interfaceFlowExecutionListeningSupporter
- Returns:
- true if listening is enabled
-
flowExecutionListeningEnabledTipText
public String flowExecutionListeningEnabledTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setFlowExecutionListener
public void setFlowExecutionListener(FlowExecutionListener l)
Sets the listener to use.- Specified by:
setFlowExecutionListener
in interfaceFlowExecutionListeningSupporter
- Parameters:
l
- the listener to use
-
getFlowExecutionListener
public FlowExecutionListener getFlowExecutionListener()
Returns the current listener in use.- Specified by:
getFlowExecutionListener
in interfaceFlowExecutionListeningSupporter
- Returns:
- the listener
-
flowExecutionListenerTipText
public String flowExecutionListenerTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setFlowRestartManager
public void setFlowRestartManager(AbstractFlowRestartManager value)
Sets the restart manager to use.- Parameters:
value
- the manager
-
getFlowRestartManager
public AbstractFlowRestartManager getFlowRestartManager()
Returns the restart manager in use.- Returns:
- the manager
-
flowRestartManagerTipText
public String flowRestartManagerTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
canStartListeningAtRuntime
public boolean canStartListeningAtRuntime()
Returns whether listeners can be attached at runtime.- Specified by:
canStartListeningAtRuntime
in interfaceFlowExecutionListeningSupporter
- Returns:
- true if listeners can be attached dynamically
-
startListeningAtRuntime
public boolean startListeningAtRuntime(FlowExecutionListener l)
Attaches the listener and starts listening.- Specified by:
startListeningAtRuntime
in interfaceFlowExecutionListeningSupporter
- Parameters:
l
- the listener to attach and use immediately,NullListener
disables the listening- Returns:
- true if listening could be started successfully
-
registerWindow
public void registerWindow(Window window, String title)
Adds the window to the register.- Parameters:
window
- the window to registertitle
- the title to use
-
deregisterWindow
public void deregisterWindow(Window window)
Removes the window from the register.- Parameters:
window
- the window to register
-
getWindowRegister
public Map<Window,String> getWindowRegister()
Returns the current register.- Returns:
- the register
-
addBreakpoint
public void addBreakpoint(AbstractBreakpoint breakpoint, AbstractScopeRestriction restriction, boolean showView)
Adds the breakpoint to its flow execution listener setup.- Parameters:
breakpoint
- the breakpoint to addrestriction
- the scope restriction to useshowView
- whether to show the debug view
-
getGraphicalFlowExecutionListenersHandler
protected GraphicalFlowExecutionListenersHandler getGraphicalFlowExecutionListenersHandler()
Retrieves the handler for GraphicalFlowExecutionListener objects.- Returns:
- the handler, null if not available
-
registerGraphicalFlowExecutionListener
protected void registerGraphicalFlowExecutionListener(FlowExecutionListener l)
Registers the graphical flow execution listener.- Parameters:
l
- the listener to register
-
deregisterGraphicalFlowExecutionListener
protected void deregisterGraphicalFlowExecutionListener(FlowExecutionListener l)
Deregisters the graphical flow execution listener.- Parameters:
l
- the listener to register
-
showGraphicalFlowExecutionListeners
public void showGraphicalFlowExecutionListeners()
Displays the graphical flow executions listeners tab.
-
setParentComponent
public void setParentComponent(Component value)
Sets the use for interactive actors.- Parameters:
value
- the parent, can be null
-
getParentComponent
public Component getParentComponent()
Returns the current parent component for interactive actors.- Specified by:
getParentComponent
in interfaceActor
- Overrides:
getParentComponent
in classAbstractActor
- Returns:
- the parent, null if not set
-
getApplicationFrame
public AbstractApplicationFrame getApplicationFrame()
UsesgetParentComponent()
to determine the application frame.- Returns:
- the application frame, null if failed to determine
-
setDefaultCloseOperation
public void setDefaultCloseOperation(int value)
Sets the default close operation for frames.- Parameters:
value
- the operation
-
getDefaultCloseOperation
public int getDefaultCloseOperation()
Returns the default close operation for frames.- Returns:
- the operation
-
setHeadless
public void setHeadless(boolean value)
Sets whether the actor is to be run in headless mode, i.e., suppressing GUI components.- Parameters:
value
- if true then GUI components will be suppressed
-
isHeadless
public boolean isHeadless()
Returns whether the actor is run in headless mode.- Specified by:
isHeadless
in interfaceActor
- Overrides:
isHeadless
in classAbstractActor
- Returns:
- true if GUI components are suppressed
-
getActorHandlerInfo
public ActorHandlerInfo getActorHandlerInfo()
Returns some information about the actor handler, e.g., whether it can contain standalones and the actor execution.- Specified by:
getActorHandlerInfo
in interfaceActorHandler
- Specified by:
getActorHandlerInfo
in classAbstractControlActor
- Returns:
- the info
-
getVariables
public Variables getVariables()
Returns the Variables instance to use.- Specified by:
getVariables
in interfaceActor
- Overrides:
getVariables
in classAbstractActor
- Returns:
- the scope handler
-
setVariables
public void setVariables(Variables value)
Ignored.- Specified by:
setVariables
in interfaceActor
- Overrides:
setVariables
in classAbstractActor
- Parameters:
value
- ignored- See Also:
AbstractActor.forceVariables(Variables)
-
getLocalVariables
public Variables getLocalVariables()
Returns the Variables instance to use.- Specified by:
getLocalVariables
in interfaceVariablesHandler
- Returns:
- the scope handler
-
getPauseStateManager
public PauseStateManager getPauseStateManager()
Returns the pause state manager.- Specified by:
getPauseStateManager
in interfacePauseStateHandler
- Returns:
- the manager
-
getRoot
public Actor getRoot()
Returns the root of this actor, e.g., the group at the highest level.- Specified by:
getRoot
in interfaceActor
- Overrides:
getRoot
in classAbstractActor
- Returns:
- the root, always itself
-
getFullName
public String getFullName()
Returns the full name of the actor, i.e., the concatenated names of all parents. Used in error messages.- Specified by:
getFullName
in interfaceActor
- Overrides:
getFullName
in classAbstractActor
- Returns:
- the full name
-
setUpSubActors
protected String setUpSubActors()
Performs the setUp of the sub-actors.- Overrides:
setUpSubActors
in classAbstractControlActor
- Returns:
- null if everything is fine, otherwise error message
-
forceVariables
protected void forceVariables(Variables value)
Updates the Variables instance in use.
Use with caution!- Overrides:
forceVariables
in classAbstractControlActor
- Parameters:
value
- the instance to use
-
setUp
public String setUp()
Initializes the item for flow execution.- Specified by:
setUp
in interfaceActor
- Overrides:
setUp
in classAbstractDirectedControlActor
- Returns:
- null if everything is fine, otherwise error message
- See Also:
AbstractActor.reset()
-
clearLogEntries
public void clearLogEntries()
Removes all currently stored LogEntry records.- Specified by:
clearLogEntries
in interfaceMutableLogEntryHandler
-
getLogEntries
public List<LogEntry> getLogEntries()
Returns the stored LogEntry records.- Specified by:
getLogEntries
in interfaceLogEntryHandler
- Returns:
- the stored entries
-
addLogEntry
public void addLogEntry(LogEntry entry)
Adds the LogEntry record to the internal list (in case logging is enabled).- Specified by:
addLogEntry
in interfaceMutableLogEntryHandler
- Parameters:
entry
- the record to add- See Also:
getLogErrors()
-
getLogEntry
public LogEntry getLogEntry(int index)
Returns the specified LogEntry record.- Specified by:
getLogEntry
in interfaceMutableLogEntryHandler
- Parameters:
index
- the index of the record to return- Returns:
- the requested LogEntry
-
removeLogEntry
public LogEntry removeLogEntry(int index)
Removes the specified LogEntry record from the internal list.- Specified by:
removeLogEntry
in interfaceMutableLogEntryHandler
- Parameters:
index
- the index of the record to delete- Returns:
- the deleted LogEntry
-
countLogEntries
public int countLogEntries()
Returns the number of stored LogEntry records.- Specified by:
countLogEntries
in interfaceLogEntryHandler
- Returns:
- the number of records
-
getStorage
public Storage getStorage()
Returns the storage container.- Specified by:
getStorage
in interfaceStorageHandler
- Returns:
- the container
-
getFlowID
public int getFlowID()
Returns the flow ID (runtime).- Returns:
- the ID
-
setRegister
public void setRegister(boolean value)
Sets whether to register the flow with the running flows registry, making it visible to remote commands.- Parameters:
value
- true if to register
-
getRegister
public boolean getRegister()
Returns whether to register the flow with the running flows registry, making it visible to remote commands.- Returns:
- true if to register
-
setEnforceCallableNameCheck
public void setEnforceCallableNameCheck(boolean value)
Sets whether to enforce the callable name check.- Specified by:
setEnforceCallableNameCheck
in interfaceScopeHandler
- Parameters:
value
- true if to enforce check
-
getEnforceCallableNameCheck
public boolean getEnforceCallableNameCheck()
Returns whether the check of callable names is enforced.- Specified by:
getEnforceCallableNameCheck
in interfaceScopeHandler
- Returns:
- true if check enforced
-
isCallableNameUsed
public boolean isCallableNameUsed(ActorHandler handler, Actor actor)
Checks whether a callable name is already in use.- Specified by:
isCallableNameUsed
in interfaceScopeHandler
- Parameters:
handler
- the handler for the actoractor
- the actor name to check- See Also:
getEnforceCallableNameCheck()
-
addCallableName
public String addCallableName(ActorHandler handler, Actor actor)
Adds the callable name to the list of used ones.- Specified by:
addCallableName
in interfaceScopeHandler
- Parameters:
handler
- the handler for the actoractor
- the actor name to add- Returns:
- null if successfully added, otherwise error message
- See Also:
getEnforceCallableNameCheck()
-
isRestrictingStops
public boolean isRestrictingStops()
Returns whether stops are being restricted.- Specified by:
isRestrictingStops
in interfaceStopRestrictor
- Returns:
- true if restricting stops
-
doExecute
protected String doExecute()
Executes the actor.- Overrides:
doExecute
in classAbstractDirectedControlActor
- Returns:
- null if everything is fine, otherwise error message
-
execute
public String execute()
Executes the flow item.- Specified by:
execute
in interfaceActor
- Overrides:
execute
in classAbstractActor
- Returns:
- null if everything is fine, otherwise error message
-
wrapUp
public void wrapUp()
Finishes up the execution.- Specified by:
wrapUp
in interfaceActor
- Overrides:
wrapUp
in classAbstractDirectedControlActor
-
restrictedStopExecution
public void restrictedStopExecution()
Stops the (restricted) execution. No message set.- Specified by:
restrictedStopExecution
in interfaceStopRestrictor
-
restrictedStopExecution
public void restrictedStopExecution(String msg)
Stops the (restricted) execution.- Specified by:
restrictedStopExecution
in interfaceStopRestrictor
- Parameters:
msg
- the message to set as reason for stopping, can be null
-
isRestrictedStop
public boolean isRestrictedStop()
Returns whether the stop was a restricted one (that can be resumed).- Specified by:
isRestrictedStop
in interfaceStopRestrictor
- Returns:
- true if restricted stop occurred
-
cleanUp
public void cleanUp()
Cleans up after the execution has finished. Also removes graphical components.- Specified by:
cleanUp
in interfaceActor
- Specified by:
cleanUp
in interfaceCleanUpHandler
- Overrides:
cleanUp
in classAbstractDirectedControlActor
-
destroy
public void destroy()
Frees up memory in a "destructive" non-reversible way.
Cleans up the variables.- Specified by:
destroy
in interfaceActor
- Specified by:
destroy
in interfaceDestroyable
- Overrides:
destroy
in classAbstractControlActor
- See Also:
m_Variables
-
-