Package org.apache.airavata.xbaya.wf

Examples of org.apache.airavata.xbaya.wf.Workflow


     * @throws GraphException
     * @throws IOException
     * @throws ComponentRegistryException
     */
    public void testIf() throws ComponentException, GraphException, IOException, ComponentRegistryException {
        Workflow workflow = this.workflowCreator.createIfWorkflow();
        testWrokflow(workflow, "if-test");
    }
View Full Code Here


     * @throws ComponentException
     * @throws IOException
     * @throws ComponentRegistryException
     */
    public void testReceive() throws GraphException, ComponentException, IOException, ComponentRegistryException {
        Workflow workflow = this.workflowCreator.createReceiveWorkflow();
        testWrokflow(workflow, "receive-test");
    }
View Full Code Here

     * @throws ComponentException
     * @throws IOException
     * @throws ComponentRegistryException
     */
    public void testLoan() throws GraphException, ComponentException, IOException, ComponentRegistryException {
        Workflow workflow = this.workflowCreator.createLoanWorkflow();
        testWrokflow(workflow, "loan");
    }
View Full Code Here

        File workflowFile = new File(this.temporalDirectory, filename + XBayaConstants.WORKFLOW_FILE_SUFFIX);
        XMLUtil.saveXML(workflow.toXML(), workflowFile);

        // Read the workflow
        XmlElement workflowElement = XMLUtil.loadXML(workflowFile);
        workflow = new Workflow(workflowElement);

        // Create BPEL again
        bpel = new BPELScript(workflow);
        bpel.create(BPELScriptType.GPEL);
        gpelProcess = bpel.getGpelProcess();
View Full Code Here

     * @throws GraphException
     * @throws ComponentRegistryException
     */
    public void testConvertToCWSDLs() throws ComponentException, GraphException, ComponentRegistryException {
        WorkflowCreator creator = new WorkflowCreator();
        Workflow workflow = creator.createComplexMathWorkflow();
        DSCUtil.createCWSDLs(workflow, this.configuration.getDSCURL());
    }
View Full Code Here

     * @throws ComponentRegistryException
     */
    public void testWorkflow() throws ComponentException, IOException, GraphException, InterruptedException,
            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

    public static LeadContextHeader buildLeadContextHeader(final XBayaEngine engine,
            MonitorConfiguration monitorConfiguration, String nodeId, LeadResourceMapping resourceMapping)
            throws URISyntaxException {

        XBayaConfiguration configuration = engine.getConfiguration();
        Workflow workflow = engine.getWorkflow();

        LeadContextHeader leadContext = buildLeadContextHeader(workflow, configuration, monitorConfiguration, nodeId,
                resourceMapping);

        return leadContext;
View Full Code Here

    /**
     * Opens a current workflow from the local file.
     */
    public void openWorkflow() {
        Workflow workflow = null;
        int returnVal = this.graphFileChooser.showOpenDialog(this.engine.getGUI().getFrame());

        if (returnVal == JFileChooser.APPROVE_OPTION) {
            File file = this.graphFileChooser.getSelectedFile();
            logger.info(file.getPath());

            try {
                String path = file.getPath();

                if (path.endsWith(XBayaConstants.GRAPH_FILE_SUFFIX)) {
                    WSGraph graph = WSGraphFactory.createGraph(file);
                    workflow = Workflow.graphToWorkflow(graph);
                } else {
                    XmlElement workflowElement = XMLUtil.loadXML(file);
                    workflow = new Workflow(workflowElement);
                    engine.getConfiguration().registerExecutionModeChangeListener(workflow);
                    workflow.executionModeChanged(engine.getConfiguration());
                }
                GraphCanvas newGraphCanvas = engine.getGUI().newGraphCanvas(true);
                newGraphCanvas.setWorkflow(workflow);
                //this.engine.setWorkflow(workflow);
                engine.getGUI().getGraphCanvas().setWorkflowFile(file);
View Full Code Here

    public void importWorkflow() {
        int returnVal = this.graphFileChooser.showOpenDialog(this.engine.getGUI().getFrame());
        if (returnVal == JFileChooser.APPROVE_OPTION) {
            File file = this.graphFileChooser.getSelectedFile();

            Workflow workflow = this.engine.getWorkflow();
            try {

                String path = file.getPath();
                Workflow importedWorkflow;
                if (path.endsWith(XBayaConstants.GRAPH_FILE_SUFFIX)) {
                    WSGraph importedGraph = WSGraphFactory.createGraph(file);
                    importedWorkflow = Workflow.graphToWorkflow(importedGraph);
                } else {
                    XmlElement importedWorkflowElement = XMLUtil.loadXML(file);
                    importedWorkflow = new Workflow(importedWorkflowElement);
                     engine.getConfiguration().registerExecutionModeChangeListener(workflow);
                    workflow.executionModeChanged(engine.getConfiguration());
                }
                GraphCanvas newGraphCanvas = engine.getGUI().newGraphCanvas(true);
                newGraphCanvas.setWorkflow(importedWorkflow);
View Full Code Here

        File file = new File(XBayaPathConstants.WORKFLOW_DIRECTORY, "complex-math.xwf");
        XmlElement workflowXML = XMLUtil.loadXML(file);

        // Parse the workflow
        Workflow workflow = new Workflow(workflowXML);

        // Take out the graph of the workflow.
        Graph graph = workflow.getGraph();

        // Extract inputs of the workflow.
        Collection<InputNode> inputNodes = GraphUtil.getInputNodes(graph);

        for (InputNode inputNode : inputNodes) {
View Full Code Here

TOP

Related Classes of org.apache.airavata.xbaya.wf.Workflow

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.