Package org.knime.core.ui.wrapper
Class WorkflowManagerWrapper
java.lang.Object
org.knime.core.ui.wrapper.AbstractWrapper<W>
org.knime.core.ui.wrapper.NodeContainerWrapper<org.knime.core.node.workflow.WorkflowManager>
org.knime.core.ui.wrapper.WorkflowManagerWrapper
- All Implemented Interfaces:
EventListener,org.knime.core.node.workflow.NodeContainerStateObservable,org.knime.core.node.workflow.NodeProgressListener,NodeContainerUI,WorkflowManagerUI,UI,Wrapper<org.knime.core.node.workflow.WorkflowManager>
public final class WorkflowManagerWrapper
extends NodeContainerWrapper<org.knime.core.node.workflow.WorkflowManager>
implements WorkflowManagerUI
Implements the
WorkflowManagerUI interface by simply wrapping the WorkflowManager implementation.
For all return types that implement an interface (from core.api), another wrapper instance is returned.- Author:
- Martin Horn, University of Konstanz
-
Field Summary
Fields inherited from interface org.knime.core.ui.wrapper.Wrapper
WRAPPER_MAP -
Method Summary
Modifier and TypeMethodDescriptionaddConnection(org.knime.core.node.workflow.NodeID source, int sourcePort, org.knime.core.node.workflow.NodeID dest, int destPort, int[]... bendpoints) Add new connection - throw Exception if the same connection already exists.voidaddListener(org.knime.core.node.workflow.WorkflowListener listener) Add listener to list.org.knime.core.node.workflow.WorkflowAnnotationaddWorkflowAnnotation(org.knime.core.node.workflow.AnnotationData annoData, int preferredIndex) Add new workflow annotation, fire events.voidbringAnnotationToFront(org.knime.core.node.workflow.WorkflowAnnotation annotation) Resorts the internal ids to move the specified annotation to the last index.booleancanAddConnection(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.booleancanAddNewConnection(org.knime.core.node.workflow.NodeID source, int sourcePort, org.knime.core.node.workflow.NodeID dest, int destPort) booleanbooleancanCancelNode(org.knime.core.node.workflow.NodeID nodeID) Check if a node can be cancelled individually.voidCancel execution of the given NodeContainer.booleanCalled by execute-all action to (attempt to) execute all nodes in the workflow.booleancanExecuteNode(org.knime.core.node.workflow.NodeID nodeID) Check if a node can be executed either directly or via chain of nodes that include an executable node.booleancanReExecuteNode(org.knime.core.node.workflow.NodeID id) booleancanRemoveConnection(ConnectionContainerUI connection) Check if a connection can safely be removed.booleancanRemoveNode(org.knime.core.node.workflow.NodeID nodeID) Check if specific node can be removed (i.e.booleancanReplaceNode(org.knime.core.node.workflow.NodeID id) Checks whether a node can be replaced with another version of itself (i.e.booleancanResetNode(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.booleancanUpdateMetaNodeLink(org.knime.core.node.workflow.NodeID id) Returns true if the argument node is a valid metanode link and is not executing and has no successor in execution.<T> TcastNodeModel(org.knime.core.node.workflow.NodeID id, Class<T> cl) Retrieves the node with the given ID, fetches the underlyingNodeModeland casts it to the argument class.booleancontainsNodeContainer(org.knime.core.node.workflow.NodeID id) Does the workflow contain a node with the argument id?copy(org.knime.core.node.workflow.WorkflowCopyContent content) Copy the given contentorg.knime.core.node.workflow.NodeIDcreateAndAddNode(org.knime.core.node.NodeFactory<?> factory, org.knime.core.node.workflow.NodeUIInformation uiInfo) Uses given factory to create a new node and then adds new node to the workflow manager.org.knime.core.node.workflow.NodeIDcreateAndAddNode(org.knime.core.node.NodeFactory<?> factory, org.knime.core.node.workflow.NodeUIInformation uiInfo, org.knime.core.node.context.ModifiableNodeCreationConfiguration creationConfig) Uses given factory to create a new node w.r.t.cut(org.knime.core.node.workflow.WorkflowCopyContent content) Cuts, i.e.void(Try to) Execute all nodes in the workflow.booleanConvenience method: execute all and wait for execution to be done.booleanExecute all nodes and wait until workflow reaches a stable state.voidexecutePredecessorsAndWait(org.knime.core.node.workflow.NodeID id) Attempts to execute all nodes upstream of the argument node.voidexecuteUpToHere(org.knime.core.node.workflow.NodeID... ids) mark these nodes and all not-yet-executed predecessors for execution.findNodeContainer(org.knime.core.node.workflow.NodeID id) Get the node container associated with the argument id.<T> Map<org.knime.core.node.workflow.NodeID,T> Find all nodes in this workflow, whose underlyingNodeModelis of the requested type.getConnection(org.knime.core.node.workflow.ConnectionID id) Gets a connection by id.Returns the current workflow context ornullif no context is available.org.knime.core.node.workflow.EditorUIInformationReturns the editor specific settings.Receive output from workflow by means ofOutputNode.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.getIncomingConnectionsFor(org.knime.core.node.workflow.NodeID id) Get all incoming connections for a node.getInPort(int index) org.knime.core.node.workflow.NodeUIInformationGet UI information for workflow input ports.Get quickform nodes on the root level along with their currently set value.List<org.knime.core.node.workflow.NodeID>getLinkedMetaNodes(boolean recurse) The list of contained metanodes that are linked metanodes.org.knime.core.node.port.MetaPortInfo[]getMetanodeInputPortInfo(org.knime.core.node.workflow.NodeID metaNodeID) Get information on input ports of the argument (meta) node.org.knime.core.node.port.MetaPortInfo[]getMetanodeOutputPortInfo(org.knime.core.node.workflow.NodeID metaNodeID) Get information on output ports of the argument (meta) node.List<org.knime.core.node.workflow.NodeAnnotation>getNodeContainer(org.knime.core.node.workflow.NodeID id) <T> TgetNodeContainer(org.knime.core.node.workflow.NodeID id, Class<T> subclass, boolean failOnError) Get contained node container and cast to argument class.List<org.knime.core.node.workflow.NodeMessage>Deprecated.getNodeMessages(org.knime.core.node.workflow.NodeMessage.Type... types) Get all node messages, recursively collected from all contained.intintgetOutgoingConnectionsFor(org.knime.core.node.workflow.NodeID id) Get all outgoing connections for a node.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.getOutPort(int index) org.knime.core.node.workflow.NodeUIInformationGet UI information for workflow output ports.Collection<org.knime.core.node.workflow.WorkflowAnnotation>org.knime.core.node.workflow.WorkflowAnnotation[]getWorkflowAnnotations(org.knime.core.node.workflow.WorkflowAnnotationID... ids) Helper method to get the workflow annotations referenced by the respective id.getWorkflowIncomingPort(int i) getWorkflowOutgoingPort(int i) List<org.knime.core.node.workflow.FlowVariable>Get read-only access on the current workflow variables.booleanIndicates whether the workflow has credentials stored (except the implicit knime.system.default credentials that are set by KNIME Server).booleanhasUpdateableMetaNodeLink(org.knime.core.node.workflow.NodeID id) Returns true when the metanode for the given ID is a link or contains links, which have the update status set (doesn't actually check on remote side but uses cached information).booleanbooleanReturns whether the workflow is executed in wizard execution or in regular execution mode.booleanReturns true if this workflow manager is a project (which usually means that the parent is#ROOT).booleanbooleanvoidnodeUIInformationChanged(org.knime.core.node.workflow.NodeUIInformationEvent evt) Listener to annotations, etc; sets content dirty.voidorg.knime.core.node.workflow.WorkflowCopyContentpaste(WorkflowCopyUI workflowCopy) Pastes the contents of the argument workflow copy into this wfm.printNodeSummary(org.knime.core.node.workflow.NodeID prefix, int indent) Produce summary of node.voidremove(org.knime.core.node.workflow.NodeID[] nodeIDs, org.knime.core.node.workflow.ConnectionID[] connectionIDs, org.knime.core.node.workflow.WorkflowAnnotationID[] annotationIDs) Removes the given workflow parts.voidremoveListener(org.knime.core.node.workflow.WorkflowListener listener) Remove listener.voidremoveProject(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.voidremoveWorkflowVariable(String name) Remove workflow variable of given name.booleanrenameWorkflowDirectory(String newName) Renames the underlying workflow directory to the new name.replaceNode(org.knime.core.node.workflow.NodeID id, org.knime.core.node.context.ModifiableNodeCreationConfiguration creationConfig) Replaces a node with same type of node but anotherNodeCreationConfiguration, e.g.voidResets and freshly configures all nodes in this workflow.voidresetAndConfigureNode(org.knime.core.node.workflow.NodeID id) Reset node and all executed successors of a specific node and launch configure storm.voidsaveNodeSettingsToDefault(org.knime.core.node.workflow.NodeID id) Called by views ofinteractive nodes.voidsendAnnotationToBack(org.knime.core.node.workflow.WorkflowAnnotation annotation) Resorts the internal ids to move the specified annotation to the first index.voidMarks the workflow and all nodes contained as dirty in the auto-save location.voidsetEditorUIInformation(org.knime.core.node.workflow.EditorUIInformation editorInfo) Stores the editor specific settings.voidsetInPortsBarUIInfo(org.knime.core.node.workflow.NodeUIInformation inPortsBarUIInfo) Set UI information for workflow's input ports (typically aligned as a bar).voidsetInputNodes(Map<String, org.knime.core.node.dialog.ExternalNodeData> input) Counterpart toWorkflowManagerUI.getInputNodes()- it sets new values into quickform nodes on the root level.voidSet new name of this workflow or null to reset the name (will then return the workflow directory inWorkflowManagerUI.getName()or null if this flow has not been saved yet).voidsetOutPortsBarUIInfo(org.knime.core.node.workflow.NodeUIInformation outPortsBarUIInfo) Set UI information for workflow's output ports (typically aligned as a bar).voidshutdown()Attempts to cancel or running nodes in preparation for a removal of this node (or its parent) from the root.booleanwaitWhileInExecution(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.static final WorkflowManagerWrapperwrap(org.knime.core.node.workflow.WorkflowManager wfm) Wraps the object viaWrapper.wrapOrGet(Object, java.util.function.Function).Methods inherited from class org.knime.core.ui.wrapper.NodeContainerWrapper
addNodeMessageListener, addNodePropertyChangedListener, addNodeStateChangeListener, addProgressListener, addUIInformationListener, applySettingsFromDialog, areDialogAndNodeSettingsEqual, areDialogSettingsValid, canExecuteUpToHere, changeNodeLocks, clearWaitingLoopList, doRpc, findJobManager, getCustomDescription, getCustomName, getDialogPaneWithSettings, getDisplayLabel, getIcon, getIconAsStream, getID, getInteractiveViewName, getInteractiveWebViews, getJobManager, getName, getNameWithID, getNodeAnnotation, getNodeContainerState, getNodeLocks, getNodeMessage, getNodeSettings, getNodeViewName, getNrInPorts, getNrNodeViews, getNrOutPorts, getNrViews, getParent, getType, getUIInformation, getViewName, hasDataAwareDialogPane, hasDialog, hasInteractiveView, isAllInputDataAvailable, isDeletable, isDirty, progressChanged, removeNodeMessageListener, removeNodeProgressListener, removeNodePropertyChangedListener, removeNodeStateChangeListener, removeUIInformationListener, setCustomDescription, setDeletable, setDirty, setNodeMessage, setUIInformation, setUIInformationForCorrection, wrapMethods inherited from class org.knime.core.ui.wrapper.AbstractWrapper
equals, hashCode, toString, unwrapMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.knime.core.ui.node.workflow.NodeContainerUI
addNodeMessageListener, addNodePropertyChangedListener, addNodeStateChangeListener, addProgressListener, addUIInformationListener, applySettingsFromDialog, areDialogSettingsValid, canExecuteUpToHere, changeNodeLocks, clearWaitingLoopList, doRpc, findJobManager, getCustomDescription, getCustomName, getDialogPaneWithSettings, getDisplayLabel, getIconAsStream, getID, getInteractiveWebViews, getJobManager, getNameWithID, getNodeAnnotation, getNodeContainerState, getNodeLocks, getNodeMessage, getNodeSettings, getNrViews, getParent, getType, getUIInformation, getViewName, hasDataAwareDialogPane, isAllInputDataAvailable, isDeletable, isDirty, removeNodeMessageListener, removeNodeProgressListener, removeNodePropertyChangedListener, removeNodeStateChangeListener, removeUIInformationListener, setCustomDescription, setDeletable, setNodeMessage, setUIInformation, setUIInformationForCorrectionMethods inherited from interface org.knime.core.node.workflow.NodeProgressListener
progressChangedMethods inherited from interface org.knime.core.ui.node.workflow.WorkflowManagerUI
areDialogAndNodeSettingsEqual, getIcon, getInteractiveViewName, getName, getNodeViewName, getNrInPorts, getNrNodeViews, getNrOutPorts, hasDialog, hasInteractiveView, setDirty, toString
-
Method Details
-
wrap
Wraps the object viaWrapper.wrapOrGet(Object, java.util.function.Function).- Parameters:
wfm- the object to be wrapped- Returns:
- a new wrapper or a already existing one
-
removeProject
public void removeProject(org.knime.core.node.workflow.NodeID id) Description copied from interface:WorkflowManagerUIRemove a project - the same as remove node but we make sure it really looks like a project (i.e. has no in- or outports).- Specified by:
removeProjectin interfaceWorkflowManagerUI- Parameters:
id- of the project to be removed.
-
createAndAddNode
public org.knime.core.node.workflow.NodeID createAndAddNode(org.knime.core.node.NodeFactory<?> factory, org.knime.core.node.workflow.NodeUIInformation uiInfo) Description copied from interface:WorkflowManagerUIUses given factory to create a new node and then adds new node to the workflow manager. We will automatically find the next available free index for the new node within the given prefix.- Specified by:
createAndAddNodein interfaceWorkflowManagerUI- Parameters:
factory- the factory representing the new nodeuiInfo- essentially the position of the new node- Returns:
- newly created (unique) NodeID
-
createAndAddNode
public org.knime.core.node.workflow.NodeID createAndAddNode(org.knime.core.node.NodeFactory<?> factory, org.knime.core.node.workflow.NodeUIInformation uiInfo, org.knime.core.node.context.ModifiableNodeCreationConfiguration creationConfig) Description copied from interface:WorkflowManagerUIUses given factory to create a new node w.r.t. the creation configuration and then adds it to the workflow manager. We will automatically find the next available free index for the new node within the given prefix.- Specified by:
createAndAddNodein interfaceWorkflowManagerUI- Parameters:
factory- the factory representing the new nodeuiInfo- essentially the position of the new nodecreationConfig- the node creation configuration ornull- Returns:
- newly created (unique) NodeID
-
canReplaceNode
public boolean canReplaceNode(org.knime.core.node.workflow.NodeID id) Description copied from interface:WorkflowManagerUIChecks whether a node can be replaced with another version of itself (i.e. whetherWorkflowManagerUI.replaceNode(NodeID, ModifiableNodeCreationConfiguration)can be called subsequently).- Specified by:
canReplaceNodein interfaceWorkflowManagerUI- Returns:
trueif node can be replaced, otherwisefalse
-
replaceNode
public UndoableUI replaceNode(org.knime.core.node.workflow.NodeID id, org.knime.core.node.context.ModifiableNodeCreationConfiguration creationConfig) Description copied from interface:WorkflowManagerUIReplaces a node with same type of node but anotherNodeCreationConfiguration, e.g. in order to change the ports. Operation is only applicable forNativeNodeContainers. Otherwise anIllegalAccessExceptionwill be thrown. Node settings and annotation will be transfered to the new node. Incoming and outgoing connections will be kept as far as possible (if the respective input and output port is still there and compatible).- Specified by:
replaceNodein interfaceWorkflowManagerUI- Parameters:
id- the id of the node to replacecreationConfig- node creation configuration to create the new node- Returns:
- undo object
-
canRemoveNode
public boolean canRemoveNode(org.knime.core.node.workflow.NodeID nodeID) Description copied from interface:WorkflowManagerUICheck if specific node can be removed (i.e. is not currently being executed or waiting to be).- Specified by:
canRemoveNodein interfaceWorkflowManagerUI- Parameters:
nodeID- id of node to be removed- Returns:
- true if node can safely be removed.
-
remove
public void remove(org.knime.core.node.workflow.NodeID[] nodeIDs, org.knime.core.node.workflow.ConnectionID[] connectionIDs, org.knime.core.node.workflow.WorkflowAnnotationID[] annotationIDs) Description copied from interface:WorkflowManagerUIRemoves the given workflow parts. If there is no corresponding part for a given id, it will be ignored.- Specified by:
removein interfaceWorkflowManagerUI- Parameters:
nodeIDs- the ids of the nodes to be removed ornull.connectionIDs- the ids of the connections to be removed ornull.annotationIDs- the ids of the workflow annotations to be removed ornull.
-
isProject
public boolean isProject()Description copied from interface:WorkflowManagerUIReturns true if this workflow manager is a project (which usually means that the parent is#ROOT). It returns false if this workflow is only a metanode in another metanode or project.- Specified by:
isProjectin interfaceWorkflowManagerUI- Returns:
- This property.
-
canAddConnection
public boolean canAddConnection(org.knime.core.node.workflow.NodeID source, int sourcePort, org.knime.core.node.workflow.NodeID dest, int destPort) Description copied from interface:WorkflowManagerUICheck if a new connection can be added.- Specified by:
canAddConnectionin interfaceWorkflowManagerUI- Parameters:
source- node idsourcePort- port index at source nodedest- destination node iddestPort- port index at destination node- Returns:
- true if connection can be added.
-
canAddNewConnection
public boolean canAddNewConnection(org.knime.core.node.workflow.NodeID source, int sourcePort, org.knime.core.node.workflow.NodeID dest, int destPort) - Specified by:
canAddNewConnectionin interfaceWorkflowManagerUI- Parameters:
source- ID of the source nodesourcePort- Index of the sources portdest- ID of the destination nodedestPort- Index of the destination port- Returns:
- true if the connection can be added, false otherwise
-
canRemoveConnection
Description copied from interface:WorkflowManagerUICheck if a connection can safely be removed.- Specified by:
canRemoveConnectionin interfaceWorkflowManagerUI- Returns:
- true if connection is removable.
-
addConnection
public ConnectionContainerUI addConnection(org.knime.core.node.workflow.NodeID source, int sourcePort, org.knime.core.node.workflow.NodeID dest, int destPort, int[]... bendpoints) Description copied from interface:WorkflowManagerUIAdd new connection - throw Exception if the same connection already exists.- Specified by:
addConnectionin interfaceWorkflowManagerUI- Parameters:
source- node idsourcePort- port index at source nodedest- destination node iddestPort- port index at destination nodebendpoints- the connection's bendpoints, or empty ornullif none- Returns:
- newly created Connection object
-
getOutgoingConnectionsFor
public Set<ConnectionContainerUI> getOutgoingConnectionsFor(org.knime.core.node.workflow.NodeID id, int portIdx) Description copied from interface:WorkflowManagerUIReturns the set of outgoing connections for the node with the passed id at the specified port.- Specified by:
getOutgoingConnectionsForin interfaceWorkflowManagerUI- Parameters:
id- id of the node of interestportIdx- port index of that node- Returns:
- all outgoing connections for the passed node at the specified port
-
getOutgoingConnectionsFor
Description copied from interface:WorkflowManagerUIGet all outgoing connections for a node.- Specified by:
getOutgoingConnectionsForin interfaceWorkflowManagerUI- Parameters:
id- The requested node- Returns:
- All current outgoing connections in a new set.
-
getIncomingConnectionFor
public ConnectionContainerUI getIncomingConnectionFor(org.knime.core.node.workflow.NodeID id, int portIdx) Description copied from interface:WorkflowManagerUIReturns the incoming connection of the node with the passed node id at the specified port.- Specified by:
getIncomingConnectionForin interfaceWorkflowManagerUI- Parameters:
id- id of the node of interestportIdx- port index- Returns:
- incoming connection at that port of the given node or null if it doesn't exist
-
getIncomingConnectionsFor
Description copied from interface:WorkflowManagerUIGet all incoming connections for a node.- Specified by:
getIncomingConnectionsForin interfaceWorkflowManagerUI- Parameters:
id- The requested node- Returns:
- All current incoming connections in a new set.
-
getConnection
Description copied from interface:WorkflowManagerUIGets a connection by id.- Specified by:
getConnectionin interfaceWorkflowManagerUI- Parameters:
id- of the connection to return- Returns:
- the connection with the specified id
-
getMetanodeInputPortInfo
public org.knime.core.node.port.MetaPortInfo[] getMetanodeInputPortInfo(org.knime.core.node.workflow.NodeID metaNodeID) Description copied from interface:WorkflowManagerUIGet information on input ports of the argument (meta) node. It's used by the routines that allow the user to change the port information (add, delete, move).- Specified by:
getMetanodeInputPortInfoin interfaceWorkflowManagerUI- Parameters:
metaNodeID- The argument node- Returns:
- the metanode's port info.
-
getMetanodeOutputPortInfo
public org.knime.core.node.port.MetaPortInfo[] getMetanodeOutputPortInfo(org.knime.core.node.workflow.NodeID metaNodeID) Description copied from interface:WorkflowManagerUIGet information on output ports of the argument (meta) node. Similar toWorkflowManagerUI.getMetanodeInputPortInfo(NodeID).- Specified by:
getMetanodeOutputPortInfoin interfaceWorkflowManagerUI- Parameters:
metaNodeID- ...- Returns:
- ...
-
resetAndConfigureAll
public void resetAndConfigureAll()Description copied from interface:WorkflowManagerUIResets and freshly configures all nodes in this workflow.- Specified by:
resetAndConfigureAllin interfaceWorkflowManagerUI
-
executeUpToHere
public void executeUpToHere(org.knime.core.node.workflow.NodeID... ids) Description copied from interface:WorkflowManagerUImark these nodes and all not-yet-executed predecessors for execution. They will be marked first, queued when all inputs are available and finally executed.- Specified by:
executeUpToHerein interfaceWorkflowManagerUI- Parameters:
ids- node ids to mark
-
canReExecuteNode
public boolean canReExecuteNode(org.knime.core.node.workflow.NodeID id) - Specified by:
canReExecuteNodein interfaceWorkflowManagerUI- Parameters:
id- ...- Returns:
- true if node can be re-executed.
-
saveNodeSettingsToDefault
public void saveNodeSettingsToDefault(org.knime.core.node.workflow.NodeID id) Description copied from interface:WorkflowManagerUICalled by views ofinteractive nodes. It will take the settings of the NodeModel and save them in theSingleNodeContainer.SingleNodeContainerSettingsso that they become the default for the next execution.- Specified by:
saveNodeSettingsToDefaultin interfaceWorkflowManagerUI- Parameters:
id- The node in question.
-
executePredecessorsAndWait
public void executePredecessorsAndWait(org.knime.core.node.workflow.NodeID id) throws InterruptedException Description copied from interface:WorkflowManagerUIAttempts to execute all nodes upstream of the argument node. The method waits (until either all predecessors are executed or there is no further chance to execute anything).- Specified by:
executePredecessorsAndWaitin interfaceWorkflowManagerUI- Parameters:
id- The node whose upstream nodes need to be executed.- Throws:
InterruptedException- If thread is canceled during waiting (has no affect on the workflow execution).
-
canResetNode
public boolean canResetNode(org.knime.core.node.workflow.NodeID nodeID) Description copied from interface:WorkflowManagerUICheck if a node can be reset, meaning that it is executed and all of its successors are idle or executed as well. We do not want to mess with executing chains.- Specified by:
canResetNodein interfaceWorkflowManagerUI- Parameters:
nodeID- the id of the node- Returns:
- true if the node can safely be reset.
-
resetAndConfigureNode
public void resetAndConfigureNode(org.knime.core.node.workflow.NodeID id) Description copied from interface:WorkflowManagerUIReset node and all executed successors of a specific node and launch configure storm.- Specified by:
resetAndConfigureNodein interfaceWorkflowManagerUI- Parameters:
id- of first node in chain to be reset.
-
canExecuteNode
public boolean canExecuteNode(org.knime.core.node.workflow.NodeID nodeID) Description copied from interface:WorkflowManagerUICheck if a node can be executed either directly or via chain of nodes that include an executable node.- Specified by:
canExecuteNodein interfaceWorkflowManagerUI- Parameters:
nodeID- id of node- Returns:
- true if node can be executed.
-
canCancelNode
public boolean canCancelNode(org.knime.core.node.workflow.NodeID nodeID) Description copied from interface:WorkflowManagerUICheck if a node can be cancelled individually.- Specified by:
canCancelNodein interfaceWorkflowManagerUI- Parameters:
nodeID- id of node- Returns:
- true if node can be cancelled
-
canCancelAll
public boolean canCancelAll()- Specified by:
canCancelAllin interfaceWorkflowManagerUI- Returns:
- true if all nodes in this workflow / metanode can be canceled.
-
cancelExecution
Description copied from interface:WorkflowManagerUICancel execution of the given NodeContainer.- Specified by:
cancelExecutionin interfaceWorkflowManagerUI- Parameters:
nc- node to be canceled- Since:
- 3.6
-
shutdown
public void shutdown()Description copied from interface:WorkflowManagerUIAttempts to cancel or running nodes in preparation for a removal of this node (or its parent) from the root. Executing nodes, which can be disconnected from the execution (e.g. remote cluster execution) are disconnected if their status has been saved before.- Specified by:
shutdownin interfaceWorkflowManagerUI
-
executeAllAndWaitUntilDone
public boolean executeAllAndWaitUntilDone()Description copied from interface:WorkflowManagerUIConvenience method: execute all and wait for execution to be done. This method silently swallowsInterruptedExceptionand returns the state at the time of interrupt -- the interrupt state of the calling thread is reset then so use with caution.- Specified by:
executeAllAndWaitUntilDonein interfaceWorkflowManagerUI- Returns:
- true if execution was successful
- See Also:
-
executeAllAndWaitUntilDoneInterruptibly
Description copied from interface:WorkflowManagerUIExecute all nodes and wait until workflow reaches a stable state.- Specified by:
executeAllAndWaitUntilDoneInterruptiblyin interfaceWorkflowManagerUI- Returns:
- true if execution was successful
- Throws:
InterruptedException- If the calling thread is interrupted. This will not cancel the execution of the workflow.
-
waitWhileInExecution
Description copied from interface:WorkflowManagerUICauses the current thread to wait until the the workflow has reached a non-executing state unless a given timeout elapsed.- Specified by:
waitWhileInExecutionin interfaceWorkflowManagerUI- Parameters:
time- the maximum time to wait (0 or negative for waiting infinitely)unit- the time unit of thetimeargument- Returns:
falseif the waiting time detectably elapsed before return from the method, elsetrue. It returnstrueif the time argument is 0 or negative.- Throws:
InterruptedException- if the current thread is interrupted
-
canExecuteAll
public boolean canExecuteAll()Description copied from interface:WorkflowManagerUICalled by execute-all action to (attempt to) execute all nodes in the workflow. This is true when there is at least one node that is executable (even though the state of the wfm is idle).- Specified by:
canExecuteAllin interfaceWorkflowManagerUI- Returns:
- that property
-
executeAll
public void executeAll()Description copied from interface:WorkflowManagerUI(Try to) Execute all nodes in the workflow. This method only marks the end nodes for execution and then returns immediately. If a job manager is set on the WFM this one will run the execution. In any case this method returns immediately and does not wait for the execution to finish.- Specified by:
executeAllin interfaceWorkflowManagerUI- See Also:
-
printNodeSummary
Description copied from interface:WorkflowManagerUIProduce summary of node.- Specified by:
printNodeSummaryin interfaceWorkflowManagerUI- Parameters:
prefix- if containing node/workflowindent- number of leading spaces- Returns:
- string
-
getNodeContainers
- Specified by:
getNodeContainersin interfaceWorkflowManagerUI- Returns:
- all node containers within this workflow manager
-
getConnectionContainers
- Specified by:
getConnectionContainersin interfaceWorkflowManagerUI- Returns:
- collection of ConnectionContainer in this WFM
-
getNodeContainer
- Specified by:
getNodeContainerin interfaceWorkflowManagerUI- Parameters:
id- node ID- Returns:
- NodeContainer for given ID
-
containsNodeContainer
public boolean containsNodeContainer(org.knime.core.node.workflow.NodeID id) Description copied from interface:WorkflowManagerUIDoes the workflow contain a node with the argument id?- Specified by:
containsNodeContainerin interfaceWorkflowManagerUI- Parameters:
id- The id in question.- Returns:
- true if there is node with the given id, false otherwise.
-
getNodeContainer
public <T> T getNodeContainer(org.knime.core.node.workflow.NodeID id, Class<T> subclass, boolean failOnError) Description copied from interface:WorkflowManagerUIGet contained node container and cast to argument class. Throws exception if it not exists or not implementing requested class unless the flag is false.- Specified by:
getNodeContainerin interfaceWorkflowManagerUI- Type Parameters:
T- The interface or subclass theNodeContaineris expected to implement.- Parameters:
id- The node to retrieve.subclass- the expected sub class, usually sub-classes ofNodeContainerbut could also be implementing interface.failOnError- Fails if node is not found or not of expected type. Otherwise it just prints a DEBUG message.- Returns:
- The node..
-
getNodeErrorMessages
Deprecated.- Specified by:
getNodeErrorMessagesin interfaceWorkflowManagerUI- Returns:
- list of errors messages (list empty if none exist).
-
getNodeMessages
public List<org.knime.core.util.Pair<String,org.knime.core.node.workflow.NodeMessage>> getNodeMessages(org.knime.core.node.workflow.NodeMessage.Type... types) Description copied from interface:WorkflowManagerUIGet all node messages, recursively collected from all contained.- Specified by:
getNodeMessagesin interfaceWorkflowManagerUI- Parameters:
types- A list of messge types (e.g. all errors and warnings). Argument must not be empty, null or contain null values- Returns:
- list of errors messages (list empty if none exist).
-
isWriteProtected
public boolean isWriteProtected()- Specified by:
isWriteProtectedin interfaceWorkflowManagerUI- Returns:
- Whether edit operations are not permitted.
-
getLinkedMetaNodes
Description copied from interface:WorkflowManagerUIThe list of contained metanodes that are linked metanodes. If recurse flag is set, each metanode is checked recursively.- Specified by:
getLinkedMetaNodesin interfaceWorkflowManagerUI- Parameters:
recurse- ...- Returns:
- list of node ids, ids not necessarily direct childs of this WFM!
-
canUpdateMetaNodeLink
public boolean canUpdateMetaNodeLink(org.knime.core.node.workflow.NodeID id) Description copied from interface:WorkflowManagerUIReturns true if the argument node is a valid metanode link and is not executing and has no successor in execution. Used from the GUI to enable or disable the update action. It does not test whether there is a newer version of the metanode available. It may also return true even if the metanode is executed or contains executed nodes.- Specified by:
canUpdateMetaNodeLinkin interfaceWorkflowManagerUI- Parameters:
id- The metanode in question.- Returns:
- The above described property.
-
hasUpdateableMetaNodeLink
public boolean hasUpdateableMetaNodeLink(org.knime.core.node.workflow.NodeID id) Description copied from interface:WorkflowManagerUIReturns true when the metanode for the given ID is a link or contains links, which have the update status set (doesn't actually check on remote side but uses cached information). It assumes#checkUpdateMetaNodeLink(NodeID, WorkflowLoadHelper)has been called before.This method is used by an UI action and is not meant as public API.
- Specified by:
hasUpdateableMetaNodeLinkin interfaceWorkflowManagerUI- Parameters:
id- The id to the metanode.- Returns:
- if the ID is unknown or there are no metanodes with the appropriate update flag.
-
isUnlocked
public boolean isUnlocked()- Specified by:
isUnlockedin interfaceWorkflowManagerUI- Returns:
- see
WorkflowCipher#isUnlocked().
-
getPasswordHint
- Specified by:
getPasswordHintin interfaceWorkflowManagerUI- Returns:
- see
WorkflowCipher#getPasswordHint().
-
isEncrypted
public boolean isEncrypted()- Specified by:
isEncryptedin interfaceWorkflowManagerUI- Returns:
- see
WorkflowCipher#isEncrypted().
-
addListener
public void addListener(org.knime.core.node.workflow.WorkflowListener listener) Description copied from interface:WorkflowManagerUIAdd listener to list.- Specified by:
addListenerin interfaceWorkflowManagerUI- Parameters:
listener- new listener
-
removeListener
public void removeListener(org.knime.core.node.workflow.WorkflowListener listener) Description copied from interface:WorkflowManagerUIRemove listener.- Specified by:
removeListenerin interfaceWorkflowManagerUI- Parameters:
listener- listener to be removed
-
copy
Copy the given content- Specified by:
copyin interfaceWorkflowManagerUI- Parameters:
content- The content to copy (must exist).- Returns:
- An object representing the copied objects ready to be used in the
WorkflowManagerUI.paste(WorkflowCopyUI)method.
-
cut
Cuts, i.e. copies and deletes, the given content.- Specified by:
cutin interfaceWorkflowManagerUI- Parameters:
content- The content to copy and delete (must exist).- Returns:
- An object representing the copied objects ready to be used in the
WorkflowManagerUI.paste(WorkflowCopyUI)method for undo.
-
paste
Pastes the contents of the argument workflow copy into this wfm.- Specified by:
pastein interfaceWorkflowManagerUI- Parameters:
workflowCopy- The copy created withWorkflowManagerUI.copy(WorkflowCopyContent)method.- Returns:
- The new node ids of the inserted nodes and the annotations in a dedicated object.
- Throws:
IllegalArgumentException- if the workflow copy is not of typeWorkflowPersistorWrapper
-
setAutoSaveDirectoryDirtyRecursivly
public void setAutoSaveDirectoryDirtyRecursivly()Description copied from interface:WorkflowManagerUIMarks the workflow and all nodes contained as dirty in the auto-save location.- Specified by:
setAutoSaveDirectoryDirtyRecursivlyin interfaceWorkflowManagerUI
-
setName
Description copied from interface:WorkflowManagerUISet new name of this workflow or null to reset the name (will then return the workflow directory inWorkflowManagerUI.getName()or null if this flow has not been saved yet).- Specified by:
setNamein interfaceWorkflowManagerUI- Parameters:
name- The new name or null
-
renameWorkflowDirectory
Description copied from interface:WorkflowManagerUIRenames the underlying workflow directory to the new name.- Specified by:
renameWorkflowDirectoryin interfaceWorkflowManagerUI- Parameters:
newName- The name of the directory.- Returns:
- Whether that was successful.
-
getNameField
- Specified by:
getNameFieldin interfaceWorkflowManagerUI- Returns:
- the name set in the constructor or via
WorkflowManagerUI.setName(String). In comparison toWorkflowManagerUI.getName()this method does not use the workflow directory name if no other name is set.
-
setEditorUIInformation
public void setEditorUIInformation(org.knime.core.node.workflow.EditorUIInformation editorInfo) Description copied from interface:WorkflowManagerUIStores the editor specific settings. Stores a reference to the object. Does not create a copy.- Specified by:
setEditorUIInformationin interfaceWorkflowManagerUI- Parameters:
editorInfo- the settings to store
-
getEditorUIInformation
public org.knime.core.node.workflow.EditorUIInformation getEditorUIInformation()Description copied from interface:WorkflowManagerUIReturns the editor specific settings.- Specified by:
getEditorUIInformationin interfaceWorkflowManagerUI- Returns:
- the editor settings currently stored, can be
null(in that case the settings of the parent workflow manager are usually used)
-
getNrWorkflowIncomingPorts
public int getNrWorkflowIncomingPorts()- Specified by:
getNrWorkflowIncomingPortsin interfaceWorkflowManagerUI- Returns:
- The number of incoming ports
-
getNrWorkflowOutgoingPorts
public int getNrWorkflowOutgoingPorts()- Specified by:
getNrWorkflowOutgoingPortsin interfaceWorkflowManagerUI- Returns:
- The number of outgoing ports
-
getWorkflowIncomingPort
- Specified by:
getWorkflowIncomingPortin interfaceWorkflowManagerUI- Parameters:
i- Index of the port- Returns:
- The incoming port at the given index
-
getWorkflowOutgoingPort
- Specified by:
getWorkflowOutgoingPortin interfaceWorkflowManagerUI- Parameters:
i- Index of the port- Returns:
- The outgoing port at the given index
-
setInPortsBarUIInfo
public void setInPortsBarUIInfo(org.knime.core.node.workflow.NodeUIInformation inPortsBarUIInfo) Description copied from interface:WorkflowManagerUISet UI information for workflow's input ports (typically aligned as a bar).- Specified by:
setInPortsBarUIInfoin interfaceWorkflowManagerUI- Parameters:
inPortsBarUIInfo- The new UI info.
-
setOutPortsBarUIInfo
public void setOutPortsBarUIInfo(org.knime.core.node.workflow.NodeUIInformation outPortsBarUIInfo) Description copied from interface:WorkflowManagerUISet UI information for workflow's output ports (typically aligned as a bar).- Specified by:
setOutPortsBarUIInfoin interfaceWorkflowManagerUI- Parameters:
outPortsBarUIInfo- The new UI info.
-
getInPortsBarUIInfo
public org.knime.core.node.workflow.NodeUIInformation getInPortsBarUIInfo()Description copied from interface:WorkflowManagerUIGet UI information for workflow input ports.- Specified by:
getInPortsBarUIInfoin interfaceWorkflowManagerUI- Returns:
- the ui info or null if not set.
- See Also:
-
getOutPortsBarUIInfo
public org.knime.core.node.workflow.NodeUIInformation getOutPortsBarUIInfo()Description copied from interface:WorkflowManagerUIGet UI information for workflow output ports.- Specified by:
getOutPortsBarUIInfoin interfaceWorkflowManagerUI- Returns:
- the ui info or null if not set.
- See Also:
-
getWorkflowVariables
Description copied from interface:WorkflowManagerUIGet read-only access on the current workflow variables.- Specified by:
getWorkflowVariablesin interfaceWorkflowManagerUI- Returns:
- the current workflow variables, never null.
-
getInPort
Description copied from interface:WorkflowManagerUI- Specified by:
getInPortin interfaceNodeContainerUI- Specified by:
getInPortin interfaceWorkflowManagerUI- Overrides:
getInPortin classNodeContainerWrapper<org.knime.core.node.workflow.WorkflowManager>
-
getOutPort
Description copied from interface:WorkflowManagerUI- Specified by:
getOutPortin interfaceNodeContainerUI- Specified by:
getOutPortin interfaceWorkflowManagerUI- Overrides:
getOutPortin classNodeContainerWrapper<org.knime.core.node.workflow.WorkflowManager>
-
getWorkflowAnnotations
- Specified by:
getWorkflowAnnotationsin interfaceWorkflowManagerUI- Returns:
- read-only collection of all currently registered annotations.
-
getWorkflowAnnotations
public org.knime.core.node.workflow.WorkflowAnnotation[] getWorkflowAnnotations(org.knime.core.node.workflow.WorkflowAnnotationID... ids) Description copied from interface:WorkflowManagerUIHelper method to get the workflow annotations referenced by the respective id.- Specified by:
getWorkflowAnnotationsin interfaceWorkflowManagerUI- Parameters:
ids- the ids to get the annotation for- Returns:
- a new array with the annotations - might contain
null-entries if there is no annotation for the given id
-
addWorkflowAnnotation
public org.knime.core.node.workflow.WorkflowAnnotation addWorkflowAnnotation(org.knime.core.node.workflow.AnnotationData annoData, int preferredIndex) Description copied from interface:WorkflowManagerUIAdd new workflow annotation, fire events. The workflow annotation id will be set, too!- Specified by:
addWorkflowAnnotationin interfaceWorkflowManagerUI- Parameters:
annoData- to addpreferredIndex- as per WorkflowManager.addWorkflowAnnotation(AnnotationData, int)- Returns:
- a new annotation
-
bringAnnotationToFront
public void bringAnnotationToFront(org.knime.core.node.workflow.WorkflowAnnotation annotation) Description copied from interface:WorkflowManagerUIResorts the internal ids to move the specified annotation to the last index. It also updates its associated ids (of both, the passed annotation and the with the workflow manager stored annotation, if different).- Specified by:
bringAnnotationToFrontin interfaceWorkflowManagerUI- Parameters:
annotation- to bring to front
-
sendAnnotationToBack
public void sendAnnotationToBack(org.knime.core.node.workflow.WorkflowAnnotation annotation) Description copied from interface:WorkflowManagerUIResorts the internal ids to move the specified annotation to the first index. It also updates it's associated id (of both, the passed annotation and the with the workflow manager stored annotation, if different).- Specified by:
sendAnnotationToBackin interfaceWorkflowManagerUI- Parameters:
annotation- to bring to front
-
nodeUIInformationChanged
public void nodeUIInformationChanged(org.knime.core.node.workflow.NodeUIInformationEvent evt) Description copied from interface:WorkflowManagerUIListener to annotations, etc; sets content dirty.- Specified by:
nodeUIInformationChangedin interfaceWorkflowManagerUI- Parameters:
evt- Change event.
-
getNodeAnnotations
- Specified by:
getNodeAnnotationsin interfaceWorkflowManagerUI- Returns:
- a list of all node annotations in the contained flow.
-
castNodeModel
Description copied from interface:WorkflowManagerUIRetrieves the node with the given ID, fetches the underlyingNodeModeland casts it to the argument class.- Specified by:
castNodeModelin interfaceWorkflowManagerUI- Type Parameters:
T- The type the class- Parameters:
id- The node of interestcl- The class object the underlying NodeModel needs to implement- Returns:
- The casted node model.
-
findNodes
public <T> Map<org.knime.core.node.workflow.NodeID,T> findNodes(Class<T> nodeModelClass, boolean recurse) Description copied from interface:WorkflowManagerUIFind all nodes in this workflow, whose underlyingNodeModelis of the requested type. Intended purpose is to allow certain extensions (reporting, web service, ...) access to specialized nodes.- Specified by:
findNodesin interfaceWorkflowManagerUI- Type Parameters:
T- Specific NodeModel derivation or another interface implemented by NodeModel instances.- Parameters:
nodeModelClass- The class of interestrecurse- Whether to recurse into contained metanodes.- Returns:
- A (unsorted) list of nodes matching the class criterion
-
findNodeContainer
Description copied from interface:WorkflowManagerUIGet the node container associated with the argument id. Recurses into contained metanodes to find the node if it's not directly contained in this workflow level.Clients should generally use
WorkflowManagerUI.getNodeContainer(NodeID)to access directly contained nodes.- Specified by:
findNodeContainerin interfaceWorkflowManagerUI- Parameters:
id- the id of the node in question- Returns:
- The node container to the node id (never null)
-
getInputNodes
Description copied from interface:WorkflowManagerUIGet quickform nodes on the root level along with their currently set value. These are allDialogNodeincluding special nodes like "JSON Input".Method is used to allow clients to retrieve an example input.
- Specified by:
getInputNodesin interfaceWorkflowManagerUI- Returns:
- A map from
node's parameter nameto its (JSON object value)
-
setInputNodes
public void setInputNodes(Map<String, org.knime.core.node.dialog.ExternalNodeData> input) throws org.knime.core.node.InvalidSettingsExceptionDescription copied from interface:WorkflowManagerUICounterpart toWorkflowManagerUI.getInputNodes()- it sets new values into quickform nodes on the root level. All nodes as per map argument will be reset as part of this call.- Specified by:
setInputNodesin interfaceWorkflowManagerUI- Parameters:
input- a map fromnode's parameter nameto its (JSON or string object value). Invalid entries cause an exception.- Throws:
org.knime.core.node.InvalidSettingsException- If parameter name is not valid or a not uniquely defined in the workflow.
-
getExternalOutputs
Description copied from interface:WorkflowManagerUIReceive output from workflow by means ofOutputNode. If the workflow is not fully executed, the map contains only the keys of the outputs. The values are allnullin this case.- Specified by:
getExternalOutputsin interfaceWorkflowManagerUI- Returns:
- A map from node's parameter name to its node data
-
removeWorkflowVariable
Description copied from interface:WorkflowManagerUIRemove workflow variable of given name. The method may change in future versions or removed entirely (bug 1937).- Specified by:
removeWorkflowVariablein interfaceWorkflowManagerUI- Parameters:
name- of variable to be removed.
-
getContext
Description copied from interface:WorkflowManagerUIReturns the current workflow context ornullif no context is available.- Specified by:
getContextin interfaceWorkflowManagerUI- Returns:
- a workflow context or
null
-
notifyTemplateConnectionChangedListener
public void notifyTemplateConnectionChangedListener()- Specified by:
notifyTemplateConnectionChangedListenerin interfaceWorkflowManagerUI
-
hasCredentials
public boolean hasCredentials()Description copied from interface:WorkflowManagerUIIndicates whether the workflow has credentials stored (except the implicit knime.system.default credentials that are set by KNIME Server).- Specified by:
hasCredentialsin interfaceWorkflowManagerUI- Returns:
trueif credentials are stored with the workflow
-
isInWizardExecution
public boolean isInWizardExecution()Description copied from interface:WorkflowManagerUIReturns whether the workflow is executed in wizard execution or in regular execution mode.- Specified by:
isInWizardExecutionin interfaceWorkflowManagerUI- Returns:
trueif the workflow is executed in wizard execution (i.e. step by step), otherwisefalse
-