use of org.apache.airavata.workflow.model.graph.system.OutputNode in project airavata by apache.
the class OutputNodeGUI method showConfigurationDialog.
/**
* Shows a configuration window when a user click the configuration area.
*
* @param engine
*/
@Override
protected void showConfigurationDialog(XBayaGUI xbayaGUI) {
if (this.node instanceof OutputNode) {
String description = ((OutputNode) this.node).getDescription();
if (null != description) {
// try to parse it to a URL and if yes try to open the browser
try {
description = description.trim();
URL url = new URL(description);
// no exception -> valid url lets try to open it
BrowserLauncher.openURL(url);
} catch (Exception e) {
// do nothing since this is an optional attempt
}
}
}
if (this.configurationWindow == null) {
this.configurationWindow = new OutputConfigurationDialog(this.outputNode, xbayaGUI);
}
this.configurationWindow.show();
}
use of org.apache.airavata.workflow.model.graph.system.OutputNode in project airavata by apache.
the class BPELScript method removeUnnecessaryNodes.
// private GpelSequence createMainSequence() throws GraphException {
// GpelSequence sequence = new GpelSequence(this.bpelNS);
//
// // Remove InputNodes and MemoNodes.
// removeUnnecessaryNodes(this.remainNodes);
//
// addInitialReceive(sequence);
//
// addBlock(this.remainNodes, sequence);
//
// addFinalReply(sequence);
//
// if (this.remainNodes.size() > 0) {
// throw new GraphException("Some node(s) are not connected.");
// }
//
// return sequence;
// }
//
// private void addInitialReceive(GpelSequence sequence) {
// // Create a partner link
// String partnerLinkName = WORKFLOW_PARTNER_LINK;
// XmlNamespace partnerLinkTypeNS = this.workflowWSDL.getTargetNamespace();
// String partnerLinkTypeName = this.workflowPrefix + PARTNER_LINK_TYPE_SUFFIX;
// String myRollName = this.workflowPrefix + MY_ROLE_SUFFIX;
//
// this.process.addPartnerLink(partnerLinkName, partnerLinkTypeNS, partnerLinkTypeName, myRollName, null);
// this.workflowWSDL.addPartnerLinkTypeAndRoll(partnerLinkTypeName, myRollName,
// this.workflowWSDL.getPortTypeQName());
//
// // Create a variable
// this.process.addMessageVariable(WORKFLOW_INPUT_NAME, this.targetNamespace,
// this.workflowWSDL.getWorkflowInputMessageName());
//
// GpelReceive receive = new GpelReceive(this.bpelNS, WORKFLOW_PARTNER_LINK, this.workflowWSDL.getPortTypeQName(),
// this.workflowWSDL.getWorkflowOperationName());
// receive.setGpelVariableName(WORKFLOW_INPUT_NAME);
// sequence.addActivity(receive);
// }
//
// private void addFinalReply(GpelSequence sequence) throws GraphException {
// // Create a variable
// this.process.addMessageVariable(WORKFLOW_OUTPUT_NAME, this.targetNamespace,
// this.workflowWSDL.getWorkflowOutputMessageName());
//
// List<GpelAssignCopy> copies = new ArrayList<GpelAssignCopy>();
// List<OutputNode> outputNodes = GraphUtil.getNodes(this.graph, OutputNode.class);
// this.remainNodes.removeAll(outputNodes);
// for (OutputNode outputNode : outputNodes) {
// Port port = outputNode.getPort();
// GpelAssignCopyFrom from = createAssignCopyFrom(port);
// GpelAssignCopyTo to = createAssignCopyTo(port, false);
//
// copies.add(new GpelAssignCopy(this.bpelNS, from, to));
// }
//
// if (copies.size() != 0) {
// // When there is no outputs, we don't create assign.
// GpelAssign assign = new GpelAssign(this.bpelNS, copies);
// sequence.addActivity(assign);
// }
//
// GpelReply reply = new GpelReply(this.bpelNS, WORKFLOW_PARTNER_LINK, this.workflowWSDL.getPortTypeQName(),
// this.workflowWSDL.getWorkflowOperationName());
// reply.setVariableName(WORKFLOW_OUTPUT_NAME);
// sequence.addActivity(reply);
// }
//
// /**
// * @param block
// * @param sequence
// * @throws GraphException
// */
// private void addBlock(Collection<Node> block, GpelSequence sequence) throws GraphException {
// List<Node> nextNodes = getNextExecutableNodes(block);
// while (nextNodes.size() > 0) {
// block.removeAll(nextNodes);
// removeUnnecessaryNodes(nextNodes);
// if (nextNodes.size() == 0) {
// // Everything was uncessary nodes (constants, etc.). Move on.
// } else if (nextNodes.size() == 1) {
// addSingle(nextNodes.get(0), block, sequence);
// } else if (nextNodes.size() > 1) {
// // XXX The algorithm used here is not efficient. It introduces
// // unnessary barriers.
// addFlow(nextNodes, block, sequence);
// } else {
// // Should not happen.
// throw new WorkflowRuntimeException("nextNodes.size(): " + nextNodes.size());
// }
// nextNodes = getNextExecutableNodes(block);
// }
// }
//
// private void addFlow(List<Node> nextNodes, Collection<Node> block, GpelSequence sequence) throws GraphException {
// GpelFlow flow = new GpelFlow(this.bpelNS);
// for (Node node : nextNodes) {
// GpelSequence childSequence = new GpelSequence(this.bpelNS);
// flow.addActivity(childSequence);
// addSingle(node, block, childSequence);
// }
// sequence.addActivity(flow);
// }
//
// // TODO: Add xml to BPEL
// private void addSingle(Node node, Collection<Node> block, GpelSequence sequence) throws GraphException {
// logger.debug("Processing + " + node.getID());
// if (node instanceof WSNode) {
// addInvoke((WSNode) node, sequence);
// } else if (node instanceof ConstantNode) {
// // nothing
// } else if (node instanceof ForEachNode) {
// addForEach((ForEachNode) node, block, sequence);
// } else if (node instanceof EndForEachNode) {
// // nothing.
// } else if (node instanceof IfNode) {
// addIf((IfNode) node, block, sequence);
// } else if (node instanceof EndifNode) {
// // nothing
// } else if (node instanceof ReceiveNode) {
// addReceive((ReceiveNode) node, sequence);
// } else if (node instanceof BlockNode) {
// addBlock((BlockNode) node, block, sequence);
// } else if (node instanceof EndBlockNode) {
// // nothing
// } else if (node instanceof StreamSourceNode) {
// addStreamSource((StreamSourceNode) node, sequence);
// } else if (node instanceof ExitNode) {
// addExit((ExitNode) node, sequence);
// } else if (node instanceof ResourceNode) {
// // nothing
// } else {
//
// throw new GraphException(node.getClass().getName() + " is not supported.");
// }
// }
//
// /**
// * @param node
// * @param sequence
// */
// private void addStreamSource(StreamSourceNode node, GpelSequence sequence) {
// GpelFlow flow = new GpelFlow(this.bpelNS);
// new GpelSequence(this.bpelNS);
// sequence.addActivity(flow);
//
// }
//
// /**
// * @param node
// * @param sequence
// */
// private void addExit(ExitNode node, GpelSequence sequence) {
// sequence.xml().addElement(this.bpelNS, "exit");
// }
//
// private void addInvoke(WSNode node, GpelSequence sequence) throws GraphException {
// String id = node.getID();
//
// WSComponent wsdlComponent = node.getComponent();
// String operation = wsdlComponent.getOperationName();
//
// QName portTypeQName = wsdlComponent.getPortTypeQName();
// XmlNamespace namespace = XMLUtil.declareNamespaceIfNecessary(id.toLowerCase(), portTypeQName.getNamespaceURI(),
// false, this.process.xml());
//
// // Variable
// String inputVariableName = id + INPUT_SUFFIX;
// this.process.addMessageVariable(inputVariableName, namespace, portTypeQName.getLocalPart());
// String outputVariableName = id + OUTPUT_SUFFIX;
// this.process.addMessageVariable(outputVariableName, namespace, portTypeQName.getLocalPart());
//
// // Assign
// List<GpelAssignCopy> copies = new ArrayList<GpelAssignCopy>();
// for (Port port : node.getInputPorts()) {
// Port fromPort = port.getFromPort();
// if (fromPort == null) {
// // optional input
// continue;
// }
// GpelAssignCopyFrom from = createAssignCopyFrom(port);
// GpelAssignCopyTo to = createAssignCopyTo(port, true);
//
// GpelAssignCopy copy = new GpelAssignCopy(this.bpelNS, from, to);
// copies.add(copy);
// }
//
// GpelAssign assign = new GpelAssign(this.bpelNS, copies);
// sequence.addActivity(assign);
//
// PartnerLinkRole partnerRoll = this.workflowWSDL.getPartnerRoll(portTypeQName);
// if (partnerRoll == null) {
// String partnerLinkTypeName = id + PARTNER_LINK_TYPE_SUFFIX;
// String partnerRollName = id + PARTNER_ROLE_SUFFIX;
// partnerRoll = this.workflowWSDL.addPartnerLinkTypeAndRoll(partnerLinkTypeName, partnerRollName,
// portTypeQName);
// }
// PartnerLinkType partnerLinkType = partnerRoll.getPartnerLinkType();
//
// // partnerLink
// String partnerLinkName = createPartnerLinkName(id);
// XmlNamespace partnerLinkTypeNS = this.targetNamespace;
// this.process.addPartnerLink(partnerLinkName, partnerLinkTypeNS, partnerLinkType.getName(), null,
// partnerRoll.getName());
//
// // Invoke
// GpelInvoke invoke = new GpelInvoke(this.bpelNS, partnerLinkName, namespace, portTypeQName.getLocalPart(),
// operation);
// invoke.setName(INVOKE_NAME_PREFIX + id);
// invoke.setInputVariableName(inputVariableName);
// invoke.setOutputVariableName(outputVariableName);
//
// sequence.addActivity(invoke);
// }
// /**
// * Creates BpelAssignCopyFrom for a specified port.
// *
// * @param port
// * @return The BpelAssignCopyFrom created
// * @throws GraphException
// */
// private GpelAssignCopyFrom createAssignCopyFrom(Port port) throws GraphException {
// GpelAssignCopyFrom from = new GpelAssignCopyFrom(this.bpelNS);
//
// Port fromPort = port.getFromPort();
// Node fromNode = fromPort.getNode();
// if (fromNode instanceof InputNode) {
// from.setVariable(WORKFLOW_INPUT_NAME);
// from.setPart(WorkflowWSDL.INPUT_PART_NAME);
// from.setQuery("/" + this.typesNamespace.getPrefix() + ":"
// + this.workflowWSDL.getWorkflowInputMessageElelmentName() + "/" + fromNode.getID());
// } else if (fromNode instanceof ConstantNode) {
// ConstantNode constNode = (ConstantNode) fromNode;
// Object value = constNode.getValue();
// // The namaspace and name of the literal element will be set
// // correctly in from.setLiteral().
// XmlElement literalElement = XMLUtil.BUILDER.newFragment(GpelAssignCopyFrom.LITERAL_EL);
// literalElement.addChild(value);
// from.setLiteral(literalElement);
// } else if (fromNode instanceof WSNode) {
// String fromID = fromNode.getID();
// WSComponent fromWsdlComponent = (WSComponent) fromNode.getComponent();
//
// WSComponentPort fromWsdlPort = (WSComponentPort) fromPort.getComponentPort();
//
// from.setVariable(fromID + OUTPUT_SUFFIX);
// from.setPart(fromWsdlComponent.getOutputPartName());
//
// if (fromWsdlPort.isSchemaUsed()) {
// String typesTargetNamespace = fromWsdlPort.getTargetNamespace();
// XmlNamespace namespace = XMLUtil.declareNamespaceIfNecessary(fromID.toLowerCase() + TYPENS_SUFFIX,
// typesTargetNamespace, false, this.process.xml());
//
// from.setQuery("/" + namespace.getPrefix() + ":" + fromWsdlComponent.getOutputTypeName() + "/"
// + fromWsdlPort.getName());
// } else {
// // No query needed?
// }
// } else if (fromNode instanceof ForEachNode) {
// from.setVariable(fromNode.getID() + FOREACH_VALUE_SUFFIX);
// } else if (fromNode instanceof EndForEachNode) {
// from.setVariable(fromNode.getID() + ARRAY_SUFIX);
// } else if (fromNode instanceof EndifNode) {
// // endif has multiple outputs, so we use port ID here.
// from.setVariable(fromPort.getID() + OUTPUT_SUFFIX);
// } else if (fromNode instanceof ReceiveNode) {
// if (fromPort instanceof EPRPort) {
// from.setPartnerLink(fromNode.getID() + PARTNER_LINK_NAME_SUFFIX);
// from.setEndpointReference("myRole");
// } else {
// from.setVariable(fromNode.getID() + INPUT_SUFFIX);
// }
// } else if (fromNode instanceof InstanceNode) {
// // no op
// } else {
// throw new GraphException("Unexpected node," + fromNode.getClass().getName() + " is connected");
// }
// return from;
// }
//
// /**
// * Creates BpelAssignCopyFrom for a specified port.
// *
// * @param toPort
// * @param input
// * @return The GpelAssignCopyTo created
// */
// private GpelAssignCopyTo createAssignCopyTo(Port toPort, boolean input) {
// GpelAssignCopyTo to = new GpelAssignCopyTo(this.bpelNS);
//
// Node toNode = toPort.getNode();
// if (toNode instanceof OutputNode) {
// to.setVariable(WORKFLOW_OUTPUT_NAME);
// to.setPart(WorkflowWSDL.OUTPUT_PART_NAME);
// to.setQuery("/" + this.typesNamespace.getPrefix() + ":"
// + this.workflowWSDL.getWorkflowOutputMessageElementName() + "/" + toNode.getID());
// } else {
// WSComponentPort toComponentPort = (WSComponentPort) toPort.getComponentPort();
//
// String toID = toNode.getID();
// WSComponent toWSComponent = (WSComponent) toNode.getComponent();
// to.setVariable(toID + INPUT_SUFFIX);
// to.setPart(toWSComponent.getInputPartName());
//
// if (toComponentPort.isSchemaUsed()) {
// // Normal case.
// // e.g. <part name="name" type="typens:fooType">
// String typesTargetNamespace = toComponentPort.getTargetNamespace();
// XmlNamespace namespace = XMLUtil.declareNamespaceIfNecessary(toID.toLowerCase() + TYPENS_SUFFIX,
// typesTargetNamespace, false, this.process.xml());
//
// String typeName = input ? toWSComponent.getInputTypeName() : toWSComponent.getOutputTypeName();
// to.setQuery("/" + namespace.getPrefix() + ":" + typeName + "/" + toComponentPort.getName());
// } else {
// // e.g. <part name="name" type="xsd:string">
// // No query is needed?
// }
// }
// return to;
// }
private void removeUnnecessaryNodes(List<Node> block) {
List<Node> unnecessaryNodes = new ArrayList<Node>();
for (Node node : block) {
if (node instanceof InputNode || node instanceof MemoNode || node instanceof ConstantNode) {
unnecessaryNodes.add(node);
}
}
block.removeAll(unnecessaryNodes);
}
use of org.apache.airavata.workflow.model.graph.system.OutputNode in project airavata by apache.
the class GraphImpl method fixParameterNodes.
// private void createID() {
// Date date = new Date();
// SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd_HHmmss_S");
// String time = format.format(date);
//
// this.id = StringUtil.convertToJavaIdentifier(this.name) + "_" + time;
// }
/**
* @throws GraphException
*/
public void fixParameterNodes() {
// XXX fix the ports of parameter nodes for 2.6.3 or before.
for (InputNode node : GraphUtil.getNodes(this, InputNode.class)) {
DataPort oldPort = node.getOutputPort(0);
if (oldPort instanceof WSPort) {
node.getOutputPorts().remove(oldPort);
this.ports.remove(oldPort);
SystemDataPort newPort = new SystemDataPort();
this.ports.add(newPort);
newPort.setKind(Kind.DATA_OUT);
newPort.setName(oldPort.getName());
newPort.setGraph(this);
newPort.setNode(node);
newPort.createID();
node.getOutputPorts().add(newPort);
for (DataEdge edge : oldPort.getEdges()) {
edge.setFromPort(newPort);
newPort.getEdges().add(edge);
}
}
}
for (OutputNode node : GraphUtil.getNodes(this, OutputNode.class)) {
DataPort oldPort = node.getInputPort(0);
if (oldPort instanceof WSPort) {
node.getInputPorts().remove(oldPort);
this.ports.remove(oldPort);
SystemDataPort newPort = new SystemDataPort();
this.ports.add(newPort);
newPort.setKind(Kind.DATA_IN);
newPort.setName(oldPort.getName());
newPort.setGraph(this);
newPort.setNode(node);
newPort.createID();
node.getInputPorts().add(newPort);
for (DataEdge edge : oldPort.getEdges()) {
edge.setToPort(newPort);
newPort.getEdges().add(edge);
}
}
}
}
use of org.apache.airavata.workflow.model.graph.system.OutputNode in project airavata by apache.
the class WorkflowInterpreterLaunchWindow method execute.
private void execute() throws AiravataClientConnectException, TException {
String instanceName = this.instanceNameTextField.getText();
if (instanceName.trim().equals("")) {
JOptionPane.showMessageDialog(engine.getGUI().getFrame(), "Experiment name cannot be empty", "Experiment Name", JOptionPane.ERROR_MESSAGE);
return;
}
ThriftClientData thriftClientData = engine.getConfiguration().getThriftClientData(ThriftServiceType.API_SERVICE);
Client airavataClient = XBayaUtil.getAiravataClient(thriftClientData);
String gatewayId = engine.getConfiguration().getThriftClientData(ThriftServiceType.API_SERVICE).getGatewayId();
final List<InputNode> inputNodes = GraphUtil.getInputNodes(this.workflow.getGraph());
List<InputDataObjectType> inputDataTypes = new ArrayList<InputDataObjectType>();
List<OutputDataObjectType> outputDataTypes = new ArrayList<OutputDataObjectType>();
InputDataObjectType input = null;
for (int i = 0; i < inputNodes.size(); i++) {
InputNode inputNode = inputNodes.get(i);
XBayaTextField parameterTextField = this.parameterTextFields.get(i);
inputNode.getID();
String value = parameterTextField.getText();
input = new InputDataObjectType();
// inputNode.setDefaultValue(value);
input.setName(inputNode.getID());
input.setType(inputNode.getDataType());
input.setValue(value);
input.setApplicationArgument(inputNode.getApplicationArgument());
input.setInputOrder(inputNode.getInputOrder());
inputDataTypes.add(input);
}
final List<OutputNode> outputNodes = GraphUtil.getOutputNodes(this.workflow.getGraph());
OutputDataObjectType output = null;
for (OutputNode outputNode : outputNodes) {
output = new OutputDataObjectType();
output.setName(outputNode.getID());
output.setType(DataType.STRING);
outputDataTypes.add(output);
}
Workflow workflowClone = workflow.clone();
workflowClone.setName(workflowClone.getName() + UUID.randomUUID().toString());
org.apache.airavata.model.Workflow workflowModel = new org.apache.airavata.model.Workflow();
workflowModel.setName(workflowClone.getName());
workflowModel.setGraph(JSONUtil.jsonElementToString(workflowClone.toJSON()));
for (InputDataObjectType inputDataType : inputDataTypes) {
workflowModel.addToWorkflowInputs(inputDataType);
}
for (OutputDataObjectType outputDataType : outputDataTypes) {
workflowModel.addToWorkflowOutputs(outputDataType);
}
workflowModel.setTemplateId(airavataClient.registerWorkflow(gatewayId, workflowModel));
// Use topic as a base of workflow instance ID so that the monitor can
// find it.
Project project = new Project();
project.setName("project1");
project.setOwner(thriftClientData.getUsername());
project.setProjectID(airavataClient.createProject(gatewayId, project));
final Experiment experiment = new Experiment();
experiment.setApplicationId(workflowModel.getTemplateId());
experiment.setName(instanceName);
experiment.setProjectID(project.getProjectID());
experiment.setUserName(thriftClientData.getUsername());
for (InputDataObjectType inputDataType : inputDataTypes) {
experiment.addToExperimentInputs(inputDataType);
}
for (OutputDataObjectType outputDataType : outputDataTypes) {
experiment.addToExperimentOutputs(outputDataType);
}
// Add scheduling configurations
if (host != null && host.getSelectedIndex() >= 0) {
String selectedHostName = host.getSelectedItem().toString();
String computeResouceId = hostNames.get(selectedHostName);
ComputationalResourceScheduling computationalResourceScheduling;
if (selectedHostName.equals("localhost")) {
computationalResourceScheduling = ExperimentModelUtil.createComputationResourceScheduling(computeResouceId, 1, 1, 1, "normal", 1, 0, 1, "test");
} else if (selectedHostName.equals("trestles.sdsc.xsede.org")) {
computationalResourceScheduling = ExperimentModelUtil.createComputationResourceScheduling(computeResouceId, 1, 1, 1, "normal", 1, 0, 1, "sds128");
} else if (selectedHostName.equals("stampede.tacc.xsede.org")) {
computationalResourceScheduling = ExperimentModelUtil.createComputationResourceScheduling(computeResouceId, 2, 32, 1, "development", 90, 0, 1, "TG-STA110014S");
} else if (selectedHostName.equals("bigred2.uits.iu.edu")) {
computationalResourceScheduling = ExperimentModelUtil.createComputationResourceScheduling(computeResouceId, 1, 1, 1, "normal", 1, 0, 1, null);
} else {
// TODO handle for other computer resources too.
throw new IllegalArgumentException("Computational resource scheduling is not configured for host :" + computeResouceId);
}
UserConfigurationData userConfigurationData = new UserConfigurationData();
userConfigurationData.setAiravataAutoSchedule(false);
userConfigurationData.setOverrideManualScheduledParams(false);
userConfigurationData.setComputationalResourceScheduling(computationalResourceScheduling);
experiment.setUserConfigurationData(userConfigurationData);
} else {
throw new RuntimeException("Resource scheduling failed, target computer resource host name is not defined");
}
/*
// code snippet for load test.
for (int i = 0; i < 20; i++) {
experiment.setName(instanceName + "_" + i);
experiment.setExperimentID(airavataClient.createExperiment(experiment));
try {
this.engine.getMonitor().subscribe(experiment.getExperimentID());
this.engine.getMonitor().fireStartMonitoring(workflow.getName());
} catch (MonitorException e) {
logger.error("Error while subscribing with experiment Id : " + experiment.getExperimentID(), e);
}
airavataClient.launchExperiment(experiment.getExperimentID(), "testToken");
}*/
experiment.setExperimentID(airavataClient.createExperiment(gatewayId, experiment));
try {
this.engine.getMonitor().subscribe(experiment.getExperimentID());
this.engine.getMonitor().fireStartMonitoring(workflow.getName());
} catch (MonitorException e) {
logger.error("Error while subscribing with experiment Id : " + experiment.getExperimentID(), e);
}
airavataClient.launchExperiment(experiment.getExperimentID(), token.getText());
clean();
hide();
}
use of org.apache.airavata.workflow.model.graph.system.OutputNode in project airavata by apache.
the class WSGraphFactory method createNode.
/**
* @see org.apache.airavata.workflow.model.graph.GraphFactory#createNode(org.xmlpull.infoset.XmlElement)
*/
public NodeImpl createNode(XmlElement nodeElement) throws GraphException {
String type = nodeElement.attributeValue(GraphSchema.NS, GraphSchema.NODE_TYPE_ATTRIBUTE);
if (type == null) {
// Old graphs don't have the namespace for the attribute.
type = nodeElement.attributeValue(GraphSchema.NODE_TYPE_ATTRIBUTE);
}
NodeImpl node;
if (GraphSchema.NODE_TYPE_WS.equals(type)) {
node = new WSNode(nodeElement);
} else if (GraphSchema.NODE_TYPE_STREAM_SOURCE.equals(type)) {
node = new StreamSourceNode(nodeElement);
} else if (GraphSchema.NODE_TYPE_WORKFLOW.equals(type)) {
node = new WorkflowNode(nodeElement);
} else if (GraphSchema.NODE_TYPE_INPUT.equals(type)) {
node = new InputNode(nodeElement);
} else if (GraphSchema.NODE_TYPE_OUTPUT.equals(type)) {
node = new OutputNode(nodeElement);
} else if (GraphSchema.NODE_TYPE_CONSTANT.equals(type)) {
node = new ConstantNode(nodeElement);
} else if (GraphSchema.NODE_TYPE_SPLIT.equals(type)) {
node = new ForEachNode(nodeElement);
} else if (GraphSchema.NODE_TYPE_MERGE.equals(type)) {
node = new EndForEachNode(nodeElement);
} else if (GraphSchema.NODE_TYPE_IF.equals(type)) {
node = new IfNode(nodeElement);
} else if (GraphSchema.NODE_TYPE_ENDIF.equals(type)) {
node = new EndifNode(nodeElement);
} else if (GraphSchema.NODE_TYPE_DOWHILE.equals(type)) {
node = new DoWhileNode(nodeElement);
} else if (GraphSchema.NODE_TYPE_ENDDOWHILE.equals(type)) {
node = new EndDoWhileNode(nodeElement);
} else if (GraphSchema.NODE_TYPE_MEMO.equals(type)) {
node = new MemoNode(nodeElement);
} else if (GraphSchema.NODE_TYPE_RECEIVE.equals(type)) {
node = new ReceiveNode(nodeElement);
} else if (GraphSchema.NODE_TYPE_BLOCK.equals(type)) {
node = new BlockNode(nodeElement);
} else if (GraphSchema.NODE_TYPE_ENDBLOCK.equals(type)) {
node = new EndBlockNode(nodeElement);
} else if (GraphSchema.NODE_TYPE_INSTANCE.equals(type)) {
node = new InstanceNode(nodeElement);
} else if (GraphSchema.NODE_TYPE_TERMINATE.equals(type)) {
node = new TerminateInstanceNode(nodeElement);
} else {
// Default is WsNode for backward compatibility.
node = new WSNode(nodeElement);
}
return node;
}
Aggregations