org.knime.core.node.workflow.execresult
Class WorkflowExecutionResult

java.lang.Object
  extended by org.knime.core.node.workflow.execresult.NodeContainerExecutionResult
      extended by org.knime.core.node.workflow.execresult.WorkflowExecutionResult
All Implemented Interfaces:
NodeContainerExecutionStatus

public class WorkflowExecutionResult
extends NodeContainerExecutionResult

Specialized execution result for WorkflowManager. Offers access to all contained node's execution result.

Author:
Bernd Wiswedel, University of Konstanz

Field Summary
 
Fields inherited from interface org.knime.core.node.workflow.execresult.NodeContainerExecutionStatus
FAILURE, SUCCESS
 
Constructor Summary
WorkflowExecutionResult(NodeID baseID)
          Creates new workflow execution result with no particular settings.
 
Method Summary
 boolean addNodeExecutionResult(NodeID id, NodeContainerExecutionResult execResult)
          Adds the execution result for a child node.
 NodeID getBaseID()
           
 NodeContainerExecutionStatus getChildStatus(int idSuffix)
          Query the execution status for a child given its node id suffix.
 Map<NodeID,NodeContainerExecutionResult> getExecutionResultMap()
           
 
Methods inherited from class org.knime.core.node.workflow.execresult.NodeContainerExecutionResult
getLogger, getNodeMessage, isSuccess, needsResetAfterLoad, setMessage, setNeedsResetAfterLoad, setSuccess, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WorkflowExecutionResult

public WorkflowExecutionResult(NodeID baseID)
Creates new workflow execution result with no particular settings.

Parameters:
baseID - The node id of the workflow (the loading procedure in the target workflow will correct the prefix).
Throws:
NullPointerException - If the argument is null.
Method Detail

getBaseID

public NodeID getBaseID()
Returns:
The base id of the workflow. Used to amend the node ids in getExecutionResultMap().

getExecutionResultMap

public Map<NodeID,NodeContainerExecutionResult> getExecutionResultMap()
Returns:
The map containing node id to their execution result, never null.

addNodeExecutionResult

public boolean addNodeExecutionResult(NodeID id,
                                      NodeContainerExecutionResult execResult)
Adds the execution result for a child node.

Parameters:
id - The node id of the child, it must have the "correct" prefix.
execResult - The execution result for the child
Returns:
true if this map did not contain an entry for this child before.
Throws:
IllegalArgumentException - If the id prefix is invalid
NullPointerException - If either argument is null

getChildStatus

public NodeContainerExecutionStatus getChildStatus(int idSuffix)
Query the execution status for a child given its node id suffix. If the child is unknown, the implementation should return NodeContainerExecutionStatus.FAILURE.

Parameters:
idSuffix - The child id suffix
Returns:
The child execution status.


Copyright, 2003 - 2010. All rights reserved.
University of Konstanz, Germany.
Chair for Bioinformatics and Information Mining, Prof. Dr. Michael R. Berthold.
You may not modify, publish, transmit, transfer or sell, reproduce, create derivative works from, distribute, perform, display, or in any way exploit any of the content, in whole or in part, except as otherwise expressly permitted in writing by the copyright owner or as specified in the license file distributed with this product.