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

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


            public void actionPerformed(ActionEvent e) {
                try {
                    ExperimentMenu.this.registryAccesser.deleteOGCEWorkflow(ExperimentMenu.this.engine.getGUI().getWorkflow()
                            .getQname());
                } catch (AiravataAPIInvocationException e1) {
                    throw new WorkflowRuntimeException(e1);
                }
            }
        });
    }
View Full Code Here


   */
  public static Node findEndForEachFor(ForEachNode node) {

    Collection<Node> toNodes = node.getOutputPort(0).getToNodes();
    if(toNodes.size() != 1){
      throw new WorkflowRuntimeException("ForEach output does not contain single out-edge");
    }
    Node middleNode = toNodes.iterator().next();
    List<DataPort> outputPorts = middleNode.getOutputPorts();
    for (DataPort dataPort : outputPorts) {
      if(dataPort.getToNodes().size() == 1){
        Node possibleEndForEachNode = dataPort.getToNodes().get(0);
        if(possibleEndForEachNode instanceof EndForEachNode){
          return possibleEndForEachNode;
        }
      }
    }
    throw new WorkflowRuntimeException("EndForEachNode not found");
  }
View Full Code Here

    public static Object parseValue(WSComponentPort input, String valueString) {
        String name = input.getName();
        if (false) {
            // Some user wants to pass empty strings, so this check is disabled.
            if (valueString.length() == 0) {
                throw new WorkflowRuntimeException("Input parameter, " + name + ", cannot be empty");
            }
        }
        QName type = input.getType();
        Object value;
        if (LEADTypes.isKnownType(type)) {
            // TODO check the type.
            value = valueString;
        } else {
            try {
                if(XBayaConstants.HTTP_SCHEMAS_AIRAVATA_APACHE_ORG_GFAC_TYPE.equals(input.getType().getNamespaceURI())){
                    value = XMLUtil.stringToXmlElement3(WorkflowInputUtil.createInputForGFacService(input, valueString));
                }else {
                    throw new WorkflowRuntimeException("Input parameter, " + name + ", Unkown Type");
                }
            } catch (RuntimeException e) {
                throw new WorkflowRuntimeException("Input parameter, " + name + ", is not valid XML", e);
            }
        }
        return value;
    }
View Full Code Here

        return true;
      } else {
//        writeProvenanceLater(node);
      }
    } catch (Exception e) {
      throw new WorkflowRuntimeException(e);
    }
    return false;

  }
View Full Code Here

  /**
     *
     */
  private void notifyPause() {
    if (this.getWorkflow().getExecutionState() != WorkflowExecutionState.RUNNING && this.getWorkflow().getExecutionState() != WorkflowExecutionState.STEP) {
      throw new WorkflowRuntimeException("Cannot pause when not running");
    }
    notifyViaInteractor(WorkflowExecutionMessage.EXECUTION_STATE_CHANGED, WorkflowExecutionState.PAUSED);
  }
View Full Code Here

      // ((SubWorkflowNode) middleNode).getWorkflow();
      // this.config.getConfiguration();
      // TODO : Need to create a invoker!
      // new WorkflowInterpreter()
    } else {
      throw new WorkflowRuntimeException("Only Web services and subworkflows are supported for For-Each : Found : " + middleNode);
    }
    return invoker;
  }
View Full Code Here

            } else if (kind == Kind.DATA_IN || kind == Kind.CONTROL_IN) {
                p1 = this.mousePoint;
                p2 = NodeController.getGUI(this.draggedPort).getPosition();
            } else {
                // This should not happen.
                throw new WorkflowRuntimeException();
            }
            g.setColor(Color.RED);

            Stroke originalStroke = g.getStroke();
            if (kind == Kind.CONTROL_IN || kind == Kind.CONTROL_OUT) {
View Full Code Here

            System.out.println("In call back, response is: " + result.getStatus());
        }

        @Override
        public void receiveErrorjobStatus(java.lang.Exception e) {
            throw new WorkflowRuntimeException(e);
        }
View Full Code Here

     */
    public static Node findEndForEachFor(ForEachNode node) {

        Collection<Node> toNodes = node.getOutputPort(0).getToNodes();
        if (toNodes.size() != 1) {
            throw new WorkflowRuntimeException("ForEach output does not contain single out-edge");
        }
        Node middleNode = toNodes.iterator().next();
        List<DataPort> outputPorts = middleNode.getOutputPorts();
        for (DataPort dataPort : outputPorts) {
            if (dataPort.getToNodes().size() == 1) {
                Node possibleEndForEachNode = dataPort.getToNodes().get(0);
                if (possibleEndForEachNode instanceof EndForEachNode) {
                    return possibleEndForEachNode;
                }
            }
        }
        throw new WorkflowRuntimeException("EndForEachNode not found");
    }
View Full Code Here

    return workflowInterpreter;
  }

  public void registerWorkflowInterpreter(WorkflowInterpreter workflowInterpreter) {
    if (getWorkflowInterpreter()!=null){
      throw new WorkflowRuntimeException("Critical Error!!! Workflow interpretter already running. Cleanup first");
    }
    this.workflowInterpreter = workflowInterpreter;
  }
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.