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

Examples of org.apache.airavata.workflow.model.wf.Workflow


    public boolean triggerAction(JTree tree, String action) throws Exception {
        if (action.equals(DeleteAction.ID)) {
            deleteHostDescription(tree);
            return true;
        } else if (action.equals(ImportAction.ID)) {
          Workflow workflow = new RegistryAccesser(getXBayaEngine()).getWorkflow(getXbayaWorkflow().getWorkflowName());
            GraphCanvas newGraphCanvas = getXBayaEngine().getGUI().newGraphCanvas(true);
            newGraphCanvas.setWorkflow(workflow);
            getXBayaEngine().getGUI().getGraphCanvas().setWorkflowFile(null);
            return true;
        }
View Full Code Here


        }
    return builder;
  }

    private Workflow extractWorkflow(String workflowName) throws AiravataAPIInvocationException {
        Workflow workflowObj = null;
        //FIXME - There should be a better way to figure-out if the passed string is a name or an xml
        if(!workflowName.contains("http://airavata.apache.org/xbaya/xwf")){//(getClient().getWorkflowManager().isWorkflowExists(workflowName)) {
            workflowObj = getClient().getWorkflowManager().getWorkflow(workflowName);
        }else {
            try{
View Full Code Here

        URI workflowID = event.getWorkflowID();

        List<GraphCanvas> graphCanvases = this.xbayaGUI.getGraphCanvases();
        boolean found = false;
        for (GraphCanvas graphCanvas : graphCanvases) {
            Workflow workflow = graphCanvas.getWorkflow();
//            URI instanceID = workflow.getGPELInstanceID();
//            if (instanceID == null) {
                // If the workflow doesn't have an instance ID, it's a template.
                // We handle it so that users can use a workflow template to
                // monitor a workflow too.
                // This is also needed in the case of jython workflow.
                handleEvent(event, forward, workflow.getGraph());
//            } else if (instanceID.equals(workflowID)) {
//                This is the regular case.
//                found = true;
//                handleEvent(event, forward, workflow.getGraph());
//            } else if (null != workflowID
//                    && -1 != WSDLUtil.findWorkflowName(workflowID).indexOf(WSDLUtil.findWorkflowName(instanceID))) {
//                handleEvent(event, WSDLUtil.findWorkflowName(workflowID), workflow.getGraph());
//            }
        }

        // Load a sub-workflow.
        if (type == MonitorUtil.EventType.WORKFLOW_INITIALIZED) {
            if (forward) {
                // Check if the workflow instance is already open.
                for (GraphCanvas graphCanvas : graphCanvases) {
                    Workflow workflow = graphCanvas.getWorkflow();
                    URI instanceID = workflow.getGPELInstanceID();
                    if (workflowID.equals(instanceID)) {
                        // The workflow instance is already loaded.
                        return;
                    }
                }
View Full Code Here

    private String setupAndLaunch(String workflowAsString, String topic, String gatewayId, String username,
                                  NameValue[] inputs,Map<String,String>configurations,boolean inNewThread,WorkflowContextHeaderBuilder builder) throws XMLStreamException, MalformedURLException, RepositoryException, RegistryException, AiravataAPIInvocationException {
        log.debug("Launch is called for topic:"+topic);

        Workflow workflow = null;
        try {
            workflow = new Workflow(workflowAsString);
            log.debug("Workflow Object created");
        } catch (GraphException e1) {
            e1.printStackTrace();
        } catch (ComponentException e1) {
            e1.printStackTrace();
View Full Code Here

    @Test
    public void testScheduleDynamically() throws IOException, URISyntaxException, WorkflowException {
        logger.info("Running SimpleForEachWorkflowTest...");
        URL systemResource = this.getClass().getClassLoader().getSystemResource("SimpleForEach.xwf");
        Workflow workflow = new Workflow(WorkflowTestUtils.readWorkflow(systemResource));
        XBayaConfiguration conf = WorkflowTestUtils.getConfiguration();
//        AiravataRegistry2 registry = conf.getJcrComponentRegistry()==null? null:conf.getJcrComponentRegistry().getRegistry();
//    WorkflowInterpreterConfiguration workflowInterpreterConfiguration = new WorkflowInterpreterConfiguration(workflow, UUID.randomUUID().toString(),conf.getMessageBoxURL(), conf.getBrokerURL(), registry, conf, null,null,true);
    WorkflowInterpreterConfiguration workflowInterpreterConfiguration = new WorkflowInterpreterConfiguration(workflow,
                UUID.randomUUID().toString(),conf.getMessageBoxURL(), conf.getBrokerURL(), conf.getAiravataAPI(), conf, null,null,true);
View Full Code Here

    @Test
    public void testScheduleDynamically() throws IOException, URISyntaxException, WorkflowException {
        logger.info("Running SimpleMathWorkflowTest...");
        URL systemResource = this.getClass().getClassLoader().getSystemResource("SimpleMath.xwf");
        Workflow workflow = new Workflow(WorkflowTestUtils.readWorkflow(systemResource));
        XBayaConfiguration conf = WorkflowTestUtils.getConfiguration();
//        AiravataRegistry2 registry = conf.getJcrComponentRegistry()==null? null:conf.getJcrComponentRegistry().getRegistry();
//    WorkflowInterpreterConfiguration workflowInterpreterConfiguration = new WorkflowInterpreterConfiguration(workflow, UUID.randomUUID().toString(),conf.getMessageBoxURL(), conf.getBrokerURL(), registry, conf, null,null,true);
    WorkflowInterpreterConfiguration workflowInterpreterConfiguration = new WorkflowInterpreterConfiguration(workflow,
                UUID.randomUUID().toString(),conf.getMessageBoxURL(), conf.getBrokerURL(), conf.getAiravataAPI(), conf, null,null,true);
View Full Code Here

    @Test
    public void testScheduleDynamically() throws IOException, URISyntaxException, WorkflowException {
        logger.info("Running ComplexForEachWorkflowTest...");
        URL systemResource = this.getClass().getClassLoader().getSystemResource("ComplexForEach.xwf");
        Workflow workflow = new Workflow(WorkflowTestUtils.readWorkflow(systemResource));
//        ((InputNode) workflow.getGraph().getNode("input")).setDefaultValue("1");
        XBayaConfiguration conf = WorkflowTestUtils.getConfiguration();
//        AiravataRegistry2 registry = conf.getJcrComponentRegistry()==null? null:conf.getJcrComponentRegistry().getRegistry();
//    WorkflowInterpreterConfiguration workflowInterpreterConfiguration = new WorkflowInterpreterConfiguration(workflow, UUID.randomUUID().toString(),conf.getMessageBoxURL(), conf.getBrokerURL(), registry, conf,null,null,true);
        WorkflowInterpreterConfiguration workflowInterpreterConfiguration = new WorkflowInterpreterConfiguration(workflow,
View Full Code Here

    @Test
    public void testScheduleDynamically() throws IOException, URISyntaxException, WorkflowException {
        logger.info("Running CrossProductWorkflowTest...");
        URL systemResource = this.getClass().getClassLoader().getSystemResource("LevenshteinDistance.xwf");
        Workflow workflow = new Workflow(WorkflowTestUtils.readWorkflow(systemResource));
        XBayaConfiguration conf = WorkflowTestUtils.getConfiguration();
//        AiravataRegistry2 registry = conf.getJcrComponentRegistry()==null? null:conf.getJcrComponentRegistry().getRegistry();
//    WorkflowInterpreterConfiguration workflowInterpreterConfiguration = new WorkflowInterpreterConfiguration(workflow, UUID.randomUUID().toString(),conf.getMessageBoxURL(), conf.getBrokerURL(), registry, conf, null,null,true);
    WorkflowInterpreterConfiguration workflowInterpreterConfiguration = new WorkflowInterpreterConfiguration(workflow,
                UUID.randomUUID().toString(),conf.getMessageBoxURL(), conf.getBrokerURL(), conf.getAiravataAPI(), conf, null,null,true);
View Full Code Here

    @Test
    public void testScheduleDynamically() throws IOException, URISyntaxException, WorkflowException {
        logger.info("Running ForEachWorkflowTest...");
        URL systemResource = this.getClass().getClassLoader().getSystemResource("SimpleEcho.xwf");
        Workflow workflow = new Workflow(WorkflowTestUtils.readWorkflow(systemResource));
        ((InputNode) workflow.getGraph().getNode("input")).setDefaultValue("1");
        XBayaConfiguration conf = WorkflowTestUtils.getConfiguration();
//        AiravataRegistry2 registry = conf.getJcrComponentRegistry()==null? null:conf.getJcrComponentRegistry().getRegistry();
//    WorkflowInterpreterConfiguration workflowInterpreterConfiguration = new WorkflowInterpreterConfiguration(workflow, UUID.randomUUID().toString(),conf.getMessageBoxURL(), conf.getBrokerURL(), registry, conf, null,null,true);
    WorkflowInterpreterConfiguration workflowInterpreterConfiguration = new WorkflowInterpreterConfiguration(workflow,
                UUID.randomUUID().toString(),conf.getMessageBoxURL(), conf.getBrokerURL(), conf.getAiravataAPI(), conf, null,null,true);
View Full Code Here

    @Test
    public void testScheduleDynamically() throws IOException, URISyntaxException, WorkflowException {
        logger.info("Running WorkflowTest...");
        URL systemResource = this.getClass().getClassLoader().getSystemResource("SimpleEcho.xwf");
        Workflow workflow = new Workflow(WorkflowTestUtils.readWorkflow(systemResource));
        ((InputNode) workflow.getGraph().getNode("input")).setDefaultValue("1");
        XBayaConfiguration conf = WorkflowTestUtils.getConfiguration();
//        AiravataRegistry2 registry = conf.getJcrComponentRegistry()==null? null:conf.getJcrComponentRegistry().getRegistry();
//    WorkflowInterpreterConfiguration workflowInterpreterConfiguration = new WorkflowInterpreterConfiguration(workflow, UUID.randomUUID().toString(),conf.getMessageBoxURL(), conf.getBrokerURL(), registry, conf, null,null,true);
    WorkflowInterpreterConfiguration workflowInterpreterConfiguration = new WorkflowInterpreterConfiguration(workflow,
                UUID.randomUUID().toString(),conf.getMessageBoxURL(), conf.getBrokerURL(), conf.getAiravataAPI(), conf, null,null,true);
View Full Code Here

TOP

Related Classes of org.apache.airavata.workflow.model.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.