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 classFlow.ErrorHandlingEnum 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 StringFILENAMEthe filename for flow settings.protected Actorm_AfterExecuteActorthe actor that was executed after the flow finished.protected CallableNamesRecorderm_CallableNamesthe callable names.protected intm_DefaultCloseOperationthe default close operation.protected booleanm_EnforceCallableNameCheckwhether the callable name check is enforced.protected Flow.ErrorHandlingm_ErrorHandlingthe error handling.protected PostFlowExecutionm_ExecuteOnErrorgenerator for flow to execute in case of an abnormal stop.protected Actorm_ExecuteOnErrorActorthe actor to execute in case of an abnormal stop.protected PostFlowExecutionm_ExecuteOnFinishgenerator for flow to execute in case the flow finishes normal.protected Actorm_ExecuteOnFinishActorthe external actor to execute in case the flow finishes normal.protected FlowExecutionListenerm_FlowExecutionListenerthe execution listener to use.protected booleanm_FlowExecutionListeningEnabledwhether flow execution listening is enabled.protected booleanm_FlowExecutionListeningStartedwhether flow execution listening has started.protected intm_FlowIDthe flow ID.protected AbstractFlowRestartManagerm_FlowRestartManagerthe manager for restarting the flow.protected booleanm_Headlesswhether the execution is to be headless, i.e., no GUI components.protected ArrayList<LogEntry>m_LogEntriesfor storing the LogEntry records.protected booleanm_LogErrorswhether to store errors (as LogEntry records).protected Componentm_ParentComponentthe parent component to use for interactive actors.protected PauseStateManagerm_PauseStateManagerfor managing the pause state.protected booleanm_ReadOnlywhether to mark this flow as read-only (user gets prompted).protected booleanm_Registerwhether to register the flow.protected Storagem_Storagethe storage for temporary data.protected Longm_Synchronizefor synchronizing.protected FlowVariablesm_Variablesthe 'local' variables.protected Map<Window,String>m_WindowRegisterthe 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 StringactorsTipText()Returns the tip text for this property.voidaddBreakpoint(AbstractBreakpoint breakpoint, AbstractScopeRestriction restriction, boolean showView)Adds the breakpoint to its flow execution listener setup.StringaddCallableName(ActorHandler handler, Actor actor)Adds the callable name to the list of used ones.voidaddLogEntry(LogEntry entry)Adds the LogEntry record to the internal list (in case logging is enabled).booleancanStartListeningAtRuntime()Returns whether listeners can be attached at runtime.voidcleanUp()Cleans up after the execution has finished.voidclearLogEntries()Removes all currently stored LogEntry records.intcountLogEntries()Returns the number of stored LogEntry records.voiddefineOptions()Adds options to the internal list of options.protected voidderegisterGraphicalFlowExecutionListener(FlowExecutionListener l)Deregisters the graphical flow execution listener.voidderegisterWindow(Window window)Removes the window from the register.voiddestroy()Frees up memory in a "destructive" non-reversible way.protected StringdoExecute()Executes the actor.StringerrorHandlingTipText()Returns the tip text for this property.Stringexecute()Executes the flow item.StringexecuteOnErrorTipText()Returns the tip text for this property.StringexecuteOnFinishTipText()Returns the tip text for this property.StringflowExecutionListenerTipText()Returns the tip text for this property.StringflowExecutionListeningEnabledTipText()Returns the tip text for this property.StringflowRestartManagerTipText()Returns the tip text for this property.protected voidforceVariables(Variables value)Updates the Variables instance in use.ActorHandlerInfogetActorHandlerInfo()Returns some information about the actor handler, e.g., whether it can contain standalones and the actor execution.AbstractApplicationFramegetApplicationFrame()UsesgetParentComponent()to determine the application frame.intgetDefaultCloseOperation()Returns the default close operation for frames.booleangetEnforceCallableNameCheck()Returns whether the check of callable names is enforced.Flow.ErrorHandlinggetErrorHandling()Returns how errors are handled.PostFlowExecutiongetExecuteOnError()Returns the generator for flow to execute in case the flow finishes with an error.PostFlowExecutiongetExecuteOnFinish()Returns generator for flow to execute in case the flow finishes without any errors.FlowExecutionListenergetFlowExecutionListener()Returns the current listener in use.intgetFlowID()Returns the flow ID (runtime).AbstractFlowRestartManagergetFlowRestartManager()Returns the restart manager in use.StringgetFullName()Returns the full name of the actor, i.e., the concatenated names of all parents.protected GraphicalFlowExecutionListenersHandlergetGraphicalFlowExecutionListenersHandler()Retrieves the handler for GraphicalFlowExecutionListener objects.VariablesgetLocalVariables()Returns the Variables instance to use.List<LogEntry>getLogEntries()Returns the stored LogEntry records.LogEntrygetLogEntry(int index)Returns the specified LogEntry record.booleangetLogErrors()Returns whether errors are logged.ComponentgetParentComponent()Returns the current parent component for interactive actors.PauseStateManagergetPauseStateManager()Returns the pause state manager.StringgetQuickInfo()Returns a quick info about the actor, which will be displayed in the GUI.booleangetReadOnly()Returns whether the flow is marked as read-only and the user gets prompted whether to succeed before allowing it to be edited.booleangetRegister()Returns whether to register the flow with the running flows registry, making it visible to remote commands.ActorgetRoot()Returns the root of this actor, e.g., the group at the highest level.StoragegetStorage()Returns the storage container.VariablesgetVariables()Returns the Variables instance to use.Map<Window,String>getWindowRegister()Returns the current register.StringglobalInfo()Returns a string describing the object.protected voidinitialize()Initializes the members.booleanisCallableNameUsed(ActorHandler handler, Actor actor)Checks whether a callable name is already in use.booleanisFlowExecutionListeningEnabled()Returns whether flow execution listening is enabled.booleanisHeadless()Returns whether the actor is run in headless mode.booleanisRestrictedStop()Returns whether the stop was a restricted one (that can be resumed).booleanisRestrictingStops()Returns whether stops are being restricted.StringlogErrorsTipText()Returns the tip text for this property.StringreadOnlyTipText()Returns the tip text for this property.protected voidregisterGraphicalFlowExecutionListener(FlowExecutionListener l)Registers the graphical flow execution listener.voidregisterWindow(Window window, String title)Adds the window to the register.LogEntryremoveLogEntry(int index)Removes the specified LogEntry record from the internal list.protected voidreset()Resets the scheme.voidrestrictedStopExecution()Stops the (restricted) execution.voidrestrictedStopExecution(String msg)Stops the (restricted) execution.voidsetDefaultCloseOperation(int value)Sets the default close operation for frames.voidsetEnforceCallableNameCheck(boolean value)Sets whether to enforce the callable name check.voidsetErrorHandling(Flow.ErrorHandling value)Sets how errors are handled.voidsetExecuteOnError(PostFlowExecution value)Sets the generator for flow to execute in case the flow finishes with an error.voidsetExecuteOnFinish(PostFlowExecution value)Sets the generator for flow to execute in case the flow finishes without any errors.voidsetFlowExecutionListener(FlowExecutionListener l)Sets the listener to use.voidsetFlowExecutionListeningEnabled(boolean value)Sets whether flow execution listening is enabled.voidsetFlowRestartManager(AbstractFlowRestartManager value)Sets the restart manager to use.voidsetHeadless(boolean value)Sets whether the actor is to be run in headless mode, i.e., suppressing GUI components.voidsetLogErrors(boolean value)Sets whether to log errors.voidsetParentComponent(Component value)Sets the use for interactive actors.voidsetReadOnly(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.voidsetRegister(boolean value)Sets whether to register the flow with the running flows registry, making it visible to remote commands.StringsetUp()Initializes the item for flow execution.protected StringsetUpSubActors()Performs the setUp of the sub-actors.voidsetVariables(Variables value)Ignored.voidshowGraphicalFlowExecutionListeners()Displays the graphical flow executions listeners tab.booleanstartListeningAtRuntime(FlowExecutionListener l)Attaches the listener and starts listening.voidwrapUp()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 PostFlowExecution m_ExecuteOnError
generator for flow to execute in case of an abnormal stop.
-
m_ExecuteOnErrorActor
protected Actor m_ExecuteOnErrorActor
the actor to execute in case of an abnormal stop.
-
m_ExecuteOnFinish
protected PostFlowExecution m_ExecuteOnFinish
generator for 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.
-
m_Synchronize
protected final Long m_Synchronize
for synchronizing.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfoin interfaceGlobalInfoSupporter- Specified by:
globalInfoin classAbstractOptionHandler- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classMutableConnectedControlActor
-
initialize
protected void initialize()
Initializes the members.- Overrides:
initializein classMutableConnectedControlActor
-
reset
protected void reset()
Resets the scheme.- Overrides:
resetin classAbstractControlActor
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.- Specified by:
getQuickInfoin interfaceActor- Specified by:
getQuickInfoin interfaceQuickInfoSupporter- Overrides:
getQuickInfoin classAbstractDirectedControlActor- Returns:
- null if no info available, otherwise short string
-
actorsTipText
public String actorsTipText()
Returns the tip text for this property.- Specified by:
actorsTipTextin 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(PostFlowExecution value)
Sets the generator for flow to execute in case the flow finishes with an error.- Parameters:
value- the flow generator
-
getExecuteOnError
public PostFlowExecution getExecuteOnError()
Returns the generator for flow to execute in case the flow finishes with an error.- Returns:
- the flow generator
-
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(PostFlowExecution value)
Sets the generator for flow to execute in case the flow finishes without any errors.- Parameters:
value- the flow generator
-
getExecuteOnFinish
public PostFlowExecution getExecuteOnFinish()
Returns generator for flow to execute in case the flow finishes without any errors.- Returns:
- the flow generator
-
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:
setFlowExecutionListeningEnabledin interfaceFlowExecutionListeningSupporter- Parameters:
value- true if to enable listening
-
isFlowExecutionListeningEnabled
public boolean isFlowExecutionListeningEnabled()
Returns whether flow execution listening is enabled.- Specified by:
isFlowExecutionListeningEnabledin 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:
setFlowExecutionListenerin interfaceFlowExecutionListeningSupporter- Parameters:
l- the listener to use
-
getFlowExecutionListener
public FlowExecutionListener getFlowExecutionListener()
Returns the current listener in use.- Specified by:
getFlowExecutionListenerin 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:
canStartListeningAtRuntimein interfaceFlowExecutionListeningSupporter- Returns:
- true if listeners can be attached dynamically
-
startListeningAtRuntime
public boolean startListeningAtRuntime(FlowExecutionListener l)
Attaches the listener and starts listening.- Specified by:
startListeningAtRuntimein interfaceFlowExecutionListeningSupporter- Parameters:
l- the listener to attach and use immediately,NullListenerdisables 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:
getParentComponentin interfaceActor- Overrides:
getParentComponentin 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:
isHeadlessin interfaceActor- Overrides:
isHeadlessin 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:
getActorHandlerInfoin interfaceActorHandler- Specified by:
getActorHandlerInfoin classAbstractControlActor- Returns:
- the info
-
getVariables
public Variables getVariables()
Returns the Variables instance to use.- Specified by:
getVariablesin interfaceActor- Overrides:
getVariablesin classAbstractActor- Returns:
- the scope handler
-
setVariables
public void setVariables(Variables value)
Ignored.- Specified by:
setVariablesin interfaceActor- Overrides:
setVariablesin classAbstractActor- Parameters:
value- ignored- See Also:
AbstractActor.forceVariables(Variables)
-
getLocalVariables
public Variables getLocalVariables()
Returns the Variables instance to use.- Specified by:
getLocalVariablesin interfaceVariablesHandler- Returns:
- the scope handler
-
getPauseStateManager
public PauseStateManager getPauseStateManager()
Returns the pause state manager.- Specified by:
getPauseStateManagerin interfacePauseStateHandler- Returns:
- the manager
-
getRoot
public Actor getRoot()
Returns the root of this actor, e.g., the group at the highest level.- Specified by:
getRootin interfaceActor- Overrides:
getRootin 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:
getFullNamein interfaceActor- Overrides:
getFullNamein classAbstractActor- Returns:
- the full name
-
setUpSubActors
protected String setUpSubActors()
Performs the setUp of the sub-actors.- Overrides:
setUpSubActorsin 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:
forceVariablesin classAbstractControlActor- Parameters:
value- the instance to use
-
setUp
public String setUp()
Initializes the item for flow execution.- Specified by:
setUpin interfaceActor- Overrides:
setUpin 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:
clearLogEntriesin interfaceMutableLogEntryHandler
-
getLogEntries
public List<LogEntry> getLogEntries()
Returns the stored LogEntry records.- Specified by:
getLogEntriesin 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:
addLogEntryin interfaceMutableLogEntryHandler- Parameters:
entry- the record to add- See Also:
getLogErrors()
-
getLogEntry
public LogEntry getLogEntry(int index)
Returns the specified LogEntry record.- Specified by:
getLogEntryin 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:
removeLogEntryin 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:
countLogEntriesin interfaceLogEntryHandler- Returns:
- the number of records
-
getStorage
public Storage getStorage()
Returns the storage container.- Specified by:
getStoragein 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:
setEnforceCallableNameCheckin interfaceScopeHandler- Parameters:
value- true if to enforce check
-
getEnforceCallableNameCheck
public boolean getEnforceCallableNameCheck()
Returns whether the check of callable names is enforced.- Specified by:
getEnforceCallableNameCheckin 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:
isCallableNameUsedin 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:
addCallableNamein 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:
isRestrictingStopsin interfaceStopRestrictor- Returns:
- true if restricting stops
-
doExecute
protected String doExecute()
Executes the actor.- Overrides:
doExecutein classAbstractDirectedControlActor- Returns:
- null if everything is fine, otherwise error message
-
execute
public String execute()
Executes the flow item.- Specified by:
executein interfaceActor- Overrides:
executein classAbstractActor- Returns:
- null if everything is fine, otherwise error message
-
wrapUp
public void wrapUp()
Finishes up the execution.- Specified by:
wrapUpin interfaceActor- Overrides:
wrapUpin classAbstractDirectedControlActor
-
restrictedStopExecution
public void restrictedStopExecution()
Stops the (restricted) execution. No message set.- Specified by:
restrictedStopExecutionin interfaceStopRestrictor
-
restrictedStopExecution
public void restrictedStopExecution(String msg)
Stops the (restricted) execution.- Specified by:
restrictedStopExecutionin 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:
isRestrictedStopin interfaceStopRestrictor- Returns:
- true if restricted stop occurred
-
cleanUp
public void cleanUp()
Cleans up after the execution has finished. Also removes graphical components.- Specified by:
cleanUpin interfaceActor- Specified by:
cleanUpin interfaceCleanUpHandler- Overrides:
cleanUpin classAbstractDirectedControlActor
-
destroy
public void destroy()
Frees up memory in a "destructive" non-reversible way.
Cleans up the variables.- Specified by:
destroyin interfaceActor- Specified by:
destroyin interfaceDestroyable- Overrides:
destroyin classAbstractControlActor- See Also:
m_Variables
-
-