Package org.apache.airavata.xbaya.wf

Examples of org.apache.airavata.xbaya.wf.Workflow.toXML()


     */
    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


                file = new File(path + XBayaConstants.WORKFLOW_FILE_SUFFIX);
            }

            Workflow workflow = this.engine.getWorkflow();
            try {
                XMLUtil.saveXML(workflow.toXML(), file);
            } catch (IOException e) {
                this.engine.getErrorWindow().error(ErrorMessages.WRITE_FILE_ERROR, e);
            } catch (RuntimeException e) {
                this.engine.getErrorWindow().error(ErrorMessages.GRAPH_SAVE_ERROR, e);
            } catch (Error e) {
View Full Code Here

    public void testSimpleMath() throws ComponentException, GraphException, IOException, ComponentRegistryException {

        Workflow workflow = this.graphCreater.createSimpleMathWorkflow();

        File workflowFile = new File("tmp/simple-math.xwf");
        XMLUtil.saveXML(workflow.toXML(), workflowFile);

        // Creates a Jython script
        File jythonFile = new File("tmp/simple-math.py");
        JythonScript script = new JythonScript(workflow, this.configuration);
        script.create();
View Full Code Here

     * @throws ComponentRegistryException
     */
    public void testComplexMath() throws ComponentException, GraphException, IOException, ComponentRegistryException {
        Workflow workflow = this.graphCreater.createComplexMathWorkflow();
        File graphFile = new File("tmp/complex-math.xwf");
        XMLUtil.saveXML(workflow.toXML(), graphFile);

        // Creates a Jython script
        File jythonFile = new File("tmp/complex-math.py");
        JythonScript script = new JythonScript(workflow, this.configuration);
        script.create();
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

                // 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

            ComponentRegistryException {
        WorkflowCreator creator = new WorkflowCreator();
        Workflow workflow = creator.createGFacWorkflow();

        File workflowFile = new File("tmp/gfac-test.xwf");
        XMLUtil.saveXML(workflow.toXML(), workflowFile);

        JythonScript script = new JythonScript(workflow, this.configuration);
        script.create();
        String jythonString = script.getJythonString();
        String filename = "tmp/gfac-test.py";
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.