Package org.apache.airavata.xbaya

Examples of org.apache.airavata.xbaya.XBayaRuntimeException


                    }
                }

            }
        }
        throw new XBayaRuntimeException("Unable to find the Message for the PortType " + portType + " operation:"
                + opName);
    }
View Full Code Here


     * @param node
     * @return
     */
  public static String getEncodedInputLabels(Node node) {
    if (!isAllInputsConnected(node)) {
      throw new XBayaRuntimeException("Node inputs not connected" + node);
    }
    if (!isAllInputsLabeled(node)) {
      throw new XBayaRuntimeException(
          "Some or all of the node inputs not labeled" + node);
    }
    List<DataPort> inputPorts = node.getInputPorts();
    String label = "";
    for (DataPort dataPort : inputPorts) {
View Full Code Here

            GpelVariable gpelVariable = iterator.next();
            if (variable.equals(gpelVariable.getName())) {
                return gpelVariable;
            }
        }
        throw new XBayaRuntimeException("Unable to fine the variable :" + variable + "  in the BPEL variables "
                + variables);
    }
View Full Code Here

            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 XBayaRuntimeException("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 XBayaRuntimeException("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 XBayaRuntimeException("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 XBayaRuntimeException("Invalid query no : delimeter found " + query);
        }
        String[] split = query.substring(index + 1).trim().split("/");
        if (split.length == 0) {
            throw new XBayaRuntimeException("Unknown Xpath " + query.substring(index));
        }
        return split[split.length - 1];
    }
View Full Code Here

                // XXX The algorithm used here is not efficient. It introduces
                // unnessary barriers.
                addFlow(nextNodes, block, sequence);
            } else {
                // Should not happen.
                throw new XBayaRuntimeException("nextNodes.size(): " + nextNodes.size());
            }
            nextNodes = getNextExecutableNodes(block);
        }
    }
View Full Code Here

    public EdgeImpl createEdge(Port fromPort, Port toPort) {
        Kind fromKind = fromPort.getKind();
        Kind toKind = toPort.getKind();
        if (!((fromKind == Kind.DATA_OUT && toKind == Kind.DATA_IN)
                || (fromKind == Kind.CONTROL_OUT && toKind == Kind.CONTROL_IN) || (fromKind == Kind.EPR && toKind == Kind.DATA_IN))) {
            throw new XBayaRuntimeException();
        }
        EdgeImpl edge;
        if (toKind == Kind.DATA_IN) {
            edge = new DataEdge();
        } else if (toKind == Kind.CONTROL_IN) {
            edge = new ControlEdge();
        } else {
            // Should not happen.
            throw new XBayaRuntimeException();
        }
        return edge;
    }
View Full Code Here

        this.invokerMap.put(node, invoker);
        node.getGUI().setBodyColor(NodeState.FINISHED.color);
        return true;
      }
    } catch (Exception e) {
      throw new XBayaRuntimeException(e);
    }
    return false;

  }
View Full Code Here

      if (this.getWorkflow().getExecutionState() == XBayaExecutionState.RUNNING
          || this.getWorkflow().getExecutionState() == XBayaExecutionState.STEP) {
        this.engine.getGUI().getToolbar().getPlayAction()
            .actionPerformed(null);
      } else {
        throw new XBayaRuntimeException("Cannot pause when not running");
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.airavata.xbaya.XBayaRuntimeException

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.