Examples of WorkflowClient


Examples of edu.indiana.extreme.xbaya.workflow.proxy.WorkflowClient

  public static Pair<String, String> invoker(String userName,
      String password, String workflowAsAString,
      Pair<String, String>[] inputs,
      Workflow workflow) throws IOException, GSSException {

    WorkflowClient wfClient = null;
    WorkflowContext context = null;
    String topic = UUID.randomUUID().toString();

    context = new GPELWorkflowContext(topic, userName, password);
    wfClient = new GPELWorkflowClient(context, workflow);
    wfClient.init();
    try {
      System.out.println(workflow.getGPELTemplateID());
      context.prepare(wfClient, workflow);
    } catch (GSSException e) {
      throw new RuntimeException(e);
    } catch (URISyntaxException e) {
      throw new RuntimeException(e);
    }

    return wfClient.invoke(inputs);

  }
View Full Code Here

Examples of org.apache.airavata.xbaya.workflow.WorkflowClient

        // Clean up the previous run. These cannot be in hide() because show()
        // might be called before hide() exits completly.
        this.parameterPanel.getContentPanel().removeAll();
        this.parameterTextFields.clear();

        WorkflowClient workflowClient = this.engine.getWorkflowClient();
        if (workflowClient.isSecure()) {
            // Check if the proxy is loaded.
            boolean loaded = this.myProxyChecker.loadIfNecessary();
            if (!loaded) {
                return;
            }
            // Creates a secure channel in gpel.
            MyProxyClient myProxyClient = this.engine.getMyProxyClient();
            GSSCredential proxy = myProxyClient.getProxy();
            UserX509Credential credential = new UserX509Credential(proxy, XBayaSecurity.getTrustedCertificates());
            try {
                workflowClient.setUserX509Credential(credential);
            } catch (WorkflowEngineException e) {
                this.engine.getGUI().getErrorWindow().error(ErrorMessages.GPEL_ERROR, e);
                return;
            }
        }
View Full Code Here

Examples of org.apache.airavata.xbaya.workflow.WorkflowClient

            openWorkflowTab(engine);
        }
    }

    public void openWorkflowTab(XBayaEngine engine) {
        WorkflowClient workflowClient = engine.getWorkflowClient();
        try {
            Workflow workflow = this.node.getComponent().getWorkflow(workflowClient);
            engine.getGUI().selectOrCreateGraphCanvas(workflow);
        } catch (GraphException e) {
            engine.getErrorWindow().error(ErrorMessages.GRAPH_FORMAT_ERROR, e);
View Full Code Here

Examples of org.apache.airavata.xbaya.workflow.WorkflowClient

        try {
            if (this.incorrectWorkflowIDs.contains(workflowInstanceID)) {
                // Do not try to load a workflow that failed before.
                return;
            }
            WorkflowClient client = this.engine.getWorkflowClient();
            Workflow loadedWorkflow = client.load(workflowInstanceID, WorkflowType.INSTANCE);
            GraphCanvas canvas = this.engine.getGUI().newGraphCanvas(true);
            canvas.setWorkflow(loadedWorkflow);
        } catch (GraphException e) {
            this.incorrectWorkflowIDs.add(workflowInstanceID);
            logger.error(e.getMessage(), e);
View Full Code Here

Examples of org.apache.airavata.xbaya.workflow.WorkflowClient

        // Clean up the previous run. These cannot be in hide() because show()
        // might be called before hide() exits completly.
        this.parameterPanel.getContentPanel().removeAll();
        this.parameterTextFields.clear();

        WorkflowClient workflowClient = this.engine.getWorkflowClient();
        if (workflowClient.isSecure()) {
            // Check if the proxy is loaded.
            boolean loaded = this.myProxyChecker.loadIfNecessary();
            if (!loaded) {
                return;
            }
            // Creates a secure channel in gpel.
            MyProxyClient myProxyClient = this.engine.getMyProxyClient();
            GSSCredential proxy = myProxyClient.getProxy();
            UserX509Credential credential = new UserX509Credential(proxy, XBayaSecurity.getTrustedCertificates());
            try {
                workflowClient.setUserX509Credential(credential);
            } catch (WorkflowEngineException e) {
                this.engine.getErrorWindow().error(ErrorMessages.GPEL_ERROR, e);
                return;
            }
        }
View Full Code Here

Examples of org.apache.airavata.xbaya.workflow.WorkflowClient

            this.headColor = HEAD_COLOR;
        }
    }

    public void openWorkflowTab(XBayaEngine engine) {
        WorkflowClient workflowClient = engine.getWorkflowClient();
        try {
            Workflow workflow = this.node.getComponent().getWorkflow(workflowClient);
            engine.getGUI().selectOrCreateGraphCanvas(workflow);
        } catch (GraphException e) {
            engine.getErrorWindow().error(ErrorMessages.GRAPH_FORMAT_ERROR, e);
View Full Code Here

Examples of org.ofbiz.workflow.client.WorkflowClient

    public static WorkflowClient getClient(DispatchContext dctx) {
        if (!wfClientCache.containsKey(dctx)) {
            synchronized (WfFactory.class) {
                if (!wfClientCache.containsKey(dctx))
                wfClientCache.put(dctx, new WorkflowClient(dctx));
            }
        }
        return wfClientCache.get(dctx);
    }
View Full Code Here

Examples of org.ofbiz.workflow.client.WorkflowClient

    public static WorkflowClient getClient(DispatchContext dctx) {
        if (!wfClientCache.containsKey(dctx)) {
            synchronized (WfFactory.class) {
                if (!wfClientCache.containsKey(dctx))
                wfClientCache.put(dctx, new WorkflowClient(dctx));
            }
        }
        return (WorkflowClient) wfClientCache.get(dctx);
    }
View Full Code Here

Examples of org.ofbiz.workflow.client.WorkflowClient

    public static WorkflowClient getClient(DispatchContext dctx) {
        if (!wfClientCache.containsKey(dctx)) {
            synchronized (WfFactory.class) {
                if (!wfClientCache.containsKey(dctx))
                wfClientCache.put(dctx, new WorkflowClient(dctx));
            }
        }
        return (WorkflowClient) wfClientCache.get(dctx);
    }
View Full Code Here

Examples of org.ofbiz.workflow.client.WorkflowClient

    public static WorkflowClient getClient(DispatchContext dctx) {
        if (!wfClientCache.containsKey(dctx)) {
            synchronized (WfFactory.class) {
                if (!wfClientCache.containsKey(dctx))
                wfClientCache.put(dctx, new WorkflowClient(dctx));
            }
        }
        return (WorkflowClient) wfClientCache.get(dctx);
    }
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.