|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.unihalle.informatik.Alida.operator.ALDOperator
de.unihalle.informatik.Alida.operator.ALDOperatorControllable
de.unihalle.informatik.Alida.workflows.ALDWorkflow
public class ALDWorkflow
Class to model a workflow in Alida.
A workflow consists of nodes each holding one ALDOperator
and
edges connecting output parameters of the source node with input parameters of the target node.
Nested Class Summary | |
---|---|
static class |
ALDWorkflow.ALDWorkflowContextType
workflow context types. |
Nested classes/interfaces inherited from class de.unihalle.informatik.Alida.operator.ALDOperatorControllable |
---|
ALDOperatorControllable.OperatorControlStatus |
Nested classes/interfaces inherited from class de.unihalle.informatik.Alida.operator.ALDOperator |
---|
ALDOperator.HidingMode |
Field Summary | |
---|---|
static String |
untitledWorkflowName
Name of a workflow with out a proper name |
protected static EventListenerList |
workflowLoadEventlistenerList
List of control event listeners attached to this class used for loading workflows. |
static String |
workflowXMLFileExtension
Standard extension for a xml file holding the external representation of a workflow. |
Fields inherited from class de.unihalle.informatik.Alida.operator.ALDOperatorControllable |
---|
configurationEventlistenerList, controlEventlistenerList, notifyListenersRecursively, operatorStatus, stepSize, stepWiseExecution |
Fields inherited from class de.unihalle.informatik.Alida.operator.ALDOperator |
---|
completeDAG, name, operatorExecutionEventlistenerList, portHashAccess, verbose, versionProvider |
Constructor Summary | |
---|---|
ALDWorkflow()
Constructor for an untitled workflow in a grappa context. |
|
ALDWorkflow(ALDWorkflow.ALDWorkflowContextType context)
Constructor for an untitled workflow |
|
ALDWorkflow(String name)
Constructor for a workflow in a grappa context. |
|
ALDWorkflow(String name,
ALDWorkflow.ALDWorkflowContextType context)
Constructor |
Method Summary | |
---|---|
static void |
addALDWorkflowClassEventListener(ALDWorkflowClassEventListener listener)
Add a listener for events thrown by the class ALDWorkflow (not an instance). |
void |
addALDWorkflowEventListener(ALDWorkflowEventListener listener)
Adds a listener to this reporter. |
void |
addParameter(ALDOpParameterDescriptor descriptor)
Add a new parameter to this workflow. |
ALDWorkflowNodeID |
copyNode(ALDWorkflowNodeID nodeId,
boolean retainInEdges,
boolean retainParameterValues)
Copy this node. |
protected ALDWorkflowNodeID |
createChildWorkflow()
Add a new workflow as a child to this workflow. |
protected ALDWorkflowNodeID |
createChildWorkflow(String name)
Add a new workflow as a child to this workflow. |
ALDWorkflowEdgeID |
createEdge(ALDWorkflowNodeID sourceNodeId,
String sourceParameterName,
ALDWorkflowNodeID targetNodeId,
String targetParameterName)
This method calls createEdge with the argument allowDataConversion = false . |
ALDWorkflowEdgeID |
createEdge(ALDWorkflowNodeID sourceNodeId,
String sourceParameterName,
ALDWorkflowNodeID targetNodeId,
String targetParameterName,
Boolean allowDataConversion)
Add an edge representing the data flow between the parameter sourceParameterName in the operator represented by the node
with sourceNodeId
to the parameter targetParameterName in the operator represented by the node with
targetNodeId . |
ALDWorkflowNodeID |
createNode(ALDOperator op)
Add a new operator to this workflow. |
ALDWorkflowNodeID |
createNode(ALDOperatorLocation location)
Add a new operator node to this workflow. |
ALDWorkflowNodeID |
createNode(String opName)
Add a new operator node to this workflow. |
static void |
fireALDWorkflowClassEvent(ALDWorkflowClassEvent aldWorkflowClassEvent)
Fire an event by the class ALDWorkflow. |
void |
fireALDWorkflowEvent(ALDWorkflowEvent event)
Sends the given event to all registered listeners. |
ALDWorkflowEdge |
getEdge(ALDWorkflowEdgeID edgeId)
Get the workflow edge associated with edgeId . |
ALDWorkflowEdge |
getEdge(ALDWorkflowNode sourceNode,
String sourceParameterName,
ALDWorkflowNode targetNode,
String targetParameterName)
Get the workflow edge connecting given edges and parameters. |
ALDWorkflowEdgeID |
getEdgeIdDuringLoading(Integer idx)
Return the edgeId of the idx-th edge according to the order of the edges in the external representation resulting from (last) loading this workflow. |
Collection<ALDWorkflowEdge> |
getEdges()
Return a collection of all edges of this workflow |
BlockingDeque<ALDWorkflowEvent> |
getEventQueue(ALDWorkflowEventListener listener)
Returns the event queue associated with the listener or null
it the listener is not registered. |
HashMap<ALDWorkflowEdgeID,Integer> |
getMappingEdgeIdToInteger()
Return the current mapping of EdgeIds to integer ids. |
HashMap<Integer,ALDWorkflowEdgeID> |
getMappingIntegerToEdgeId()
Return the current mapping of integer ids to EdgeIds. |
HashMap<Integer,ALDWorkflowNodeID> |
getMappingIntegerToNodeId()
Return the current mapping of integer ids to NodeIds. |
HashMap<ALDWorkflowNodeID,Integer> |
getMappingNodeIdToInteger()
Return the current mapping of NodeIds to integer ids. |
Collection<String> |
getMissingRequiredInputs(ALDWorkflowNodeID nodeId)
Returns the names of all required input parameters of the operator object associated with the node which are not linked and have a value of null. |
ALDWorkflowNode |
getNode(ALDWorkflowNodeID nodeId)
Get the workflow node associated with nodeId . |
ALDWorkflowNodeID |
getNodeIdDuringLoading(Integer idx)
Return the nodeId of the idx-th node according to the order of the nodes in the external representation resulting from (last) loading this workflow. |
Collection<ALDWorkflowNode> |
getNodes()
Return a collection of all nodes of this workflow |
ALDOperator |
getOperator(ALDWorkflowNodeID nodeId)
Get the operator associated with nodeId . |
Object |
getParameter(String name)
Get the value of a parameter specified by name. |
ALDWorkflowNodeID |
getShadowNodeId()
|
ALDWorkflowNodeID |
getSourceNodeId(ALDWorkflowEdgeID edgeId)
Return the NodeId of the source node of this edge |
String |
getSourceParameterName(ALDWorkflowEdgeID edgeId)
Return the source parameter name of this edge |
ALDWorkflowNode.ALDWorkflowNodeState |
getState(ALDWorkflowNodeID nodeId)
Get the state of node with nodeId . |
ALDWorkflowNodeID |
getTargetNodeId(ALDWorkflowEdgeID edgeId)
Return the NodeId of the target node of this edge |
String |
getTargetParameterName(ALDWorkflowEdgeID edgeId)
Return the target parameter name of this edge |
ALDWorkflow.ALDWorkflowContextType |
getWorkflowContext()
|
void |
handleOperatorExecutionProgressEvent(ALDOperatorExecutionProgressEvent e)
Method which is called on event occurence. |
void |
interruptExecution()
Deprecated. |
boolean |
isResetDisconnectedInput()
|
static ALDWorkflow |
load(File file)
Load a workflow from File and create a new workflow object. |
static ALDWorkflow |
load(File file,
boolean doFireEvent)
Load a workflow from File and create a new workflow object. |
static ALDWorkflow |
load(String filename)
Load a workflow from file with filename and create a new workflow object. |
static ALDWorkflow |
load(String filename,
boolean doFireEvent)
Load a workflow from file with filename and create a new workflow object. |
protected static ALDWorkflowEdge |
mapeEdgeIdToEdge(ALDWorkflowEdgeID edgeId)
Map an edgeId to its edge. |
protected static ALDWorkflowEdgeID |
mapEgdeToEdgeId(ALDWorkflowEdge edge)
|
protected static ALDWorkflowNode |
mapNodeIdToNode(ALDWorkflowNodeID nodeId)
Map a nodeId to its node. |
protected static ALDWorkflowNodeID |
mapNodeToNodeId(ALDWorkflowNode node)
Map a node to its NodeId |
void |
nodeParameterChanged(ALDWorkflowNodeID nodeId)
Notify the workflow that parameters of the operator object associated with node nodeId have changed. |
protected void |
operate()
This method does the actual work and needs to be implemented by every subclass. |
void |
print()
Print some information of the current state this operator to System.out. |
protected Object |
readResolve()
Init function for deserialized objects. |
void |
redirectSource(ALDWorkflowEdgeID edgeId,
ALDWorkflowNodeID newSourceNodeId,
String newSourceParameterName)
Call redirectSource with with the argument allowDataConversion = false . |
void |
redirectSource(ALDWorkflowEdgeID edgeId,
ALDWorkflowNodeID newSourceNodeId,
String newSourceParameterName,
Boolean allowDataConversion)
Redirect the source of an edge. |
void |
redirectTarget(ALDWorkflowEdgeID edgeId,
ALDWorkflowNodeID newTargetNodeId,
String newTargetParameterName)
Calls redirectTarget with the argument allowDataConversion = false
The same restrictions as for createEdge apply. |
void |
redirectTarget(ALDWorkflowEdgeID edgeId,
ALDWorkflowNodeID newTargetNodeId,
String newTargetParameterName,
Boolean allowDataConversion)
Redirect the target of an edge. |
protected void |
relocateNode(ALDWorkflowNodeID nodeId,
boolean disconnectEdges)
Relocate the node to this workflow. |
protected void |
relocateNodes(Collection<ALDWorkflowNodeID> nodeIds,
boolean disconnectEdges)
Relocate the nodes nodeIds and all edges of the sub graph induced by these
nodes to this workflow. |
static void |
removeALDWorkflowClassEventListener(ALDWorkflowEventListener listener)
Remove a listener for events thrown by the class ALDWorkflow (not an instance). |
void |
removeALDWorkflowEventListener(ALDWorkflowEventListener listener)
Removes a listener from this reporter. |
void |
removeEdge(ALDWorkflowEdgeID edgeId)
Remove an edge from the workflow. |
void |
removeNode(ALDWorkflowNodeID nodeId)
Remove a node with all incoming and outgoing edges from the workflow. |
protected void |
removeParameter(String parameterName)
Remove a parameter from this workflow. |
void |
runFromNode(ALDWorkflowNodeID nodeId)
Run the given node and all descendants of the given node. |
void |
runFromNode(ALDWorkflowNodeID nodeId,
boolean waitForCompletion)
Run the given node and all descendants of the given node. |
void |
runFromNode(ALDWorkflowNodeID nodeId,
boolean waitForCompletion,
boolean stepRecursively)
Run the given node and all descendants of the given node. |
void |
runNode(ALDWorkflowNodeID nodeId)
Run the given node and all its ancestors. |
void |
runNode(ALDWorkflowNodeID nodeId,
boolean waitForCompletion)
Run the given node and all its ancestors. |
void |
runNode(ALDWorkflowNodeID nodeId,
boolean waitForCompletion,
boolean stepRecursively)
Run the given node and all its ancestors. |
void |
runWorkflow()
Run the complete workflow. |
void |
runWorkflow(boolean waitForCompletion)
Run the complete workflow. |
void |
runWorkflow(boolean waitForCompletion,
boolean stepRecursively)
Run the complete workflow. |
void |
save(File file)
Save this workflow to file. |
void |
save(File file,
boolean doFireEvent)
Save this workflow to file. |
void |
save(String filename)
Save this workflow to file. |
void |
save(String filename,
boolean doFireEvent)
Save this workflow to file. |
void |
setName(String name)
Set the name of this operator |
void |
setOperator(ALDWorkflowNodeID nodeId,
ALDOperator newOp)
Set the operator associated with nodeId . |
void |
setParameter(String name,
Object value)
Set the value of a parameter specified by name. |
Methods inherited from class de.unihalle.informatik.Alida.operator.ALDOperatorControllable |
---|
addALDConfigurationEventListener, addALDControlEventListener, fireALDConfigurationEvent, fireALDControlEvent, handleALDConfigurationEvent, handleALDControlEvent, removeALDConfigurationEventListener, removeALDControlEventListener, setNotifyRecursiveFlag |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String workflowXMLFileExtension
public static final String untitledWorkflowName
protected static transient volatile EventListenerList workflowLoadEventlistenerList
Constructor Detail |
---|
public ALDWorkflow(String name) throws ALDOperatorException
name
- of the workflow
ALDOperatorException
public ALDWorkflow(String name, ALDWorkflow.ALDWorkflowContextType context) throws ALDOperatorException
name
- of the workflowcontext
- context this workflow is running in
ALDOperatorException
public ALDWorkflow() throws ALDOperatorException
ALDOperatorException
public ALDWorkflow(ALDWorkflow.ALDWorkflowContextType context) throws ALDOperatorException
name
- of the workflowcontext
- context this workflow is running in
ALDOperatorException
Method Detail |
---|
protected void operate() throws ALDOperatorException, ALDProcessingDAGException
ALDOperator
operate
in class ALDOperatorControllable
ALDOperatorException
ALDProcessingDAGException
public void setName(String name)
ALDOperator
setName
in class ALDOperator
public boolean isResetDisconnectedInput()
public ALDOperator getOperator(ALDWorkflowNodeID nodeId) throws ALDWorkflowException
nodeId
.
nodeId
- id of operator to return
null
if not existing
ALDWorkflowException
- if the node with nodeId
does not exist.public void setOperator(ALDWorkflowNodeID nodeId, ALDOperator newOp) throws ALDWorkflowException
nodeId
.
The new operator instance needs to be of the same class as the current operator instance.
nodeId
- id of operator to return
ALDWorkflowException
- if the new operator instance is of wrong type.public ALDWorkflowNode.ALDWorkflowNodeState getState(ALDWorkflowNodeID nodeId) throws ALDWorkflowException
nodeId
.
nodeId
- node id
ALDWorkflowException
- if the node with nodeId
does not exist.public ALDWorkflow.ALDWorkflowContextType getWorkflowContext()
public Collection<String> getMissingRequiredInputs(ALDWorkflowNodeID nodeId) throws ALDWorkflowException
nodeId
-
ALDWorkflowException
public ALDWorkflowNode getNode(ALDWorkflowNodeID nodeId) throws ALDWorkflowException
nodeId
.
nodeId
- id of workflow node to return
ALDWorkflowException
- if the node with nodeId
does not exist.
NullPointerException
- if nodeId
is null.public Collection<ALDWorkflowNode> getNodes()
public ALDWorkflowEdge getEdge(ALDWorkflowEdgeID edgeId) throws ALDWorkflowException
edgeId
.
edgeId
-
ALDWorkflowException
- if the edge with edgeId
does not existpublic ALDWorkflowEdge getEdge(ALDWorkflowNode sourceNode, String sourceParameterName, ALDWorkflowNode targetNode, String targetParameterName)
sourceNodeId
- sourceParameterName
- targetNodeId
- targetParameterName
-
public Collection<ALDWorkflowEdge> getEdges()
public ALDWorkflowNodeID getSourceNodeId(ALDWorkflowEdgeID edgeId) throws ALDWorkflowException
edgeId
-
ALDWorkflowException
public String getSourceParameterName(ALDWorkflowEdgeID edgeId) throws ALDWorkflowException
edgeId
-
ALDWorkflowException
public ALDWorkflowNodeID getTargetNodeId(ALDWorkflowEdgeID edgeId) throws ALDWorkflowException
edgeId
-
ALDWorkflowException
public String getTargetParameterName(ALDWorkflowEdgeID edgeId) throws ALDWorkflowException
edgeId
-
ALDWorkflowException
public HashMap<ALDWorkflowNodeID,Integer> getMappingNodeIdToInteger()
public HashMap<Integer,ALDWorkflowNodeID> getMappingIntegerToNodeId()
public HashMap<ALDWorkflowEdgeID,Integer> getMappingEdgeIdToInteger()
public HashMap<Integer,ALDWorkflowEdgeID> getMappingIntegerToEdgeId()
public ALDWorkflowNodeID getNodeIdDuringLoading(Integer idx)
#getNodeIds()
at the time of saving
the workflow represented externally.
idx
-
public ALDWorkflowEdgeID getEdgeIdDuringLoading(Integer idx)
#getEdgeIds()
at the time of saving
the workflow represented externally.
idx
-
public ALDWorkflowNodeID createNode(String opName) throws ALDWorkflowException
opName
- Name of operator to add in the new node
ALDWorkflowException
- if the operator cannot be instantiatedpublic ALDWorkflowNodeID createNode(ALDOperatorLocation location) throws ALDWorkflowException
opName
- Name of operator to add in the new node
ALDWorkflowException
- if the operator cannot be instantiatedpublic ALDWorkflowNodeID createNode(ALDOperator op) throws ALDWorkflowException
op
- Operator object to add in the new node
ALDWorkflowException
- if on OP_RUNNER context an we get more then one nodepublic ALDWorkflowNodeID copyNode(ALDWorkflowNodeID nodeId, boolean retainInEdges, boolean retainParameterValues) throws ALDWorkflowException
nodeId
- retainInEdges
- copy also all incoming edgesretainParameterValues
- copy the values of all input parameters
ALDWorkflowException
public void removeNode(ALDWorkflowNodeID nodeId) throws ALDWorkflowException
nodeId
- id of the node to be removed
ALDWorkflowException
- if the node with nodeId
does not existpublic void nodeParameterChanged(ALDWorkflowNodeID nodeId) throws ALDWorkflowException
nodeId
have changed.
nodeId
-
ALDWorkflowException
- if the node with nodeId
does not exist.public ALDWorkflowEdgeID createEdge(ALDWorkflowNodeID sourceNodeId, String sourceParameterName, ALDWorkflowNodeID targetNodeId, String targetParameterName) throws ALDWorkflowException
createEdge
with the argument allowDataConversion = false
.
sourceNodeId
- sourceParameterName
- targetNodeId
- targetParameterName
-
ALDWorkflowException
- if edge is not allowedpublic ALDWorkflowEdgeID createEdge(ALDWorkflowNodeID sourceNodeId, String sourceParameterName, ALDWorkflowNodeID targetNodeId, String targetParameterName, Boolean allowDataConversion) throws ALDWorkflowException
sourceParameterName
in the operator represented by the node
with sourceNodeId
to the parameter targetParameterName
in the operator represented by the node with
targetNodeId
.
If a nodeId is null then this nodeId refers to this workflow,
i.e. connects a parameter of the workflow.
Otherwise source and target node need to be a node of this workflow or represent the workflow itself.
The following restrictions apply for the edge to be created:
IN
or
INOUT
.
Otherwise
it needs to be of direction OUT
or
INOUT
.OUT
or
INOUT
.
Otherwise
it needs to be of direction IN
or
INOUT
.allowDataConversion
the parameters are also compatible if a data converter is available
sourceNodeId
- sourceParameterName
- targetNodeId
- targetParameterName
- allowDataConversion
- if true the edge is allowed in case of non assignable parameters if
a data converter is available
ALDWorkflowException
public void removeEdge(ALDWorkflowEdgeID edgeId) throws ALDWorkflowException
edgeId
- id of the edge to remove
ALDWorkflowException
- if edge is not allowed or the edge with edgeId
does not exist.public void redirectSource(ALDWorkflowEdgeID edgeId, ALDWorkflowNodeID newSourceNodeId, String newSourceParameterName) throws ALDWorkflowException
redirectSource
with with the argument allowDataConversion = false
.
The same restrictions as for createEdge
apply.
edgeId
- newSourceNodeId
- newSourceParameterName
- allowDataConversion
- if true the edge is allowed in case of non assignable parameters if
a data converter is available
ALDWorkflowException
- if edge is not allowed or the edge with edgeId does not existpublic void redirectSource(ALDWorkflowEdgeID edgeId, ALDWorkflowNodeID newSourceNodeId, String newSourceParameterName, Boolean allowDataConversion) throws ALDWorkflowException
createEdge
apply.
edgeId
- newSourceNodeId
- newSourceParameterName
- allowDataConversion
- if true the edge is allowed in case of non assignable parameters if
a data converter is available
ALDWorkflowException
- if edge is not allowed or the edge with edgeId does not existpublic void redirectTarget(ALDWorkflowEdgeID edgeId, ALDWorkflowNodeID newTargetNodeId, String newTargetParameterName) throws ALDWorkflowException
redirectTarget
with the argument allowDataConversion = false
The same restrictions as for createEdge
apply.
edgeId
- newTargetNodeId
- newTargetParameterName
-
ALDWorkflowException
- if edge is not allowed or the edge with edgeId does not existpublic void redirectTarget(ALDWorkflowEdgeID edgeId, ALDWorkflowNodeID newTargetNodeId, String newTargetParameterName, Boolean allowDataConversion) throws ALDWorkflowException
createEdge
apply.
edgeId
- newTargetNodeId
- newTargetParameterName
- allowDataConversion
- if true the edge is allowed in case of non assignable parameters if
a data converter is available
ALDWorkflowException
- if edge is not allowed or the edge with edgeId does not existpublic void save(String filename) throws ALDWorkflowException
filename
-
ALDWorkflowException
- if file cannot be opened for writing or serialization failspublic void save(String filename, boolean doFireEvent) throws ALDWorkflowException
filename
- doFireEvent
- if true an appropriate event is fired
ALDWorkflowException
- if file cannot be opened for writing or serialization failspublic void save(File file) throws ALDWorkflowException
filename
-
ALDWorkflowException
- if file cannot be opened for writing or serialization failspublic void save(File file, boolean doFireEvent) throws ALDWorkflowException
doFireEvent
- if true an appropriate event is firedfilename
-
ALDWorkflowException
- if file cannot be opened for writing or serialization failspublic static ALDWorkflow load(String filename) throws ALDWorkflowException
filename
and create a new workflow object.
Does not fire an LOAD event.
filename
-
ALDWorkflowException
- if file cannot be opened for reading or deserialization failspublic static ALDWorkflow load(String filename, boolean doFireEvent) throws ALDWorkflowException
filename
and create a new workflow object.
filename
- doFireEvent
- if true an appropriate event is fired
ALDWorkflowException
- if file cannot be opened for reading or deserialization failspublic static ALDWorkflow load(File file) throws ALDWorkflowException
File
and create a new workflow object.
Does not fire an LOAD event.
file
-
ALDWorkflowException
- if file cannot be opened for reading or deserialization failspublic static ALDWorkflow load(File file, boolean doFireEvent) throws ALDWorkflowException
File
and create a new workflow object.
file
- doFireEvent
- if true an appropriate event is fired
ALDWorkflowException
- if file cannot be opened for reading or deserialization failsprotected Object readResolve()
This function is called on an instance of this class being deserialized from file, prior to handing the instance over to the user. It takes care of a proper initialization of transient member variables as they are not initialized to the default values during deserialization.
readResolve
in class ALDOperator
public void runWorkflow() throws ALDWorkflowException
ALDWorkflowException
- if not all nodes are at least runnable or the execution itself failspublic void runWorkflow(boolean waitForCompletion) throws ALDWorkflowException
waitForCompletion
- if true wait for completion, otherwise return immediately
ALDWorkflowException
- if not all nodes are at least runnable or the execution itself failspublic void runWorkflow(boolean waitForCompletion, boolean stepRecursively) throws ALDWorkflowException
waitForCompletion
- if true wait for completion, otherwise return immediatelystepRecursively
- if true OP_STEP events are passed to the child operators
ALDWorkflowException
- if not all nodes are at least runnable or the execution itself failspublic void runNode(ALDWorkflowNodeID nodeId) throws ALDWorkflowException
nodeId
-
ALDWorkflowException
- if not all nodes are at least runnable or the execution itself fails,
or the node with nodeId does not existpublic void runNode(ALDWorkflowNodeID nodeId, boolean waitForCompletion) throws ALDWorkflowException
nodeId
- waitForCompletion
- if true wait for completion, otherwise return immediately
ALDWorkflowException
- if not all nodes are at least runnable or the execution itself fails,
or the node with nodeId does not existpublic void runNode(ALDWorkflowNodeID nodeId, boolean waitForCompletion, boolean stepRecursively) throws ALDWorkflowException
nodeId
- waitForCompletion
- if true wait for completion, otherwise return immediatelystepRecursively
- if true OP_STEP events are passed to the child operators
ALDWorkflowException
- if not all nodes are at least runnable or the execution itself fails,
or the node with nodeId does not existpublic void runFromNode(ALDWorkflowNodeID nodeId) throws ALDWorkflowException
nodeId
-
ALDWorkflowException
- if not all nodes are at least runnable or the execution itself fails,
or the node with nodeId does not existpublic void runFromNode(ALDWorkflowNodeID nodeId, boolean waitForCompletion) throws ALDWorkflowException
nodeId
- waitForCompletion
- if true wait for completion, otherwise return immediately
ALDWorkflowException
- if not all nodes are at least runnable or the execution itself fails,
or the node with nodeId does not existpublic void runFromNode(ALDWorkflowNodeID nodeId, boolean waitForCompletion, boolean stepRecursively) throws ALDWorkflowException
nodeId
- waitForCompletion
- if true wait for completion, otherwise return immediatelystepRecursively
- if true OP_STEP events are passed to the child operators
ALDWorkflowException
- if not all nodes are at least runnable or the execution itself fails,
or the node with nodeId does not exist@Deprecated public void interruptExecution()
protected static ALDWorkflowNode mapNodeIdToNode(ALDWorkflowNodeID nodeId)
nodeId
- the node or null if a node with the given nodeId does not exist
protected static ALDWorkflowNodeID mapNodeToNodeId(ALDWorkflowNode node)
node
- the NodeId or null (which should not happen)
protected static ALDWorkflowEdge mapeEdgeIdToEdge(ALDWorkflowEdgeID edgeId)
edgeId
- the edge or null if no edge with the given edgeId exists
protected static ALDWorkflowEdgeID mapEgdeToEdgeId(ALDWorkflowEdge edge)
public ALDWorkflowNodeID getShadowNodeId()
public void addALDWorkflowEventListener(ALDWorkflowEventListener listener)
ALDWorkflowEventReporter
addALDWorkflowEventListener
in interface ALDWorkflowEventReporter
listener
- Listener to be added.public void removeALDWorkflowEventListener(ALDWorkflowEventListener listener)
ALDWorkflowEventReporter
removeALDWorkflowEventListener
in interface ALDWorkflowEventReporter
listener
- Listener to be removed.public BlockingDeque<ALDWorkflowEvent> getEventQueue(ALDWorkflowEventListener listener)
listener
or null
it the listener is not registered.
listener
-
public void fireALDWorkflowEvent(ALDWorkflowEvent event)
ALDWorkflowEventReporter
fireALDWorkflowEvent
in interface ALDWorkflowEventReporter
event
- Event to be send to all listeners.public static void addALDWorkflowClassEventListener(ALDWorkflowClassEventListener listener)
listener
- public static void removeALDWorkflowClassEventListener(ALDWorkflowEventListener listener)
listener
- public static void fireALDWorkflowClassEvent(ALDWorkflowClassEvent aldWorkflowClassEvent)
aldWorkflowClassEvent
- public void addParameter(ALDOpParameterDescriptor descriptor) throws ALDWorkflowException
descriptor
-
ALDWorkflowException
- in case of fatal errorprotected void removeParameter(String parameterName) throws ALDWorkflowException
parameterName
-
ALDWorkflowException
- if this parameter does not exist or in case of fatal errorpublic Object getParameter(String name) throws ALDOperatorException
ALDOperator
getParameter
in class ALDOperator
name
- Name of the parameter to get the new value for
ALDOperatorException
public void setParameter(String name, Object value) throws ALDOperatorException
ALDOperator
setParameter
in class ALDOperator
name
- Name of the parameter to set a new value forvalue
- new value
ALDOperatorException
protected ALDWorkflowNodeID createChildWorkflow()
protected ALDWorkflowNodeID createChildWorkflow(String name)
name
-
protected void relocateNode(ALDWorkflowNodeID nodeId, boolean disconnectEdges)
nodeId
- protected void relocateNodes(Collection<ALDWorkflowNodeID> nodeIds, boolean disconnectEdges)
nodeIds
and all edges of the sub graph induced by these
nodes to this workflow.
If disconnectEdges
is true, all edges connecting nodeIds
to nodes outside of this sub graph are removed.
Otherwise an exception is thrown if such edges exist.
nodeIds
- disconnectEdges
- public void print()
ALDOperator
print
in class ALDOperator
public void handleOperatorExecutionProgressEvent(ALDOperatorExecutionProgressEvent e) throws ALDWorkflowException
ALDOperatorExecutionProgressEventListener
handleOperatorExecutionProgressEvent
in interface ALDOperatorExecutionProgressEventListener
handleOperatorExecutionProgressEvent
in class ALDOperator
e
- Event to be handled.
ALDWorkflowException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |