use of org.apache.airavata.workflow.model.graph.system.DifferedInputNode in project airavata by apache.
the class DifferedInputHandler method onlyWaitingOnIncompleteDifferedInputNode.
public static boolean onlyWaitingOnIncompleteDifferedInputNode(Node node) {
List<DataPort> inputPorts = node.getInputPorts();
boolean atleadOneDifferedInputNodeIsIncomplete = false;
for (DataPort dataPort : inputPorts) {
Node fromNode = dataPort.getFromNode();
if (NodeController.isFinished(fromNode)) {
// no op
} else if (isDifferedInputNode(fromNode)) {
// not finished
if (!((DifferedInputNode) node).isConfigured()) {
// not configured differed node this is what we are looking for
// set the flag and ensure all the rest is finished
atleadOneDifferedInputNodeIsIncomplete = true;
}
} else {
// there is a not finished non differed input node
return false;
}
}
// if not finished nodes were found we wil not be here so
return atleadOneDifferedInputNodeIsIncomplete;
}
use of org.apache.airavata.workflow.model.graph.system.DifferedInputNode in project airavata by apache.
the class DifferedInputHandler method handleDifferredInputsofDependentNodes.
public static void handleDifferredInputsofDependentNodes(Node node, final XBayaGUI xbayaGUI) {
List<DataPort> inputPorts = node.getInputPorts();
for (DataPort dataPort : inputPorts) {
Node fromNode = dataPort.getFromNode();
if (isDifferedInputNode(fromNode)) {
final DifferedInputNode differedInputNode = (DifferedInputNode) fromNode;
if (!differedInputNode.isConfigured()) {
// not configured differed node this is what we are looking for
// set the flag and ensure all the rest is finished
Runnable task = new Runnable() {
@Override
public void run() {
((DifferedInputNodeGUI) NodeController.getGUI(differedInputNode)).showConfigurationDialog(xbayaGUI);
}
};
new Thread(task).start();
}
}
}
}
use of org.apache.airavata.workflow.model.graph.system.DifferedInputNode in project airavata by apache.
the class DifferedInputComponent method createNode.
/**
* @see edu.indiana.extreme.xbaya.component.Component#createNode(edu.indiana.extreme.xbaya.graph.Graph)
*/
@Override
public DifferedInputNode createNode(Graph graph) {
DifferedInputNode node = new DifferedInputNode(graph);
node.setName(NAME);
node.setComponent(this);
// Creates a unique ID for the node. This has to be after setName().
node.createID();
// Creates a output port
createPorts(node);
return node;
}
Aggregations