Package org.apache.airavata.workflow.model.exceptions

Examples of org.apache.airavata.workflow.model.exceptions.WorkflowRuntimeException


            GpelActivity next = iterator.next();
            if (isSequence(next) || isFlow(next)) {
                evaluateFlowAndSequenceForAddingInits(wsdls, workflowWSDL, next, list);
            } else if (isInvoke(next) || isReply(next)) {
                if (last == null || !isAssign(last)) {
                    throw new WorkflowRuntimeException("Assign activity not found for the Invoke "
                            + next.xmlStringPretty());
                }

                GpelAssign assign = (GpelAssign) last;
                XmlNamespace ns = assign.xml().getNamespace();

                XmlElement container = XmlConstants.BUILDER.parseFragmentFromString("<dummyelement></dummyelement>");

                String portTypeattr = next.xml().attributeValue(PORT_TYPE_STR);
                String operation = next.xml().attributeValue(OPERATION_STR);
                if (null == portTypeattr || "".equals(portTypeattr)) {
                    throw new WorkflowRuntimeException("No Porttype found for Invoke:" + next);
                }
                String portTypeName = portTypeattr.substring(portTypeattr.indexOf(':') + 1);
                String messagePartName = null;
                if (isInvoke(next)) {
                    Iterator<String> keys = wsdls.keySet().iterator();
View Full Code Here


            GpelActivity next = iterator.next();
            if (isSequence(next) || isFlow(next)) {
                addVariableManipulationBeforeInvoke(next);
            } else if (isInvoke(next)) {
                if (last == null || !isAssign(last)) {
                    throw new WorkflowRuntimeException("Assign activity not found for the Invoke" + next.xmlStringPretty());
                }

                // we are good and should add the header copy.
                XmlNamespace ns = last.xml().getNamespace();
                GpelAssignCopyFrom headerFrom = new GpelAssignCopyFrom(ns);
View Full Code Here

     * @param query
     */
    private String extractDataType(String query) {
        int index = query.indexOf(':');
        if (index == -1) {
            throw new WorkflowRuntimeException("Invalid query no : delimeter found " + query);
        }
        String[] split = query.substring(index + 1).trim().split("/");
        if (split.length == 0) {
            throw new WorkflowRuntimeException("Unknown Xpath " + query.substring(index));
        }
        return split[split.length - 1];
    }
View Full Code Here

        if (arrayDimension == 1) {
            String typeName = declareArrayType(schema, type, wsdl);
            type = new QName(this.typesNamespace.getName(), typeName);
        } else if (arrayDimension > 1) {
            // TODO
            throw new WorkflowRuntimeException("multi-dimentional arrays are not supported yet.");
        }

        if (WSConstants.XSD_ANY_TYPE.equals(type) && componentPort != null) {
            XmlElement elementElement = componentPort.getElement();
            if (elementElement == null) {
View Full Code Here

                // Need to copy the whole schema because it might have different
                // targetNamespace.
                XmlElement newSchema = WSDLUtil.getSchema(serviceWSDL, paramType);
                if (newSchema == null) {
                    // This should have been caught in WSComponent
                    throw new WorkflowRuntimeException("could not find definition for type " + paramType + " in "
                            + WSDLUtil.getWSDLQName(serviceWSDL));
                }
                this.definitions.getTypes().addChild(XMLUtil.deepClone(newSchema));

                String prefix = declareNamespaceIfNecessary(paramType.getPrefix(), paramType.getNamespaceURI(), false);
View Full Code Here

    }
  }

  private List<ComponentReference> getComponentTree(File dir) {
    if (!dir.isDirectory()) {
      throw new WorkflowRuntimeException(dir + "is not a directory.");
    }

    boolean found = false;
    List<ComponentReference> tree = new ArrayList<ComponentReference>();
    for (File file : dir.listFiles()) {
View Full Code Here

            } else if (toDataPort.getNode() == this) {
                if (!(fromType == null || fromType.equals(WSConstants.XSD_ANY_TYPE))) {
                    toDataPort.copyType(fromDataPort);
                }
            } else {
                throw new WorkflowRuntimeException();
            }
        }
    }
View Full Code Here

        if (kind == Kind.DATA_IN) {
            index = inputPorts.indexOf(port);
        } else if (kind == Kind.DATA_OUT) {
            index = outputPorts.indexOf(port);
        } else {
            throw new WorkflowRuntimeException();
        }

        SystemDataPort inputPort = (SystemDataPort) inputPorts.get(index);
        SystemDataPort outputPort = (SystemDataPort) outputPorts.get(index);

        QName inputType = inputPort.getType();
        QName outputType = outputPort.getType();

        QName portType = port.getType();
        if (portType == null || portType.equals(WSConstants.XSD_ANY_TYPE)) {
            // Do nothing
            return;
        }

        if (port == inputPort) {
            // input -> output
            if (outputType.equals(WSConstants.XSD_ANY_TYPE)) {
                outputPort.copyType(port, 1);
            } else if (outputType.equals(portType)) {
                // Do nothing.
            } else {
                // XXX cannot parse array from WSDL.
                // String message = "The type of input " + index + " ("
                // + inputType + ") of " + getID()
                // + " must be same as the type of output " + index + " ("
                // + outputType + ").";
                // throw new GraphException(message);
            }

        } else if (port == outputPort) {
            // output -> input1
            if (inputType.equals(WSConstants.XSD_ANY_TYPE)) {
                inputPort.copyType(port, -1);
            } else if (inputType.equals(portType)) {
                // Do nothing.
            } else {
                // XXX cannot parse array from WSDL.
                // String message = "The type of input " + index + " ("
                // + inputType + ") of " + getID()
                // + " must be same as the type of output " + index + " ("
                // + outputType + ").";
                // throw new GraphException(message);
            }
        } else {
            throw new WorkflowRuntimeException();
        }
    }
View Full Code Here

            } else if (toDataPort.getNode() == this) {
                if (!(fromType == null || fromType.equals(WSConstants.XSD_ANY_TYPE))) {
                    toDataPort.copyType(fromDataPort);
                }
            } else {
                throw new WorkflowRuntimeException();
            }
        }
    }
View Full Code Here

            try {
                GraphUtil.propagateTypes(getGraph());
            } catch (GraphException e) {
                // this should not happen.
                throw new WorkflowRuntimeException(e);
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.airavata.workflow.model.exceptions.WorkflowRuntimeException

Copyright © 2018 www.massapicom. 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.