|
||||||||||
| 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 String |
CFG_CREATED_BY
Version of KNIME that has written the workflow. |
(package private) static 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(org.knime.core.node.workflow.NodeID source,
int sourcePort,
org.knime.core.node.workflow.NodeID dest,
int destPort)
Add new connection - throw Exception if the same connection already exists. |
|
void |
addListener(WorkflowListener listener)
Add listener to list. |
|
org.knime.core.node.workflow.NodeID |
addNodeAndApplyContext(NodeFactory<?> factory,
NodeCreationContext context)
|
|
void |
addWorkflowAnnotation(WorkflowAnnotation annotation)
Add new workflow annotation, fire events. |
|
void |
addWorkflowVariables(boolean skipReset,
FlowVariable... newVars)
Set new workflow variables. |
|
boolean |
areDialogAndNodeSettingsEqual()
|
|
(package private) boolean |
areSettingsValid(NodeSettingsRO settings)
|
|
(package private) void |
assembleInputSpecs(org.knime.core.node.workflow.NodeID id,
PortObjectSpec[] inSpecs)
Fill array holding all input specs for the given node. |
|
boolean |
canAddConnection(org.knime.core.node.workflow.NodeID source,
int sourcePort,
org.knime.core.node.workflow.NodeID dest,
int destPort)
Check if a new connection can be added. |
|
boolean |
canCancelNode(org.knime.core.node.workflow.NodeID nodeID)
Check if a node can be cancelled individually. |
|
(package private) void |
cancelExecution()
Cancel execution of a marked, queued, or executing node. |
|
void |
cancelExecution(NodeContainer nc)
Cancel execution of the given NodeContainer. |
|
String |
canCollapseNodesIntoMetaNode(org.knime.core.node.workflow.NodeID[] orgIDs)
Check if we can collapse selected set of nodes into a metanode. |
|
boolean |
canExecuteNode(org.knime.core.node.workflow.NodeID nodeID)
Check if a node can be executed directly. |
|
String |
canExpandMetaNode(org.knime.core.node.workflow.NodeID wfmID)
Check if we can expand the selected metanode into a set of nodes in this WFM. |
|
(package private) boolean |
canPerformReset()
|
|
boolean |
canRemoveConnection(ConnectionContainer cc)
Check if a connection can safely be removed. |
|
boolean |
canRemoveNode(org.knime.core.node.workflow.NodeID nodeID)
Check if specific node can be removed (i.e. |
|
boolean |
canResetNode(org.knime.core.node.workflow.NodeID nodeID)
Check if a node can be reset, meaning that it is executed and all of its successors are idle or executed as well. |
|
boolean |
canSetJobManager(org.knime.core.node.workflow.NodeID nodeID)
Is the node with the given ID ready to take a new job manager. |
|
boolean |
canUpdateMetaNodeLink(org.knime.core.node.workflow.NodeID id)
Returns true if the argument node is a valid meta node link and is not executing and has no successor in execution. |
|
|
castNodeModel(org.knime.core.node.workflow.NodeID id,
Class<T> cl)
Retrieves the node with the given ID, fetches the underlying NodeModel and casts it to the argument class. |
|
boolean |
checkUpdateMetaNodeLink(org.knime.core.node.workflow.NodeID id,
WorkflowLoadHelper loadHelper)
Query the template to the linked meta node with the given ID and check whether a newer version is available. |
|
(package private) void |
cleanOutputPortsInWFMConnectedToInPorts(Set<Integer> inPorts)
Clean outports of nodes connected to set of input ports. |
|
(package private) void |
cleanup()
Method that's called when the node is discarded. |
|
WorkflowManager |
collapseNodesIntoMetaNode(org.knime.core.node.workflow.NodeID[] orgIDs,
String name)
Collapse selected set of nodes into a metanode. |
|
boolean |
containsExecutedNode()
|
|
boolean |
containsNodeContainer(org.knime.core.node.workflow.NodeID id)
Does the workflow contain a node with the argument id? |
|
(package private) boolean |
continueExecutionOnLoad(NodeContainer nc,
NodeContainerPersistor persistor)
|
|
WorkflowPersistor |
copy(boolean isUndoableDeleteCommand,
WorkflowCopyContent content)
Copy the nodes with the given ids. |
|
WorkflowPersistor |
copy(WorkflowCopyContent content)
Copy the given content. |
|
WorkflowCopyContent |
copyFromAndPasteHere(WorkflowManager sourceManager,
WorkflowCopyContent content)
Copies the nodes with the given ids from the argument workflow manager into this wfm instance. |
|
org.knime.core.node.workflow.NodeID |
createAndAddNode(NodeFactory<?> factory)
Uses given Factory to create a new node and then adds new node to the workflow manager. |
|
WorkflowManager |
createAndAddProject(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,
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. |
|
static WorkflowPersistorVersion1xx |
createLoadPersistor(File directory,
WorkflowLoadHelper loadHelper)
|
|
(package private) WorkflowManager |
createSubWorkflow(WorkflowPersistor persistor,
org.knime.core.node.workflow.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(org.knime.core.node.workflow.NodeID... ids)
mark these nodes and all not-yet-executed predecessors for execution. |
|
org.knime.core.node.workflow.NodeID[] |
expandMetaNode(org.knime.core.node.workflow.NodeID wfmID)
Expand the selected metanode into a set of nodes in this WFM and remove the old metanode. |
|
|
findNodes(Class<T> nodeModelClass,
boolean recurse)
Find all nodes in this workflow, whose underlying NodeModel is
of the requested type. |
|
ConnectionContainer |
getConnection(ConnectionID id)
Gets a connection by id. |
|
Collection<ConnectionContainer> |
getConnectionContainers()
|
|
protected NodeContainerPersistor |
getCopyPersistor(HashMap<Integer,ContainerTable> tableRep,
boolean preserveDeletableFlags,
boolean isUndoableDeleteCommand)
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) HashMap<Integer,ContainerTable> |
getGlobalTableRepository()
|
|
URL |
getIcon()
|
|
ConnectionContainer |
getIncomingConnectionFor(org.knime.core.node.workflow.NodeID id,
int portIdx)
Returns the incoming connection of the node with the passed node id at the specified port. |
|
Set<ConnectionContainer> |
getIncomingConnectionsFor(org.knime.core.node.workflow.NodeID id)
Get all incoming connections for a node. |
|
WorkflowInPort |
getInPort(int index)
|
|
UIInformation |
getInPortsBarUIInfo()
Get UI information for workflow input ports. |
|
String |
getName()
Get the name of the workflow. |
|
String |
getNameField()
|
|
NodeContainer |
getNodeContainer(org.knime.core.node.workflow.NodeID id)
|
|
Collection<NodeContainer> |
getNodeContainers()
|
|
List<org.knime.core.node.workflow.NodeMessage> |
getNodeErrorMessages()
|
|
NodeView<NodeModel> |
getNodeView(int i)
Return the view with the specified index provided by the node. |
|
String |
getNodeViewName(int i)
|
|
int |
getNrInPorts()
|
|
int |
getNrNodeViews()
Returns the number of views provided by the node implementation. |
|
int |
getNrOutPorts()
|
|
int |
getNrWorkflowIncomingPorts()
|
|
int |
getNrWorkflowOutgoingPorts()
|
|
Set<ConnectionContainer> |
getOutgoingConnectionsFor(org.knime.core.node.workflow.NodeID id)
Get all outgoing connections for a node. |
|
Set<ConnectionContainer> |
getOutgoingConnectionsFor(org.knime.core.node.workflow.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. |
|
MetaNodeTemplateInformation |
getTemplateInformation()
|
|
NodeFactory.NodeType |
getType()
|
|
(package private) Workflow |
getWorkflow()
|
|
Collection<WorkflowAnnotation> |
getWorkflowAnnotations()
|
|
NodeOutPort |
getWorkflowIncomingPort(int i)
|
|
NodeInPort |
getWorkflowOutgoingPort(int i)
|
|
List<FlowVariable> |
getWorkflowVariables()
Get read-only access on the current workflow variables. |
|
ReferencedFile |
getWorkingDir()
Get working folder associated with this WFM. |
|
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. |
|
boolean |
isWriteProtected()
Is this workflow represents a linked meta node (locked for edit). |
|
WorkflowPersistor.WorkflowLoadResult |
load(File directory,
ExecutionMonitor exec,
WorkflowLoadHelper loadHelper,
boolean keepNodeMessages)
Loads the workflow contained in the directory as node into this workflow instance. |
|
WorkflowPersistor.WorkflowLoadResult |
load(WorkflowPersistorVersion1xx persistor,
ExecutionMonitor exec,
boolean keepNodeMessages)
Loads the content of the argument persistor into this node. |
|
(package private) WorkflowCopyContent |
loadContent(NodeContainerPersistor nodePersistor,
Map<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(org.knime.core.node.workflow.NodeID id,
NodeSettingsRO settings)
Load Settings into specified node. |
|
static WorkflowPersistor.WorkflowLoadResult |
loadProject(File directory,
ExecutionMonitor exec,
WorkflowLoadHelper loadHelper)
|
|
(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(Set<Integer> inPorts,
boolean markExecutedNodes)
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. |
|
void |
nodeUIInformationChanged(NodeUIInformationEvent evt)
Listener to annotations, etc; sets content dirty. |
|
protected void |
notifyNodePropertyChangedListener(NodePropertyChangedEvent.NodeProperty property)
|
|
WorkflowCopyContent |
paste(WorkflowPersistor persistor)
Pastes the contents of the argument persistor into this wfm. |
|
void |
pauseLoopExecution(NodeContainer nc)
Pause loop execution of the given NodeContainer (=loop end). |
|
(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. |
|
String |
printNodeSummary(org.knime.core.node.workflow.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 |
removeAnnotation(WorkflowAnnotation annotation)
Remove workflow annotation, fire events. |
|
void |
removeConnection(ConnectionContainer cc)
Remove connection. |
|
void |
removeListener(WorkflowListener listener)
Remove listener. |
|
void |
removeNode(org.knime.core.node.workflow.NodeID nodeID)
Remove node if possible. |
|
void |
removeProject(org.knime.core.node.workflow.NodeID id)
Remove a project - the same as remove node but we make sure it really looks like a project (i.e. |
|
void |
removeWorkflowVariable(String name)
Remove workflow variable of given name. |
|
boolean |
renameWorkflowDirectory(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(org.knime.core.node.workflow.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(Set<Integer> inPorts)
Reset all nodes in this workflow that are connected to the given inports. |
|
void |
resumeLoopExecution(NodeContainer nc,
boolean oneStep)
Resume operation of a paused loop. |
|
void |
save(File directory,
ExecutionMonitor exec,
boolean isSaveData)
|
|
MetaNodeTemplateInformation |
saveAsMetaNodeTemplate(File directory,
ExecutionMonitor exec)
|
|
void |
saveNodeSettings(org.knime.core.node.workflow.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(org.knime.core.node.workflow.NodeID nodeID,
NodeExecutionJobManager jobMgr)
Sets a new job manager on the node with the given ID. |
|
void |
setName(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). |
|
protected void |
setNodeContainerDirectory(ReferencedFile directory)
|
|
void |
setOutPortsBarUIInfo(UIInformation outPortsBarUIInfo)
Set UI information for workflow's output ports (typically aligned as a bar). |
|
(package private) void |
setTemplateInformation(MetaNodeTemplateInformation tI)
Set new template info (not null!), fire events. |
|
MetaNodeTemplateInformation |
setTemplateInformation(org.knime.core.node.workflow.NodeID id,
MetaNodeTemplateInformation templateInformation)
Sets the argument template info on the node with the given ID. |
|
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. |
|
String |
toString()
|
|
void |
updateCredentials(Credentials... credentialsList)
Update user/password fields in the credentials store assigned to the workflow and update the node configuration. |
|
WorkflowPersistor.MetaNodeLinkUpdateResult |
updateMetaNodeLink(org.knime.core.node.workflow.NodeID id,
ExecutionMonitor exec,
WorkflowLoadHelper loadHelper)
Update link meta nodes with the given ID. |
|
boolean |
waitWhileInExecution(long time,
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 String CFG_VERSION
static final String CFG_CREATED_BY
| Method Detail |
|---|
Workflow getWorkflow()
public WorkflowManager createAndAddProject(String name)
name - The name of the workflow (null value is ok)
public void removeProject(org.knime.core.node.workflow.NodeID id)
id - of the project to be removed.public org.knime.core.node.workflow.NodeID createAndAddNode(NodeFactory<?> factory)
factory - NodeFactory used to create the new node
public org.knime.core.node.workflow.NodeID addNodeAndApplyContext(NodeFactory<?> factory,
NodeCreationContext context)
factory - context -
public boolean canRemoveNode(org.knime.core.node.workflow.NodeID nodeID)
nodeID - id of node to be removed
public void removeNode(org.knime.core.node.workflow.NodeID nodeID)
nodeID - id of node to be removed
public WorkflowManager createAndAddSubWorkflow(PortType[] inPorts,
PortType[] outPorts,
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,
org.knime.core.node.workflow.NodeID newID)
persistor - to read fromnewID - new id to be used
WorkflowManager
public ConnectionContainer addConnection(org.knime.core.node.workflow.NodeID source,
int sourcePort,
org.knime.core.node.workflow.NodeID dest,
int destPort)
source - node idsourcePort - port index at source nodedest - destination node iddestPort - port index at destination node
IllegalArgumentException - if connection already exists
public boolean canAddConnection(org.knime.core.node.workflow.NodeID source,
int sourcePort,
org.knime.core.node.workflow.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 Set<ConnectionContainer> getOutgoingConnectionsFor(org.knime.core.node.workflow.NodeID id,
int portIdx)
id - id of the node of interestportIdx - port index of that node
public Set<ConnectionContainer> getOutgoingConnectionsFor(org.knime.core.node.workflow.NodeID id)
id - The requested node
IllegalArgumentException - If the node is unknown or null.
public ConnectionContainer getIncomingConnectionFor(org.knime.core.node.workflow.NodeID id,
int portIdx)
id - id of the node of interestportIdx - port index
public Set<ConnectionContainer> getIncomingConnectionsFor(org.knime.core.node.workflow.NodeID id)
id - The requested node
IllegalArgumentException - If the node is unknown or null.public ConnectionContainer getConnection(ConnectionID id)
id - of the connection to return
public void loadNodeSettings(org.knime.core.node.workflow.NodeID id,
NodeSettingsRO settings)
throws org.knime.core.node.InvalidSettingsException
id - of nodesettings - to be load by node
org.knime.core.node.InvalidSettingsException - if settings are wrong
IllegalArgumentException - if node does not exist
public void saveNodeSettings(org.knime.core.node.workflow.NodeID id,
NodeSettingsWO settings)
throws org.knime.core.node.InvalidSettingsException
id - of nodesettings - to be saved to
org.knime.core.node.InvalidSettingsException - thrown if nonsense is written
void markForExecutionNodesInWFMConnectedToInPorts(Set<Integer> inPorts,
boolean markExecutedNodes)
inPorts - set of port indices of the WFM.markExecutedNodes - if true also (re)mark executed nodes.void reconfigureAllNodesOnlyInThisWFM()
void resetAndReconfigureAllNodesInWFM()
@Deprecated public void resetAll()
resetAndConfigureAll() instead
public void resetAndConfigureAll()
void resetAllNodesInWFM()
void resetNodesInWFMConnectedToInPorts(Set<Integer> inPorts)
inPorts - set of port indices of the WFM.void cleanOutputPortsInWFMConnectedToInPorts(Set<Integer> inPorts)
inPorts - set of port indices of the WFM.public void executeUpToHere(org.knime.core.node.workflow.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)
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)public String canExpandMetaNode(org.knime.core.node.workflow.NodeID wfmID)
orgID - the id of the metanode to be expanded
public org.knime.core.node.workflow.NodeID[] expandMetaNode(org.knime.core.node.workflow.NodeID wfmID)
throws IllegalArgumentException
orgID - the id of the metanode to be expanded
IllegalArgumentException - if expand can not be donepublic String canCollapseNodesIntoMetaNode(org.knime.core.node.workflow.NodeID[] orgIDs)
orgIDs - the ids of the nodes to be moved to the new metanode.
public WorkflowManager collapseNodesIntoMetaNode(org.knime.core.node.workflow.NodeID[] orgIDs,
String name)
throws IllegalArgumentException
orgIDs - the ids of the nodes to be moved to the new metanode.name - of the new metanode
IllegalArgumentException - if collapse can not be doneboolean isResetable()
isResetable in class NodeContainerboolean canPerformReset()
canPerformReset 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(org.knime.core.node.workflow.NodeID nodeID)
nodeID - the id of the node
void invokeResetOnPortSuccessors(int inportIndex)
inportIndex - index of port.public void resetAndConfigureNode(org.knime.core.node.workflow.NodeID id)
id - of first node in chain to be reset.public boolean canExecuteNode(org.knime.core.node.workflow.NodeID nodeID)
nodeID - id of node
public boolean canCancelNode(org.knime.core.node.workflow.NodeID nodeID)
nodeID - id of node
void cancelExecution()
cancelExecution in class NodeContainerpublic void cancelExecution(NodeContainer nc)
nc - node to be canceledpublic void pauseLoopExecution(NodeContainer nc)
nc - node to be canceled
public void resumeLoopExecution(NodeContainer nc,
boolean oneStep)
nc - public boolean canSetJobManager(org.knime.core.node.workflow.NodeID nodeID)
nodeID - The node in question.
setJobManager(NodeID, NodeExecutionJobManager) method.
public void setJobManager(org.knime.core.node.workflow.NodeID nodeID,
NodeExecutionJobManager jobMgr)
nodeID - The node in question.jobMgr - The new job manager (may be null to use parent's one).
IllegalStateException - If the node is not ready
IllegalArgumentException - If the node is unknowncanSetJobManager(NodeID)public void shutdown()
void performShutdown()
performShutdown in class NodeContainerpublic boolean executeAllAndWaitUntilDone()
public boolean waitWhileInExecution(long time,
TimeUnit unit)
throws 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.
InterruptedException - if the current thread is interruptedpublic void executeAll()
boolean continueExecutionOnLoad(NodeContainer nc,
NodeContainerPersistor persistor)
throws org.knime.core.node.InvalidSettingsException,
NodeExecutionJobReconnectException
org.knime.core.node.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 NodeContainerHashMap<Integer,ContainerTable> getGlobalTableRepository()
void assembleInputSpecs(org.knime.core.node.workflow.NodeID id,
PortObjectSpec[] inSpecs)
id - of nodeinSpecs - return array for specs of all predecessors
public String printNodeSummary(org.knime.core.node.workflow.NodeID prefix,
int indent)
prefix - if containing node/workflowindent - number of leading spaces
public String toString()
toString in class NodeContainerpublic Collection<NodeContainer> getNodeContainers()
public Collection<ConnectionContainer> getConnectionContainers()
public NodeContainer getNodeContainer(org.knime.core.node.workflow.NodeID id)
id - node ID
public boolean containsNodeContainer(org.knime.core.node.workflow.NodeID id)
id - The id in question.
public boolean containsExecutedNode()
public List<org.knime.core.node.workflow.NodeMessage> getNodeErrorMessages()
public boolean isWriteProtected()
public MetaNodeTemplateInformation getTemplateInformation()
void setTemplateInformation(MetaNodeTemplateInformation tI)
tI - the new templateInformation
public boolean checkUpdateMetaNodeLink(org.knime.core.node.workflow.NodeID id,
WorkflowLoadHelper loadHelper)
throws IOException
id - The ID of the linked meta nodeloadHelper - The load helper to load the template
IOException - If that fails (template not accessible)public boolean canUpdateMetaNodeLink(org.knime.core.node.workflow.NodeID id)
id - The meta node in question.
public WorkflowPersistor.MetaNodeLinkUpdateResult updateMetaNodeLink(org.knime.core.node.workflow.NodeID id,
ExecutionMonitor exec,
WorkflowLoadHelper loadHelper)
throws CanceledExecutionException
id - The ids of the meta node (must be existing meta node
and must be a link).exec - The execution monitor used to load a copy of the templateloadHelper - A load helper.
CanceledExecutionException - If canceled
IllegalArgumentException - If the node does not exist or is not a
meta node.
public MetaNodeTemplateInformation saveAsMetaNodeTemplate(File directory,
ExecutionMonitor exec)
throws IOException,
CanceledExecutionException,
LockFailedException
IOException
CanceledExecutionException
LockFailedException
public MetaNodeTemplateInformation setTemplateInformation(org.knime.core.node.workflow.NodeID id,
MetaNodeTemplateInformation templateInformation)
id - The id of the node to change (must be an existing meta node).templateInformation - the templateInformation to set
NullPointerException - If either argument is null.
IllegalArgumentException - If the id does not represent a
valid meta node.public void addListener(WorkflowListener listener)
listener - new listenerpublic void removeListener(WorkflowListener listener)
listener - listener to be removedprotected void notifyNodePropertyChangedListener(NodePropertyChangedEvent.NodeProperty property)
notifyNodePropertyChangedListener in class NodeContainer
protected NodeContainerPersistor getCopyPersistor(HashMap<Integer,ContainerTable> tableRep,
boolean preserveDeletableFlags,
boolean isUndoableDeleteCommand)
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).isUndoableDeleteCommand - If to keep the location of the
node directories (important for undo of delete commands, see
copy(boolean, WorkflowCopyContent)
for details.)
public WorkflowCopyContent copyFromAndPasteHere(WorkflowManager sourceManager,
WorkflowCopyContent content)
sourceManager - The wfm to copy fromcontent - The content to copy (must exist in sourceManager)
public WorkflowPersistor copy(WorkflowCopyContent content)
content - The content to copy (must exist).
paste(WorkflowPersistor) method.
public WorkflowPersistor copy(boolean isUndoableDeleteCommand,
WorkflowCopyContent content)
isUndoableDeleteCommand - True if the returned persistor is used
in the delete command (which supports undo). This has two effects:
content - The content to copy (must exist).
paste(WorkflowPersistor) method.public WorkflowCopyContent paste(WorkflowPersistor persistor)
persistor - The persistor created with
copy(WorkflowCopyContent) method.
public ReferencedFile getWorkingDir()
public static WorkflowPersistor.WorkflowLoadResult loadProject(File directory,
ExecutionMonitor exec,
WorkflowLoadHelper loadHelper)
throws IOException,
org.knime.core.node.InvalidSettingsException,
CanceledExecutionException,
UnsupportedWorkflowVersionException,
LockFailedException
IOException
org.knime.core.node.InvalidSettingsException
CanceledExecutionException
UnsupportedWorkflowVersionException
LockFailedException
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 static WorkflowPersistorVersion1xx createLoadPersistor(File directory,
WorkflowLoadHelper loadHelper)
throws IOException,
UnsupportedWorkflowVersionException
IOException
UnsupportedWorkflowVersionException
public WorkflowPersistor.WorkflowLoadResult load(File directory,
ExecutionMonitor exec,
WorkflowLoadHelper loadHelper,
boolean keepNodeMessages)
throws IOException,
org.knime.core.node.InvalidSettingsException,
CanceledExecutionException,
UnsupportedWorkflowVersionException,
LockFailedException
loadProject(File, ExecutionMonitor, WorkflowLoadHelper)
.
directory - to load fromexec - For progress/cancellation (currently not supported)loadHelper - callback to load credentials and such (if available)
during load of the underlying SingleNodeContainer
(may be null).keepNodeMessages - 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).
IOException - If errors reading the "important" files fails due to
I/O problems (file not present, e.g.)
org.knime.core.node.InvalidSettingsException - If parsing the "important" files fails.
CanceledExecutionException - If canceled.
UnsupportedWorkflowVersionException - If the version of the
workflow is unknown (future version)
LockFailedException - if the flow can't be locked for opening
public WorkflowPersistor.WorkflowLoadResult load(WorkflowPersistorVersion1xx persistor,
ExecutionMonitor exec,
boolean keepNodeMessages)
throws IOException,
org.knime.core.node.InvalidSettingsException,
CanceledExecutionException,
UnsupportedWorkflowVersionException
persistor - The persistor containing the node(s) to be loaded as
children to this node.exec - For progress/cancellation (currently not supported)keepNodeMessages - 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).
IOException - If errors reading the "important" files fails due to
I/O problems (file not present, e.g.)
org.knime.core.node.InvalidSettingsException - If parsing the "important" files fails.
CanceledExecutionException - If canceled.
UnsupportedWorkflowVersionException - If the version of the
workflow is unknown (future version)
WorkflowCopyContent loadContent(NodeContainerPersistor nodePersistor,
Map<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(File directory,
ExecutionMonitor exec,
boolean isSaveData)
throws IOException,
CanceledExecutionException,
LockFailedException
IOException
CanceledExecutionException
LockFailedExceptionvoid 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(String name)
getName() or null if this flow
has not been saved yet).
name - The new name or nullpublic boolean renameWorkflowDirectory(String newName)
newName - The name of the directory.
IllegalStateException - If the workflow has not been saved yet
(has no corresponding node directory).public CredentialsStore getCredentialsStore()
public void updateCredentials(Credentials... credentialsList)
credentialsList - the list of credentials to be updated. It will
find matching crendentials in this workflow and update their fields.
IllegalArgumentException - If any of the credentials is unknownpublic String getName()
getName in class NodeContainerpublic 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 String getNodeViewName(int i)
getNodeViewName in class NodeContainer
void loadSettings(NodeSettingsRO settings)
throws org.knime.core.node.InvalidSettingsException
loadSettings in class NodeContainerorg.knime.core.node.InvalidSettingsExceptionvoid saveSettings(NodeSettingsWO settings)
saveSettings in class NodeContainerboolean areSettingsValid(NodeSettingsRO settings)
areSettingsValid in class NodeContainerpublic NodeFactory.NodeType getType()
getType in class NodeContainerpublic URL getIcon()
getIcon in class NodeContainervoid cleanup()
cleanup in class NodeContainerprotected void setNodeContainerDirectory(ReferencedFile directory)
setNodeContainerDirectory in class NodeContainerdirectory - the nodeContainerDirectory to setpublic 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 List<FlowVariable> getWorkflowVariables()
public void addWorkflowVariables(boolean skipReset,
FlowVariable... newVars)
newVars - new variables to be setskipReset - if false the workflow will be re-configuredpublic Collection<WorkflowAnnotation> getWorkflowAnnotations()
public void addWorkflowAnnotation(WorkflowAnnotation annotation)
annotation - to add
IllegalArgumentException - If annotation already registered.public void removeAnnotation(WorkflowAnnotation annotation)
annotation - to remove
IllegalArgumentException - If annotation is not registered.public void nodeUIInformationChanged(NodeUIInformationEvent evt)
nodeUIInformationChanged in interface NodeUIInformationListenerevt - Change event.
public <T> T castNodeModel(org.knime.core.node.workflow.NodeID id,
Class<T> cl)
NodeModel and casts it to the argument class.
T - The type the classid - The node of interestcl - The class object the underlying NodeModel needs to implement
IllegalArgumentException - If the node does not exist, is not
a SingleNodeContainer or the model does not implement the
requested type.
public <T> Map<org.knime.core.node.workflow.NodeID,T> findNodes(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 derivation or another interface
implemented by NodeModel instances.nodeModelClass - The class of interestrecurse - Whether to recurse into contained meta nodes.
public void removeWorkflowVariable(String name)
name - of variable to be removed.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||