Package org.apache.airavata.workflow.model.wf

Examples of org.apache.airavata.workflow.model.wf.Workflow.toXML()


                workflowId = StringUtil.convertToJavaIdentifier(workflowId);

                QName workflowQName = new QName(XBayaConstants.OGCE_WORKFLOW_NS, workflowId);

                String workflowAsString = XMLUtil.xmlElementToString(workflow.toXML());
                String owner = this.engine.getConfiguration().getRegistryUserName();

                AiravataAPI registry = this.connectToRegistry();
                if (registry.getWorkflowManager().isWorkflowExists(workflow.getName())){
                registry.getWorkflowManager().updateWorkflow(workflow.getName(), workflowAsString);
View Full Code Here


    @Override
    public void addOwnerWorkflow (URI workflowPath, String owner)
            throws AiravataAPIInvocationException, DescriptorRecordAlreadyExistsException {
        Workflow workflow = getWorkflowFromURI(workflowPath);
        addWorkflow(workflow, XMLUtil.xmlElementToString(workflow.toXML()), owner);
    }

    @Override
    public void updateOwnerWorkflow (URI workflowPath, String owner)
            throws AiravataAPIInvocationException {
View Full Code Here

    @Override
    public void updateOwnerWorkflow (URI workflowPath, String owner)
            throws AiravataAPIInvocationException {
        Workflow workflow = getWorkflowFromURI(workflowPath);
        updateWorkflow(workflow, XMLUtil.xmlElementToString(workflow.toXML()), owner);
    }

  @Override
  public boolean saveWorkflow(Workflow workflow, String owner)
      throws AiravataAPIInvocationException {
View Full Code Here

                workflowId = StringUtil.convertToJavaIdentifier(workflowId);

                QName workflowQName = new QName(XBayaConstants.OGCE_WORKFLOW_NS, workflowId);

                String workflowAsString = XMLUtil.xmlElementToString(workflow.toXML());
                String owner = this.engine.getConfiguration().getRegistryUserName();

                AiravataRegistry2 registry = this.connectToRegistry();
                if (registry.isWorkflowExists(workflow.getName())){
                registry.updateWorkflow(workflow.getName(), workflowAsString);
View Full Code Here

                // if(result != JOptionPane.YES_OPTION){
                // return;
                // }
                // client.removeResource(workflowQName);
                // }
                String workflowAsString = XMLUtil.xmlElementToString(workflow.toXML());
                String owner = this.engine.getConfiguration().getRegistryUserName();

                AiravataRegistry registry = this.connectToRegistry();
                boolean result = registry.saveWorkflow(workflowQName, workflow.getName(), workflow.getDescription(), workflowAsString,
                        owner, registryPublishingWindow.isMakePublic());
View Full Code Here

     */
    public void testComplexMath() throws GraphException, ComponentException, IOException {

        Workflow workflow = createComplexMathWorkflow();
        File workflowFile = new File(this.temporaryDirectory, "web-complex-math.xwf");
        XMLUtil.saveXML(workflow.toXML(), workflowFile);

        // Load the same graph again from the file, saves it, and compare them.
        XmlElement workflowElement = XMLUtil.loadXML(workflowFile);
        Workflow workflow2 = new Workflow(workflowElement);
        File workflowFile2 = new File(this.temporaryDirectory, "web-complex-math-2.xwf");
View Full Code Here

        // Load the same graph again from the file, saves it, and compare them.
        XmlElement workflowElement = XMLUtil.loadXML(workflowFile);
        Workflow workflow2 = new Workflow(workflowElement);
        File workflowFile2 = new File(this.temporaryDirectory, "web-complex-math-2.xwf");
        XMLUtil.saveXML(workflow2.toXML(), workflowFile2);

        String workflowFileString = IOUtil.readFileToString(workflowFile);
        String workflowFile2String = IOUtil.readFileToString(workflowFile2);
        assertEquals(workflowFileString, workflowFile2String);
View Full Code Here

        executeToMiddle(workflow, notifier);

        modifyWorkflow(workflow);

        File modifiedWorkflowFile = new File(this.temporalDirectory, "complex-math-modified.xwf");
        XMLUtil.saveXML(workflow.toXML(), modifiedWorkflowFile);

        // Create a diff workflow
        WorkflowModifier modifier = new WorkflowModifier(workflow, eventData);
        Workflow diffWorkflow = modifier.createDifference();
View Full Code Here

            canvas.setWorkflow(diffWorkflow);
            repaintAndWait(5);
        }

        File diffWorkflowFile = new File(this.temporalDirectory, "complex-math-diff.xwf");
        XMLUtil.saveXML(diffWorkflow.toXML(), diffWorkflowFile);

    }

    private void executeToMiddle(Workflow workflow, MonitorNotifier notifier) throws XmlValidationException,
            ComponentException {
View Full Code Here

     */
    public void testWorkflow() throws ComponentException, GraphException, IOException, ComponentRegistryException {
        Workflow workflow = createWorkflow();

        File workflowFile = new File("tmp/ADASInitializedWRFForecast.xwf");
        XMLUtil.saveXML(workflow.toXML(), workflowFile);
    }

    /**
     * @throws ComponentException
     * @throws GraphException
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.