Examples of WorkflowException


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

                    try {
                        this.getConfig().getConfiguration().getAiravataAPI().getProvenanceManager().setWorkflowInstanceStatus(
                                this.config.getTopic(), this.config.getTopic(), State.FINISHED);
                    } catch (Exception e) {
                        throw new WorkflowException(e);
                    }

          // System.out.println(this.config.getConfiguration().getJcrComponentRegistry().getRegistry().getWorkflowStatus(this.topic));
        }
      } else {
        if (this.config.isActOnProvenance()) {
          try {
            this.getConfig().getConfiguration().getAiravataAPI().getProvenanceManager().
                                setWorkflowInstanceStatus(this.config.getTopic(),this.config.getTopic(), State.FAILED);
          } catch (AiravataAPIInvocationException e) {
            throw new WorkflowException(e);
          }
        }
      }
      this.config.getNotifier().workflowTerminated();
      UUID uuid = UUID.randomUUID();
View Full Code Here

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

    try {
      WorkflowInterpreter subworkflowInterpreter = (WorkflowInterpreter) getInputViaInteractor(
          WorkflowExecutionMessage.INPUT_WORKFLOWINTERPRETER_FOR_WORKFLOW, subWorkflow);
      subworkflowInterpreter.scheduleDynamically();
    } catch (Exception e) {
      throw new WorkflowException(e);
    }
  }
View Full Code Here

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

        try {
          leadCtxHeader = XBayaUtil.buildLeadContextHeader(this.getWorkflow(), this.getConfig().getConfiguration(), new MonitorConfiguration(this
              .getConfig().getConfiguration().getBrokerURL(), this.config.getTopic(), true, this.getConfig().getConfiguration()
              .getMessageBoxURL()), foreachWSNode.getID(), null);
        } catch (URISyntaxException e) {
          throw new WorkflowException(e);
        }
        invoker = new WorkflowInvokerWrapperForGFacInvoker(portTypeQName, gfacURLString, this.getConfig().getConfiguration().getMessageBoxURL()
            .toString(), leadCtxHeader, this.config.getNotifier().createServiceNotificationSender(foreachWSNode.getID()));
      } else {
                if (this.config.isGfacEmbeddedMode()) {
View Full Code Here

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

          inputValues.add(inputValue);
        }

      }
    } catch (ArrayIndexOutOfBoundsException e) {
      throw new WorkflowException("Wrong number of Inputs to For EachNode");
    }
    return inputValues;
  }
View Full Code Here

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

                    }
                }
            }

            if (((String) outputVal).length() == 0) {
                throw new WorkflowException("Empty Output Generated");
            }
            outputVal = ((String) outputVal).substring(1, ((String) outputVal).length());
        } else {
            Invoker fromInvoker = invokerMap.get(fromNode);
            try {
View Full Code Here

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

      }
            if (inputs!=null) {
        try {
          this.airavataAPI.getProvenanceManager().setWorkflowInstanceNodeInput(new WorkflowInstanceNode(new WorkflowExecution(experimentId, experimentId), node.getID()), xsul5.XmlConstants.BUILDER.serializeToString(inputs));
                } catch (AiravataAPIInvocationException e) {
          throw new WorkflowException(e);
        }
        // deal with the outputs
      }
      XmlElement outputs = elem.newElement("outputs");
      elem.addChild(outputs);

      List<DataPort> outputPorts = node.getOutputPorts();
      for (DataPort outputPort : outputPorts) {
        String outputName = outputPort.getName();

        XmlElement outputParamElement = outputs.newElement(outputName);
        outputs.addChild(outputParamElement);
        Object ouputParamValue = invokerMap.get(node).getOutput(
            outputName);

        if (ouputParamValue instanceof org.xmlpull.v1.builder.XmlElement) {
          ouputParamValue = XMLUtil
              .xmlElement3ToXmlElement5((org.xmlpull.v1.builder.XmlElement) ouputParamValue);
        }

        if (ouputParamValue != null) {
          outputParamElement.addChild(ouputParamValue);
        } else {
          outputParamElement.addChild("null");
        }
      }
            try {
        this.airavataAPI.getProvenanceManager().setWorkflowInstanceNodeOutput(new WorkflowInstanceNode(new WorkflowExecution(experimentId,experimentId),node.getID()),xsul5.XmlConstants.BUILDER.serializeToString(outputs));
            } catch (AiravataAPIInvocationException e) {
        throw new WorkflowException(e);
      }
    }
  }
View Full Code Here

Examples of org.apache.lenya.workflow.WorkflowException

            log.debug("Resolving executable events");
        }

        WorkflowInstance[] instances = getInstances();
        if (instances.length == 0) {
            throw new WorkflowException("The set must contain at least one workflow instance!");
        }

        Event[] events = mainInstance.getExecutableEvents(situation);
        Set executableEvents = new HashSet(Arrays.asList(events));
View Full Code Here

Examples of org.apache.lenya.workflow.WorkflowException

        try {
            Class clazz = Class.forName(className);
            condition = (Condition) clazz.newInstance();
            condition.setExpression(expression);
        } catch (ClassNotFoundException e) {
            throw new WorkflowException(e);
        } catch (InstantiationException e) {
            throw new WorkflowException(e);
        } catch (IllegalAccessException e) {
            throw new WorkflowException(e);
        }

        return condition;
    }
View Full Code Here

Examples of org.apache.lenya.workflow.WorkflowException

     * @throws WorkflowException when the event may not be invoked.
     */
    public void invoke(Situation situation, Event event)
        throws WorkflowException {
        if (!Arrays.asList(getExecutableEvents(situation)).contains(event)) {
            throw new WorkflowException("The event '" + event +
                "' cannot be invoked in the situation '" + situation + "'.");
        }

        fire(getNextTransition(event));

View Full Code Here

Examples of org.apache.lenya.workflow.WorkflowException

        for (int i = 0; i < transitions.length; i++) {
            if (transitions[i].getEvent().equals(event)) {
               
                if (nextTransition != null) {
                    throw new WorkflowException("More than one transition found for event [" + event + "]!");
                }
               
                nextTransition = (TransitionImpl) transitions[i];
            }
        }
       
        if (nextTransition == null) {
            throw new WorkflowException("No transition found for event [" + event + "]!");
        }
       
        return nextTransition;
    }
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.