Examples of AiravataAPI


Examples of org.apache.airavata.client.api.AiravataAPI

          }

                    String userName = ServerSettings.getSystemUser();
                    String gateway = ServerSettings.getSystemUserGateway();

                    AiravataAPI airavataAPI = AiravataAPIFactory.getAPI(gateway, userName);
          String localAddress = ServiceUtils.generateServiceURLFromConfigurationContext(context, MESSAGE_BOX_SERVICE_NAME);
          logger.debug("MESSAGE BOX SERVICE_ADDRESS:" + localAddress);
                    context.setProperty(SERVICE_URL,new URI(localAddress));
          context.setProperty(JCR_REGISTRY,airavataAPI);
          /*
 
View Full Code Here

Examples of org.apache.airavata.client.api.AiravataAPI

        // workflow context
        MessageContext<String> workflowContext = context.getMessageContext(WorkflowContextImpl.WORKFLOW_CONTEXT_NAME);

        // registry
        AiravataAPI airavataAPI = context.getExecutionContext().getRegistryService();

        if (outputContext != null && workflowContext != null) {

            String workflowId = workflowContext.getValue(WorkflowContextImpl.WORKFLOW_ID);
            List<ActualParameter> outputs = new ArrayList<ActualParameter>();

            for (Iterator<String> iterator = outputContext.getNames(); iterator.hasNext();) {
                String key = iterator.next();
                outputs.add(outputContext.getValue(key));
            }

            if (airavataAPI != null && DataRegistry.class.isAssignableFrom(airavataAPI.getClass())) {
                try {
          ((DataRegistry) airavataAPI).saveOutput(workflowId, outputs);
        } catch (RegistryException e) {
          log.error(e.getLocalizedMessage(), e);
        }
            } else {
                log.debug("Registry does not support for Data Catalog, CLass: " + airavataAPI.getClass());
            }

        } else {
            log.debug("Context is null");
        }
View Full Code Here

Examples of org.apache.airavata.client.api.AiravataAPI

        public void run() {
                String port = null;
                String username = null;
                String password = null;
                String gatewayName = null;
                AiravataAPI airavataAPI = null;
                try {
                    try {
                        Thread.sleep(JCR_AVAIALABILITY_WAIT_INTERVAL);
                    } catch (InterruptedException e1) {
                        e1.printStackTrace();
View Full Code Here

Examples of org.apache.airavata.client.api.AiravataAPI

    }

    public void shutDown(ConfigurationContext configctx, AxisService service) {
        //following nullchecks will avoid the exceptions when user press Ctrl-C before the server start properly
        if (configctx.getProperty(GFAC_CONFIGURATION) != null) {
            AiravataAPI airavataAPI = ((GFacConfiguration) configctx.getProperty(GFAC_CONFIGURATION)).getAiravataAPI();
            String gfacURL = (String) configctx.getProperty(GFAC_URL);
            try {
                airavataAPI.getAiravataManager().removeGFacURI(new URI(gfacURL));
            } catch (AiravataAPIInvocationException e) {
                e.printStackTrace();
            } catch (URISyntaxException e) {
                e.printStackTrace();
            }
View Full Code Here

Examples of org.apache.airavata.client.api.AiravataAPI

            this.workflowInterpreterTextField.setText(workflowInterpreterURL.toString());
        } else {
            this.workflowInterpreterTextField.setText(XBayaConstants.DEFAULT_WORKFLOW_INTERPRETER_URL);
        }

        AiravataAPI airavataAPI = config.getAiravataAPI();
        if (null != airavataAPI) {
            this.RegistryTextField.setText(config.getRegistryURL());
        } else {
            this.RegistryTextField.setText(XBayaConstants.REGISTRY_URL.toASCIIString());
        }
View Full Code Here

Examples of org.apache.airavata.client.api.AiravataAPI

                    List<WorkflowInput> workflowInputs=new ArrayList<WorkflowInput>();
                    for (int i = 0; i < inputNodes.size(); i++) {
                      InputNode inputNode = inputNodes.get(i);
                      workflowInputs.add(new WorkflowInput(inputNode.getID(), inputNode.getDefaultValue().toString()));
                    }
                    AiravataAPI api = engine.getConfiguration().getAiravataAPI();
                   
                    ExperimentAdvanceOptions options = api.getExecutionManager().createExperimentAdvanceOptions(instanceNameFinal, api.getCurrentUser(), null);
                    String experimentId = api.getExecutionManager().runExperiment(api.getWorkflowManager().getWorkflowAsString(workflow), workflowInputs,options);
                    try {
                        WorkflowInterpreterLaunchWindow.this.engine.getMonitor().getConfiguration().setTopic(experimentId);
                        WorkflowInterpreterLaunchWindow.this.engine.getMonitor().start();
                    } catch (MonitorException e1) {
                        WorkflowInterpreterLaunchWindow.this.engine.getGUI().getErrorWindow().error(e1);
View Full Code Here

Examples of org.apache.airavata.client.api.AiravataAPI

        registryURL = "http://" + serverUrl + ":" + port + "/" + serverContextName + "/api";

        log("Configurations - Registry URL : " + registryURL);

        PasswordCallback passwordCallback = new PasswordCallbackImpl();
        AiravataAPI airavataAPI = AiravataAPIFactory.getAPI(new URI(getRegistryURL()), getGatewayName(), getUserName(),
                passwordCallback);

        checkServerStartup(airavataAPI);

        log("Server successfully started .............................");
View Full Code Here

Examples of org.apache.airavata.client.api.AiravataAPI

        }
    }

    protected void runWorkFlow(Workflow workflow, List<String> inputValues) throws Exception {

        AiravataAPI airavataAPI = AiravataAPIFactory.getAPI(new URI(getRegistryURL()), getGatewayName(), getUserName(),
                new PasswordCallbackImpl());
        List<WorkflowInput> workflowInputs = setupInputs(workflow, inputValues);
        String workflowName = workflow.getName();
        ExperimentAdvanceOptions options = airavataAPI.getExecutionManager().createExperimentAdvanceOptions(
                workflowName, getUserName(), null);
        String experimentId = airavataAPI.getExecutionManager().runExperiment(workflowName, workflowInputs, options);

        Assert.assertNotNull(experimentId);

        log.info("Run workflow completed ....");
        log.info("Starting monitoring ....");
View Full Code Here

Examples of org.apache.airavata.client.api.AiravataAPI

        monitor(experimentId);
    }

    protected void runWorkFlowWithoutMonitor(Workflow workflow, List<String> inputValues) throws Exception {

        AiravataAPI airavataAPI = AiravataAPIFactory.getAPI(new URI(getRegistryURL()), getGatewayName(), getUserName(),
                new PasswordCallbackImpl());
        List<WorkflowInput> workflowInputs = setupInputs(workflow, inputValues);
        String workflowName = workflow.getName();
        ExperimentAdvanceOptions options = airavataAPI.getExecutionManager().createExperimentAdvanceOptions(
                workflowName, getUserName(), null);
        String experimentId = airavataAPI.getExecutionManager().runExperiment(workflowName, workflowInputs, options,
                new EventDataListenerAdapter() {
                    @Override
                    public void notify(EventDataRepository eventDataRepo, EventData eventData) {
                        // do nothing
                    }
                });

        Assert.assertNotNull(experimentId);
        airavataAPI.getExecutionManager().waitForExperimentTermination(experimentId);

        log.info("Run workflow completed ....");
        log.info("Starting monitoring ....");

        verifyOutput(experimentId, "echo_output=Airavata_Test");
View Full Code Here

Examples of org.apache.airavata.client.api.AiravataAPI

        verifyOutput(experimentId, "echo_output=Airavata_Test");
    }

    protected void verifyOutput(String experimentId, String outputVerifyingString) throws Exception {
        AiravataAPI airavataAPI = AiravataAPIFactory.getAPI(new URI(getRegistryURL()), getGatewayName(), getUserName(),
                new PasswordCallbackImpl());
        log.info("Experiment ID Returned : " + experimentId);

        ExperimentData experimentData = airavataAPI.getProvenanceManager().getExperimentData(experimentId);

        log.info("Verifying output ...");

        List<WorkflowExecutionDataImpl> workflowInstanceData = experimentData.getWorkflowExecutionDataList();
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.