|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.knime.core.node.workflow.NodeContainer
org.knime.core.node.workflow.WorkflowManager
public final class WorkflowManager
Container holding nodes and connections of a (sub) workflow. In contrast to previous implementations, this class will now handle all control, such as transport of data and specs from node to subsequent nodes. That is, nodes do not know their pre- or successors anymore. A WorkflowManager can also play the role of a NodeContainer, thus representing a metanode/subworkflow.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.knime.core.node.workflow.NodeContainer |
|---|
NodeContainer.NodeContainerSettings, NodeContainer.State |
| Field Summary | |
|---|---|
(package private) static java.lang.String |
CFG_CREATED_BY
Version of KNIME that has written the workflow. |
(package private) static java.lang.String |
CFG_VERSION
Workflow version, indicates the "oldest" version that is compatible to the current workflow format. |
static WorkflowManager |
ROOT
The root of everything, a workflow with no in- or outputs. |
| Fields inherited from class org.knime.core.node.workflow.NodeContainer |
|---|
m_nodeMutex |
| Method Summary | ||
|---|---|---|
ConnectionContainer |
addConnection(NodeID source,
int sourcePort,
NodeID dest,
int destPort)
Add new connection - throw Exception if the same connection already exists. |
|
void |
addListener(WorkflowListener listener)
Add listener to list. |
|
void |
addWorkflowVariables(boolean skipReset,
FlowVariable... newVars)
Set new workflow variables. |
|
boolean |
areDialogAndNodeSettingsEqual()
|
|
(package private) boolean |
areSettingsValid(NodeSettingsRO settings)
|
|
(package private) void |
assembleInputSpecs(NodeID id,
PortObjectSpec[] inSpecs)
Fill array holding all input specs for the given node. |
|
boolean |
canAddConnection(NodeID source,
int sourcePort,
NodeID dest,
int destPort)
Check if a new connection can be added. |
|
(package private) void |
cancelExecution()
Cancel execution of a marked, queued, or executing node. |
|
void |
cancelExecution(NodeContainer nc)
Cancel execution of the given NodeContainer. |
|
boolean |
canExecuteNode(NodeID nodeID)
Check if a node can be executed directly. |
|
boolean |
canRemoveConnection(ConnectionContainer cc)
Check if a connection can safely be removed. |
|
boolean |
canRemoveNode(NodeID nodeID)
Check if specific node can be removed (i.e. |
|
boolean |
canResetNode(NodeID nodeID)
Check if a node can be reset, meaning that it is executed and all of it's successors are idle or executed as well. |
|
boolean |
canSetJobManager(NodeID nodeID)
Is the node with the given ID ready to take a new job manager. |
|
(package private) void |
cleanup()
Method that's called when the node is discarded. |
|
boolean |
containsNodeContainer(NodeID id)
Does the workflow contain a node with the argument id? |
|
(package private) boolean |
continueExecutionOnLoad(NodeContainer nc,
NodeContainerPersistor persistor)
|
|
WorkflowPersistor |
copy(boolean copyNCNodeDir,
NodeID... nodeIDs)
Copy the nodes with the given ids. |
|
WorkflowPersistor |
copy(NodeID... nodeIDs)
Copy the nodes with the given ids. |
|
NodeID[] |
copyFromAndPasteHere(WorkflowManager sourceManager,
NodeID... nodeIDs)
Copies the nodes with the given ids from the argument workflow manager into this wfm instance. |
|
NodeID |
createAndAddNode(NodeFactory<?> factory)
Uses given Factory to create a new node and then adds new node to the workflow manager. |
|
WorkflowManager |
createAndAddProject(java.lang.String name)
Create new project - which is the same as creating a new subworkflow at this level with no in- or outports. |
|
WorkflowManager |
createAndAddSubWorkflow(PortType[] inPorts,
PortType[] outPorts,
java.lang.String name)
Creates new meta node. |
|
WorkflowExecutionResult |
createExecutionResult(ExecutionMonitor exec)
Saves all internals that are necessary to mimic the computed result into a new execution result object. |
|
(package private) WorkflowManager |
createSubWorkflow(WorkflowPersistor persistor,
NodeID newID)
Creates new meta node from a persistor instance. |
|
(package private) void |
deleteObsoleteNodeDirs()
Delete directories of removed nodes. |
|
(package private) void |
doAfterExecution(NodeContainer nc,
NodeContainerExecutionStatus status)
Cleanup a node after execution. |
|
(package private) void |
doBeforeExecution(NodeContainer nc)
Call-back from NodeContainer called before node is actually executed. |
|
(package private) void |
doBeforePostExecution(NodeContainer nc)
Callback from NodeContainer to request a safe transition into the NodeContainer.State.POSTEXECUTE state. |
|
(package private) boolean |
doBeforePreExecution(NodeContainer nc)
Callback from NodeContainer to request a safe transition into the NodeContainer.State.PREEXECUTE state. |
|
void |
executeAll()
Convenience method: (Try to) Execute all nodes in the workflow. |
|
boolean |
executeAllAndWaitUntilDone()
Convenience method: execute all and wait for execution to be done. |
|
void |
executeUpToHere(NodeID... ids)
mark these nodes and all not-yet-executed predecessors for execution. |
|
|
findNodes(java.lang.Class<T> nodeModelClass,
boolean recurse)
Find all nodes in this workflow, whose underlying NodeModel is
of the requested type. |
|
java.util.Collection<ConnectionContainer> |
getConnectionContainers()
|
|
protected NodeContainerPersistor |
getCopyPersistor(java.util.HashMap<java.lang.Integer,ContainerTable> tableRep,
boolean preserveDeletableFlags,
boolean copyNCNodeDir)
Get a new persistor that is used to copy this node (copy&paste action). |
|
CredentialsStore |
getCredentialsStore()
Get reference to credentials store used to persist name/passwords. |
|
(package private) NodeDialogPane |
getDialogPane()
|
|
(package private) NodeDialogPane |
getDialogPaneWithSettings(PortObjectSpec[] inSpecs)
|
|
(package private) java.util.HashMap<java.lang.Integer,ContainerTable> |
getGlobalTableRepository()
|
|
java.net.URL |
getIcon()
|
|
ConnectionContainer |
getIncomingConnectionFor(NodeID id,
int portIdx)
Returns the incoming connection of the node with the passed node id at the specified port. |
|
java.util.Set<ConnectionContainer> |
getIncomingConnectionsFor(NodeID id)
Get all incoming connections for a node. |
|
WorkflowInPort |
getInPort(int index)
|
|
UIInformation |
getInPortsBarUIInfo()
Get UI information for workflow input ports. |
|
java.lang.String |
getName()
Get the name of the workflow. |
|
(package private) java.lang.String |
getNameField()
|
|
NodeContainer |
getNodeContainer(NodeID id)
|
|
java.util.Collection<NodeContainer> |
getNodeContainers()
|
|
java.util.List<NodeMessage> |
getNodeErrorMessages()
|
|
NodeView<NodeModel> |
getNodeView(int i)
Return the view with the specified index provided by the node. |
|
java.lang.String |
getNodeViewName(int i)
|
|
int |
getNrInPorts()
|
|
int |
getNrNodeViews()
Returns the number of views provided by the node implementation. |
|
int |
getNrOutPorts()
|
|
int |
getNrWorkflowIncomingPorts()
|
|
int |
getNrWorkflowOutgoingPorts()
|
|
java.util.Set<ConnectionContainer> |
getOutgoingConnectionsFor(NodeID id)
Get all outgoing connections for a node. |
|
java.util.Set<ConnectionContainer> |
getOutgoingConnectionsFor(NodeID id,
int portIdx)
Returns the set of outgoing connections for the node with the passed id at the specified port. |
|
WorkflowOutPort |
getOutPort(int index)
|
|
UIInformation |
getOutPortsBarUIInfo()
Get UI information for workflow output ports. |
|
NodeFactory.NodeType |
getType()
|
|
(package private) Workflow |
getWorkflow()
|
|
NodeOutPort |
getWorkflowIncomingPort(int i)
|
|
NodeInPort |
getWorkflowOutgoingPort(int i)
|
|
java.util.List<FlowVariable> |
getWorkflowVariables()
Get read-only access on the current workflow variables. |
|
boolean |
hasDialog()
|
|
(package private) void |
invokeResetOnPortSuccessors(int inportIndex)
Reset those nodes which are connected to a specific workflow incoming port. |
|
protected boolean |
isLocalWFM()
Is this node a to be locally executed workflow. |
|
(package private) boolean |
isResetable()
check if node can be safely reset. |
|
WorkflowPersistor.WorkflowLoadResult |
load(java.io.File directory,
ExecutionMonitor exec,
CredentialLoader credentialLoader,
boolean keepNodeMessages)
Loads the workflow contained in the directory as node into this workflow instance. |
|
(package private) NodeID[] |
loadContent(NodeContainerPersistor nodePersistor,
java.util.Map<java.lang.Integer,BufferedDataTable> tblRep,
FlowObjectStack ignoredStack,
ExecutionMonitor exec,
WorkflowPersistor.LoadResult loadResult,
boolean preserveNodeMessage)
Restore content from persistor. |
|
void |
loadExecutionResult(NodeContainerExecutionResult result,
ExecutionMonitor exec,
WorkflowPersistor.LoadResult loadResult)
Load information from execution result. |
|
void |
loadNodeSettings(NodeID id,
NodeSettingsRO settings)
Load Settings into specified node. |
|
static WorkflowPersistor.WorkflowLoadResult |
loadProject(java.io.File directory,
ExecutionMonitor exec,
CredentialLoader credentialLoader)
|
|
(package private) void |
loadSettings(NodeSettingsRO settings)
|
|
(package private) void |
markForExecution(boolean flag)
Enable (or disable) queuing of underlying node for execution. |
|
(package private) void |
markForExecutionNodesInWFMConnectedToInPorts(java.util.Set<java.lang.Integer> inPorts)
Mark all nodes in this workflow that are connected to the given inports. |
|
(package private) void |
mimicRemoteExecuted(NodeContainerExecutionStatus status)
Put this node into either the NodeContainer.State.EXECUTED or
NodeContainer.State.IDLE state depending on the argument. |
|
(package private) void |
mimicRemoteExecuting()
Marks this node as remotely executing. |
|
(package private) void |
mimicRemotePostExecute()
Puts this node (and all its children) into the NodeContainer.State.POSTEXECUTE
state. |
|
(package private) void |
mimicRemotePreExecute()
Puts this node (and all its children) into the NodeContainer.State.PREEXECUTE
state. |
|
protected void |
notifyJobManagerChangedListener()
|
|
NodeID[] |
paste(WorkflowPersistor persistor)
Pastes the contents of the argument persistor into this wfm. |
|
(package private) void |
performShutdown()
Called when the workflow is to be disposed. |
|
(package private) void |
performStateTransitionEXECUTED(NodeContainerExecutionStatus status)
This should be used to change the nodes states correctly (and likely needs to be synchronized with other changes visible to successors of this node as well!) AFTER the actual execution. |
|
(package private) void |
performStateTransitionEXECUTING()
This should be used to change the nodes states correctly (and likely needs to be synchronized with other changes visible to successors of this node as well!) BEFORE the actual execution. |
|
(package private) void |
performStateTransitionPOSTEXECUTE()
Called when the state of a node should switch from NodeContainer.State.EXECUTING (or NodeContainer.State.EXECUTINGREMOTELY) to
NodeContainer.State.POSTEXECUTE. |
|
(package private) boolean |
performStateTransitionPREEXECUTE()
Called when the state of a node should switch from NodeContainer.State.QUEUED to NodeContainer.State.PREEXECUTE. |
|
java.lang.String |
printNodeSummary(NodeID prefix,
int indent)
Produce summary of node. |
|
(package private) void |
reconfigureAllNodesOnlyInThisWFM()
Re-configure all configured (NOT executed) nodes in this workflow to make sure that new workflow variables are spread accordingly. |
|
void |
removeConnection(ConnectionContainer cc)
Remove connection. |
|
void |
removeListener(WorkflowListener listener)
Remove listener. |
|
void |
removeNode(NodeID nodeID)
Remove node if possible. |
|
void |
removeProject(NodeID id)
Remove a project - the same as remove node but we make sure it really looks like a project (i.e. |
|
void |
removeWorkflowVariable(java.lang.String name)
Remove workflow variable of given name. |
|
boolean |
renameWorkflowDirectory(java.lang.String newName)
Renames the underlying workflow directory to the new name. |
|
void |
resetAll()
Deprecated. Use resetAndConfigureAll() instead |
|
(package private) void |
resetAllNodesInWFM()
Reset all nodes in this workflow. |
|
void |
resetAndConfigureAll()
Resets and freshly configures all nodes in this workflow. |
|
void |
resetAndConfigureNode(NodeID id)
Reset node and all executed successors of a specific node. |
|
(package private) void |
resetAndReconfigureAllNodesInWFM()
Reset all executed nodes in this workflow to make sure that new workflow variables are spread accordingly. |
|
(package private) void |
resetNodesInWFMConnectedToInPorts(java.util.Set<java.lang.Integer> inPorts)
Reset all nodes in this workflow that are connected to the given inports. |
|
void |
save(java.io.File directory,
ExecutionMonitor exec,
boolean isSaveData)
|
|
void |
saveNodeSettings(NodeID id,
NodeSettingsWO settings)
write node settings into Settings object. |
|
(package private) void |
saveSettings(NodeSettingsWO settings)
|
|
void |
setDirty()
Mark this node container to be changed, that is, it needs to be saved. |
|
void |
setInPortsBarUIInfo(UIInformation inPortsBarUIInfo)
Set UI information for workflow's input ports (typically aligned as a bar). |
|
void |
setJobManager(NodeID nodeID,
NodeExecutionJobManager jobMgr)
Sets a new job manager on the node with the given ID. |
|
void |
setName(java.lang.String name)
Set new name of this workflow or null to reset the name (will then return the workflow directory in getName() or null if this flow
has not been saved yet). |
|
void |
setOutPortsBarUIInfo(UIInformation outPortsBarUIInfo)
Set UI information for workflow's output ports (typically aligned as a bar). |
|
void |
shutdown()
Attempts to cancel or running nodes in preparation for a removal of this node (or its parent) from the root. |
|
(package private) boolean |
sweep(boolean propagate)
Performs sanity check on workflow. |
|
java.lang.String |
toString()
|
|
boolean |
waitWhileInExecution(long time,
java.util.concurrent.TimeUnit unit)
Causes the current thread to wait until the the workflow has reached a non-executing state unless a given timeout elapsed. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final WorkflowManager ROOT
static final java.lang.String CFG_VERSION
static final java.lang.String CFG_CREATED_BY
| Method Detail |
|---|
Workflow getWorkflow()
public WorkflowManager createAndAddProject(java.lang.String name)
name - The name of the workflow (null value is ok)
public void removeProject(NodeID id)
id - of the project to be removed.public NodeID createAndAddNode(NodeFactory<?> factory)
factory - NodeFactory used to create the new node
public boolean canRemoveNode(NodeID nodeID)
nodeID - id of node to be removed
public void removeNode(NodeID nodeID)
nodeID - id of node to be removed
public WorkflowManager createAndAddSubWorkflow(PortType[] inPorts,
PortType[] outPorts,
java.lang.String name)
inPorts - types of external inputs (going into this workflow)outPorts - types of external outputs (exiting this workflow)name - Name of the workflow (null values will be handled)
WorkflowManager
WorkflowManager createSubWorkflow(WorkflowPersistor persistor,
NodeID newID)
persistor - to read fromnewID - new id to be used
WorkflowManager
public ConnectionContainer addConnection(NodeID source,
int sourcePort,
NodeID dest,
int destPort)
source - node idsourcePort - port index at source nodedest - destination node iddestPort - port index at destination node
java.lang.IllegalArgumentException - if connection already exists
public boolean canAddConnection(NodeID source,
int sourcePort,
NodeID dest,
int destPort)
source - node idsourcePort - port index at source nodedest - destination node iddestPort - port index at destination node
public boolean canRemoveConnection(ConnectionContainer cc)
cc - connection
public void removeConnection(ConnectionContainer cc)
cc - connection
public java.util.Set<ConnectionContainer> getOutgoingConnectionsFor(NodeID id,
int portIdx)
id - id of the node of interestportIdx - port index of that node
public java.util.Set<ConnectionContainer> getOutgoingConnectionsFor(NodeID id)
id - The requested node
java.lang.IllegalArgumentException - If the node is unknown or null.
public ConnectionContainer getIncomingConnectionFor(NodeID id,
int portIdx)
id - id of the node of interestportIdx - port index
public java.util.Set<ConnectionContainer> getIncomingConnectionsFor(NodeID id)
id - The requested node
java.lang.IllegalArgumentException - If the node is unknown or null.
public void loadNodeSettings(NodeID id,
NodeSettingsRO settings)
throws InvalidSettingsException
id - of nodesettings - to be load by node
InvalidSettingsException - if settings are wrong
java.lang.IllegalArgumentException - if node does not exist
public void saveNodeSettings(NodeID id,
NodeSettingsWO settings)
throws InvalidSettingsException
id - of nodesettings - to be saved to
InvalidSettingsException - thrown if nonsense is writtenvoid markForExecutionNodesInWFMConnectedToInPorts(java.util.Set<java.lang.Integer> inPorts)
inPorts - set of port indices of the WFM.void reconfigureAllNodesOnlyInThisWFM()
void resetAndReconfigureAllNodesInWFM()
@Deprecated public void resetAll()
resetAndConfigureAll() instead
public void resetAndConfigureAll()
void resetAllNodesInWFM()
void resetNodesInWFMConnectedToInPorts(java.util.Set<java.lang.Integer> inPorts)
inPorts - set of port indices of the WFM.public void executeUpToHere(NodeID... ids)
ids - node ids to markboolean doBeforePreExecution(NodeContainer nc)
NodeContainer.State.PREEXECUTE state. This method is mostly
only called with SingleNodeContainer as argument but may also be
called with a remotely executed meta node.
nc - node whose execution is about to start
void doBeforePostExecution(NodeContainer nc)
NodeContainer.State.POSTEXECUTE state. This method is mostly
only called with SingleNodeContainer as argument but may also be
called with a remotely executed meta node.
nc - node whose execution is ending (and is now copying
result data, e.g.)void doBeforeExecution(NodeContainer nc)
SingleNodeContainer, although
it can also be a meta node (i.e. a WorkflowManager), which
is executed remotely (execution takes place as a single operation).
nc - node whose execution is about to start
IllegalFlowObjectStackException - If loop end nodes have
problems identifying their start node
void doAfterExecution(NodeContainer nc,
NodeContainerExecutionStatus status)
NodeContainer.performStateTransitionEXECUTED(NodeContainerExecutionStatus).
This method also takes care of restarting loops, if there are any to be
continued.
As in doBeforeExecution(NodeContainer) the argument node is
usually a SingleNodeContainer but can also be a remotely executed
WorkflowManager.
nc - node which just finished executionstatus - indicates if node execution was finished successfully
(note that this does not imply State=EXECUTED e.g. for loop ends)boolean isResetable()
isResetable in class NodeContainervoid markForExecution(boolean flag)
markForExecution in class NodeContainerflag - determines if node is marked or unmarked for executionvoid mimicRemoteExecuting()
mimicRemoteExecuting in class NodeContainervoid mimicRemotePreExecute()
NodeContainer.State.PREEXECUTE
state. This method is used when a workflow is executed remotely.
mimicRemotePreExecute in class NodeContainervoid mimicRemotePostExecute()
NodeContainer.State.POSTEXECUTE
state. This method is used when a workflow is executed remotely.
mimicRemotePostExecute in class NodeContainervoid mimicRemoteExecuted(NodeContainerExecutionStatus status)
NodeContainer.State.EXECUTED or
NodeContainer.State.IDLE state depending on the argument. This method is
applied recursively on all of this node's children (if a meta node).
mimicRemoteExecuted in class NodeContainerstatus - Where to get the success flag from.boolean performStateTransitionPREEXECUTE()
NodeContainer.State.QUEUED to NodeContainer.State.PREEXECUTE. The method is to be
called from the node's parent in a synchronized environment.
performStateTransitionPREEXECUTE in class NodeContainervoid performStateTransitionEXECUTING()
performStateTransitionEXECUTING in class NodeContainervoid performStateTransitionPOSTEXECUTE()
NodeContainer.State.EXECUTING (or NodeContainer.State.EXECUTINGREMOTELY) to
NodeContainer.State.POSTEXECUTE. The method is to be called from the node's
parent in a synchronized environment.
performStateTransitionPOSTEXECUTE in class NodeContainervoid performStateTransitionEXECUTED(NodeContainerExecutionStatus status)
performStateTransitionEXECUTED in class NodeContainerstatus - indicates if execution was successfulpublic boolean canResetNode(NodeID nodeID)
nodeID - the id of the node
void invokeResetOnPortSuccessors(int inportIndex)
inportIndex - index of port.public void resetAndConfigureNode(NodeID id)
id - of first node in chain to be reset.public boolean canExecuteNode(NodeID nodeID)
nodeID - id of node
void cancelExecution()
cancelExecution in class NodeContainerpublic void cancelExecution(NodeContainer nc)
nc - node to be canceledpublic boolean canSetJobManager(NodeID nodeID)
nodeID - The node in question.
setJobManager(NodeID, NodeExecutionJobManager) method.
public void setJobManager(NodeID nodeID,
NodeExecutionJobManager jobMgr)
nodeID - The node in question.jobMgr - The new job manager (may be null to use parent's one).
java.lang.IllegalStateException - If the node is not ready
java.lang.IllegalArgumentException - If the node is unknowncanSetJobManager(NodeID)public void shutdown()
void performShutdown()
performShutdown in class NodeContainerpublic boolean executeAllAndWaitUntilDone()
public boolean waitWhileInExecution(long time,
java.util.concurrent.TimeUnit unit)
throws java.lang.InterruptedException
time - the maximum time to wait
(0 or negative for waiting infinitely)unit - the time unit of the time argument
false if the waiting time detectably elapsed
before return from the method, else true. It returns
true if the time argument is 0 or negative.
java.lang.InterruptedException - if the current thread is interruptedpublic void executeAll()
boolean continueExecutionOnLoad(NodeContainer nc,
NodeContainerPersistor persistor)
throws InvalidSettingsException,
NodeExecutionJobReconnectException
InvalidSettingsException
NodeExecutionJobReconnectExceptionpublic boolean hasDialog()
hasDialog in class NodeContainer
NodeDialogPane getDialogPaneWithSettings(PortObjectSpec[] inSpecs)
throws NotConfigurableException
getDialogPaneWithSettings in class NodeContainerNotConfigurableExceptionNodeDialogPane getDialogPane()
getDialogPane in class NodeContainerpublic boolean areDialogAndNodeSettingsEqual()
areDialogAndNodeSettingsEqual in class NodeContainerjava.util.HashMap<java.lang.Integer,ContainerTable> getGlobalTableRepository()
void assembleInputSpecs(NodeID id,
PortObjectSpec[] inSpecs)
id - of nodeinSpecs - return array for specs of all predecessors
public java.lang.String printNodeSummary(NodeID prefix,
int indent)
prefix - if containing node/workflowindent - number of leading spaces
public java.lang.String toString()
toString in class NodeContainerpublic java.util.Collection<NodeContainer> getNodeContainers()
public java.util.Collection<ConnectionContainer> getConnectionContainers()
public NodeContainer getNodeContainer(NodeID id)
id - node ID
public boolean containsNodeContainer(NodeID id)
id - The id in question.
public java.util.List<NodeMessage> getNodeErrorMessages()
public void addListener(WorkflowListener listener)
listener - new listenerpublic void removeListener(WorkflowListener listener)
listener - listener to be removedprotected void notifyJobManagerChangedListener()
notifyJobManagerChangedListener in class NodeContainer
protected NodeContainerPersistor getCopyPersistor(java.util.HashMap<java.lang.Integer,ContainerTable> tableRep,
boolean preserveDeletableFlags,
boolean copyNCNodeDir)
getCopyPersistor in class NodeContainertableRep - Table repository of the destination.preserveDeletableFlags - Whether the "isdeleteable" annotation
should be copied also (false when individual nodes are copied
but true when an entire meta node is copied).copyNCNodeDir - If to keep the location of the node directories
(important for undo of delete commands, see
copy(boolean, NodeID...) for details.)
public NodeID[] copyFromAndPasteHere(WorkflowManager sourceManager,
NodeID... nodeIDs)
sourceManager - The wfm to copy fromnodeIDs - The node ids to copy (must exist in sourceManager)
public WorkflowPersistor copy(NodeID... nodeIDs)
nodeIDs - The nodes to copy (must exist).
paste(WorkflowPersistor) method.
public WorkflowPersistor copy(boolean copyNCNodeDir,
NodeID... nodeIDs)
copyNCNodeDir - True if the returned persistor should also keep
the locations of the node's directories (e.g.
<workflow>/File Reader (#xy)/). This is true if the copy serves
as backup of an undoable delete command (undoable = undo enabled).
If it is undone, the directories must not be cleared before the
next save (in order to keep the drop folder)nodeIDs - The nodes to copy (must exist).
paste(WorkflowPersistor) method.public NodeID[] paste(WorkflowPersistor persistor)
persistor - The persistor created with copy(NodeID...).
public static WorkflowPersistor.WorkflowLoadResult loadProject(java.io.File directory,
ExecutionMonitor exec,
CredentialLoader credentialLoader)
throws java.io.IOException,
InvalidSettingsException,
CanceledExecutionException
java.io.IOException
InvalidSettingsException
CanceledExecutionException
public WorkflowExecutionResult createExecutionResult(ExecutionMonitor exec)
throws CanceledExecutionException
#loadExecutionResult(NodeContainerExecutionResult, ExecutionMonitor, LoadResult)
is called).
createExecutionResult in class NodeContainerexec - For progress information (this method will copy port
objects).
CanceledExecutionException - If canceled.
public void loadExecutionResult(NodeContainerExecutionResult result,
ExecutionMonitor exec,
WorkflowPersistor.LoadResult loadResult)
super.loadEx....
loadExecutionResult in class NodeContainerresult - The execution result (contains port objects, messages, etc)exec - For progress information (no cancelation supported)loadResult - A load result that contains, e.g. error messages.
public WorkflowPersistor.WorkflowLoadResult load(java.io.File directory,
ExecutionMonitor exec,
CredentialLoader credentialLoader,
boolean keepNodeMessages)
throws java.io.IOException,
InvalidSettingsException,
CanceledExecutionException
WorkflowManager#loadProject(File, ExecutionMonitor).
directory - to load fromexec - For progress/cancellation (currently not supported)credentialLoader - callback to load credentials (if available)
during load of the underlying SingleNodeContainerkeepNodeMessages - Whether to keep the messages that are associated
with the nodes in the loaded workflow (mostly false but true when
remotely computed results are loaded).
java.io.IOException - If errors reading the "important" files fails due to
I/O problems (file not present, e.g.)
InvalidSettingsException - If parsing the "important" files fails.
CanceledExecutionException - If canceled.
NodeID[] loadContent(NodeContainerPersistor nodePersistor,
java.util.Map<java.lang.Integer,BufferedDataTable> tblRep,
FlowObjectStack ignoredStack,
ExecutionMonitor exec,
WorkflowPersistor.LoadResult loadResult,
boolean preserveNodeMessage)
throws CanceledExecutionException
loadContent in class NodeContainernodePersistor - To load from.tblRep - A table repository to restore BufferedDatTablesignoredStack - Incoming FlowObjectStack.exec - For progressloadResult - Where to report errors/warnings topreserveNodeMessage - Whether possible node messages in the
persistor are to be preserved (parameter to configure method
that is called during load).
CanceledExecutionException - If canceled.
public void save(java.io.File directory,
ExecutionMonitor exec,
boolean isSaveData)
throws java.io.IOException,
CanceledExecutionException
java.io.IOException
CanceledExecutionExceptionvoid deleteObsoleteNodeDirs()
boolean sweep(boolean propagate)
propagate - Whether to also reflect state changes in our parent
protected boolean isLocalWFM()
This method returns false for all single node container.
isLocalWFM in class NodeContainerpublic void setDirty()
setDirty in class NodeContainerpublic int getNrInPorts()
getNrInPorts in class NodeContainerpublic WorkflowInPort getInPort(int index)
getInPort in class NodeContainerpublic WorkflowOutPort getOutPort(int index)
getOutPort in class NodeContainerpublic int getNrOutPorts()
getNrOutPorts in class NodeContainerpublic void setName(java.lang.String name)
getName() or null if this flow
has not been saved yet).
name - The new name or nullpublic boolean renameWorkflowDirectory(java.lang.String newName)
newName - The name of the directory.
java.lang.IllegalStateException - If the workflow has not been saved yet
(has no corresponding node directory).public CredentialsStore getCredentialsStore()
public java.lang.String getName()
getName in class NodeContainerjava.lang.String getNameField()
setName(String).
In comparison to getName() this method does not use the workflow
directory name if no other name is set.public int getNrNodeViews()
getNrNodeViews in class NodeContainerpublic NodeView<NodeModel> getNodeView(int i)
getNodeView in class NodeContaineri - the view to create
public java.lang.String getNodeViewName(int i)
getNodeViewName in class NodeContainer
void loadSettings(NodeSettingsRO settings)
throws InvalidSettingsException
loadSettings in class NodeContainerInvalidSettingsExceptionvoid saveSettings(NodeSettingsWO settings)
saveSettings in class NodeContainerboolean areSettingsValid(NodeSettingsRO settings)
areSettingsValid in class NodeContainerpublic NodeFactory.NodeType getType()
getType in class NodeContainerpublic java.net.URL getIcon()
getIcon in class NodeContainervoid cleanup()
cleanup in class NodeContainerpublic int getNrWorkflowIncomingPorts()
public int getNrWorkflowOutgoingPorts()
public NodeOutPort getWorkflowIncomingPort(int i)
public NodeInPort getWorkflowOutgoingPort(int i)
public void setInPortsBarUIInfo(UIInformation inPortsBarUIInfo)
inPortsBarUIInfo - The new UI info.public void setOutPortsBarUIInfo(UIInformation outPortsBarUIInfo)
outPortsBarUIInfo - The new UI info.public UIInformation getInPortsBarUIInfo()
setInPortsBarUIInfo(UIInformation)public UIInformation getOutPortsBarUIInfo()
setOutPortsBarUIInfo(UIInformation)public java.util.List<FlowVariable> getWorkflowVariables()
public void addWorkflowVariables(boolean skipReset,
FlowVariable... newVars)
newVars - new variables to be setskipReset - if false the workflow will be re-configured
public <T extends NodeModel> java.util.Map<NodeID,T> findNodes(java.lang.Class<T> nodeModelClass,
boolean recurse)
NodeModel is
of the requested type. Intended purpose is to allow certain extensions
(reporting, web service, ...) access to specialized nodes.
T - Specific NodeModel type.nodeModelClass - The class of interestrecurse - Whether to recurse into contained meta nodes.
public void removeWorkflowVariable(java.lang.String name)
name - of variable to be removed.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||