Examples of GraphException


Examples of org.apache.airavata.workflow.model.graph.GraphException

    protected void indexToPointer() throws GraphException {
        for (String portID : this.inputPortIDs) {
            PortImpl port = this.graph.getPort(portID);
            if (port == null) {
                throw new GraphException("Port, " + portID + ", does not exist.");
            }
            port.setKind(PortImpl.Kind.DATA_IN);
            port.setNode(this);
            this.inputPorts.add((DataPort) port);
        }

        for (String portID : this.outputPortIDs) {
            PortImpl port = this.graph.getPort(portID);
            if (port == null) {
                throw new GraphException("Port, " + portID + ", does not exist.");
            }
            port.setKind(PortImpl.Kind.DATA_OUT);
            port.setNode(this);
            this.outputPorts.add((DataPort) port);
        }

        if (this.controlInPortID != null) {
            PortImpl port = this.graph.getPort(this.controlInPortID);
            if (port == null) {
                throw new GraphException("Port, " + this.controlInPortID + ", does not exist.");
            }
            port.setKind(PortImpl.Kind.CONTROL_IN);
            port.setNode(this);
            this.controlInPort = (ControlPort) port;
        }

        for (String portID : this.controlOutPortIDs) {
            PortImpl port = this.graph.getPort(portID);
            if (port == null) {
                throw new GraphException("Port, " + portID + ", does not exist.");
            }
            port.setKind(PortImpl.Kind.CONTROL_OUT);
            port.setNode(this);
            this.controlOutPorts.add((ControlPort) port);
        }

        if (this.eprPortID != null) {
            PortImpl port = this.graph.getPort(this.eprPortID);
            if (port == null) {
                throw new GraphException("Port, " + this.eprPortID + ", does not exist.");
            }
            port.setKind(PortImpl.Kind.EPR);
            port.setNode(this);
            this.eprPort = port;
        }
View Full Code Here

Examples of org.apache.airavata.workflow.model.graph.GraphException

        this();
        try {
            XmlElement workflowElement = XMLUtil.stringToXmlElement(workflowString);
            parse(workflowElement);
        } catch (RuntimeException e) {
            throw new GraphException(e);
        }
    }
View Full Code Here

Examples of org.apache.airavata.workflow.model.graph.GraphException

        this();
        try {
            XmlElement workflowElement = XMLUtil.loadXML(workflowFilePath.toURL().openStream());
            parse(workflowElement);
        } catch (RuntimeException e) {
            throw new GraphException(e);
        } catch (IOException e) {
            throw new GraphException(e);
        }
    }
View Full Code Here

Examples of org.apache.airavata.workflow.model.graph.GraphException

                XmlNamespace gpelNS = XmlInfosetBuilder.newInstance().newNamespace(BPELScript.GPEL, BPELScript.GPELNS);
                GpelConstants.GPEL_NS = gpelNS;
                this.gpelProcess = new GpelProcess(XMLUtil.stringToXmlElement(bpelString));
            } catch (RuntimeException e) {
                String error = "Failed to parse the BPEL document.";
                throw new GraphException(error, e);
            }
        }

        XmlElement workflowWSDLElement = workflowElement.element(WORKFLOW_WSDL_TAG);
        if (workflowWSDLElement != null) {
            try {
                String wsdlText = workflowWSDLElement.requiredText();
                this.workflowWSDL = new WsdlDefinitions(XMLUtil.stringToXmlElement(wsdlText));
            } catch (RuntimeException e) {
                String error = "Failed to parse the workflow WSDL.";
                throw new GraphException(error, e);
            }
        }
    }
View Full Code Here

Examples of org.apache.airavata.workflow.model.graph.GraphException

            WsdlMessage inputMessage = createInputMessage();
            WsdlMessage outputMessage = createOutputMessage();
            createPortType(inputMessage, outputMessage);
            addComment();
        } catch (RuntimeException e) {
            throw new GraphException(e);
        }
    }
View Full Code Here

Examples of org.apache.airavata.workflow.model.graph.GraphException

                // The first edge.
                this.type = toType;
            } else if (edges.size() > 1) {
                // Not the first edge.
                if (!toType.equals(WSConstants.XSD_ANY_TYPE) && !this.type.equals(toType)) {
                    throw new GraphException("Cannot connect ports with different types.");
                }

            } else {
                // Should not happen.
                throw new WorkflowRuntimeException("edges.size(): " + edges.size());
View Full Code Here

Examples of org.apache.airavata.workflow.model.graph.GraphException

                }
            } else if (edges.size() > 1) {
                // Not the first edge.
                QName parameterType = getParameterType();
                if (!toType.equals(WSConstants.XSD_ANY_TYPE) && !parameterType.equals(toType)) {
                    throw new GraphException("Cannot connect ports with different types.");
                }

            } else {
                // Should not happen.
                throw new WorkflowRuntimeException("edges.size(): " + edges.size());
View Full Code Here

Examples of org.apache.airavata.workflow.model.graph.GraphException

    }

    protected void indexToPointer() throws GraphException {
        this.fromPort = this.graph.getPort(this.fromPortID);
        if (this.fromPort == null) {
            throw new GraphException("Cannot find a port with the ID, " + this.fromPortID + ".");
        }
        this.toPort = this.graph.getPort(this.toPortID);
        if (this.toPort == null) {
            throw new GraphException("Cannot find a port with the ID, " + this.toPortID + ".");
        }

        // Has to do the above first because they are used in the edgeWasAdded
        // method.
        this.fromPort.addEdge(this);
View Full Code Here

Examples of org.apache.airavata.workflow.model.graph.GraphException

        try {
            String componentString = componentElement.requiredText();
            WSComponent wsdlComponent = WSComponentFactory.createComponent(componentString);
            setComponent(wsdlComponent);
        } catch (ComponentException e) {
            throw new GraphException(MessageConstants.COMPONENT_FORMAT_ERROR, e);
        }
    }
View Full Code Here

Examples of org.apache.airavata.workflow.model.graph.GraphException

        if (!(newType == null || newType.equals(WSConstants.XSD_ANY_TYPE) || type == null
                || type.equals(WSConstants.XSD_ANY_TYPE) || newType.equals(type))) {
            String message = "The type (" + newType + ")  must be same as the type  " + " (" + type + ") of " + getID()
                    + ".";
            throw new GraphException(message);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.