airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From samin...@apache.org
Subject [04/20] updating xbaya gui to the new airavata
Date Fri, 11 Jul 2014 22:21:17 GMT
http://git-wip-us.apache.org/repos/asf/airavata/blob/3e6c815a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/RegistryLoaderWindow.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/RegistryLoaderWindow.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/RegistryLoaderWindow.java
deleted file mode 100644
index 5d266ce..0000000
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/RegistryLoaderWindow.java
+++ /dev/null
@@ -1,239 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-package org.apache.airavata.xbaya.ui.experiment;
-
-import java.awt.event.ActionEvent;
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
-import java.util.Map;
-import java.util.Set;
-import java.util.Vector;
-
-import javax.swing.AbstractAction;
-import javax.swing.JButton;
-import javax.swing.JPanel;
-import javax.swing.SwingUtilities;
-import javax.swing.border.EtchedBorder;
-import javax.swing.border.TitledBorder;
-
-import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
-import org.apache.airavata.registry.api.exception.RegistryException;
-import org.apache.airavata.workflow.model.component.ComponentException;
-import org.apache.airavata.workflow.model.graph.GraphException;
-import org.apache.airavata.workflow.model.wf.Workflow;
-import org.apache.airavata.xbaya.XBayaEngine;
-import org.apache.airavata.xbaya.registry.RegistryAccesser;
-import org.apache.airavata.xbaya.ui.dialogs.XBayaDialog;
-import org.apache.airavata.xbaya.ui.graph.GraphCanvas;
-import org.apache.airavata.xbaya.ui.utils.ErrorMessages;
-import org.apache.airavata.xbaya.ui.widgets.GridPanel;
-import org.apache.airavata.xbaya.ui.widgets.XbayaEnhancedList;
-import org.apache.airavata.xbaya.util.XBayaUtil;
-
-public class RegistryLoaderWindow {
-
-    private XBayaEngine engine;
-
-    private XBayaDialog dialog;
-
-    private JButton okButton;
-
-    private JButton deleteButton;
-
-    private XbayaEnhancedList<RegistrySearchResult> list;
-
-    /**
-     * Constructs a RegistryLoaderWindow.
-     * 
-     * @param engine
-     */
-    public RegistryLoaderWindow(XBayaEngine engine) {
-        this.engine = engine;
-        if (XBayaUtil.acquireJCRRegistry(this.engine)) {
-            initGUI();
-        }
-    }
-
-    /**
-     * Shows the window.
-     */
-    public void show() {
-
-        /*
-         * this.list.getList().setListData( new String[]{ "Loading the workflow list from the Registry.",
-         * "Please wait for a moment."});
-         */
-        this.list.setEnabled(false);
-        this.okButton.setEnabled(false);
-        this.deleteButton.setEnabled(false);
-
-        new Thread() {
-            @Override
-            public void run() {
-                try {
-                    RegistryAccesser registryAccesser = new RegistryAccesser(RegistryLoaderWindow.this.engine);
-
-                    final Map<String, String> resultList = registryAccesser.getOGCEWorkflowTemplateList();
-                    final Set<String> keys = resultList.keySet();
-
-                    SwingUtilities.invokeLater(new Runnable() {
-                        public void run() {
-                            if (resultList == null || resultList.size() == 0) {
-                                /*
-                                 * OGCEXRegistryLoaderWindow.this.list.getList(). setListData( new
-                                 * String[]{"No workflow"});
-                                 */
-                            } else {
-                                Vector<RegistrySearchResult> results = new Vector<RegistrySearchResult>();
-                                String val = null;
-                                for (String key : keys) {
-                                    val = resultList.get(key);
-                                    try {
-										results.add(new RegistrySearchResult(new Workflow(val)));
-									} catch (GraphException e) {
-										e.printStackTrace();
-									} catch (ComponentException e) {
-										e.printStackTrace();
-									}
-                                }
-                                RegistryLoaderWindow.this.list.setListData(results);
-                                RegistryLoaderWindow.this.list.setEnabled(true);
-                            }
-                        }
-                    });
-                } catch (RuntimeException e) {
-                    RegistryLoaderWindow.this.engine.getGUI().getErrorWindow().error(
-                            ErrorMessages.REGISTRY_WORKFLOW_LIST_LOAD_ERROR, e);
-                    hide();
-                } catch (Error e) {
-                    RegistryLoaderWindow.this.engine.getGUI().getErrorWindow().error(ErrorMessages.UNEXPECTED_ERROR, e);
-                    hide();
-                } catch (AiravataAPIInvocationException e) {
-                    RegistryLoaderWindow.this.engine.getGUI().getErrorWindow().error(ErrorMessages.UNEXPECTED_ERROR, e);
-                    hide();
-                }
-            }
-        }.start();
-
-        // This has to be the last because it blocks when the dialog is modal.
-        this.dialog.show();
-    }
-
-    /**
-     * Hides the window.
-     */
-    public void hide() {
-        this.dialog.hide();
-    }
-
-    private void ok() {
-        RegistrySearchResult result = this.list.getSelectedValue();
-        hide();
-
-        try {
-            Workflow workflow = new RegistryAccesser(this.engine).getWorkflow(result.getResourceName());
-            GraphCanvas newGraphCanvas = engine.getGUI().newGraphCanvas(true);
-            newGraphCanvas.setWorkflow(workflow);
-            //this.engine.setWorkflow(workflow);
-            engine.getGUI().getGraphCanvas().setWorkflowFile(null);
-//            RegistryLoaderWindow.this.engine.setWorkflow(workflow);
-        } catch (Exception e) {
-            RegistryLoaderWindow.this.engine.getGUI().getErrorWindow().error(e);
-        }
-    }
-
-    private void delete() {
-        RegistryAccesser registryAccesser = new RegistryAccesser(RegistryLoaderWindow.this.engine);
-        for (RegistrySearchResult i : this.list.getSelectedValues()) {
-            try {
-                registryAccesser.deleteOGCEWorkflow(i.getResourceId());
-            }  catch (AiravataAPIInvocationException e) {
-                e.printStackTrace();
-            }
-        }
-        this.list.removeSelectedRows();
-        hide();
-    }
-
-    /**
-     * Initializes the GUI
-     */
-    private void initGUI() {
-
-        this.list = new XbayaEnhancedList<RegistrySearchResult>();
-
-        this.list.addMouseListener(new MouseAdapter() {
-            @Override
-            public void mouseClicked(MouseEvent e) {
-                if (e.getClickCount() >= 2) {
-                    // double click is same as cliking the OK button.
-                    RegistryLoaderWindow.this.okButton.doClick();
-                }
-
-                if (RegistryLoaderWindow.this.list.getSelectedIndex() == -2) {
-                    RegistryLoaderWindow.this.okButton.setEnabled(false);
-                    RegistryLoaderWindow.this.deleteButton.setEnabled(true);
-                } else if (RegistryLoaderWindow.this.list.getSelectedIndex() != -1) {
-                    RegistryLoaderWindow.this.okButton.setEnabled(true);
-                    RegistryLoaderWindow.this.deleteButton.setEnabled(true);
-                } else {
-                    RegistryLoaderWindow.this.okButton.setEnabled(false);
-                    RegistryLoaderWindow.this.deleteButton.setEnabled(false);
-                }
-            }
-        });
-
-        GridPanel mainPanel = new GridPanel();
-        TitledBorder border = new TitledBorder(new EtchedBorder(), "Select a workflow to load");
-        mainPanel.getSwingComponent().setBorder(border);
-        mainPanel.add(this.list);
-        mainPanel.layout(1, 1, 0, 0);
-
-        JPanel buttonPanel = new JPanel();
-        this.okButton = new JButton("Load");
-        this.okButton.addActionListener(new AbstractAction() {
-            public void actionPerformed(ActionEvent e) {
-                ok();
-            }
-        });
-        buttonPanel.add(this.okButton);
-
-        this.deleteButton = new JButton("Delete");
-        this.deleteButton.addActionListener(new AbstractAction() {
-            public void actionPerformed(ActionEvent e) {
-                delete();
-            }
-        });
-        buttonPanel.add(this.deleteButton);
-
-        JButton cancelButton = new JButton("Cancel");
-        cancelButton.addActionListener(new AbstractAction() {
-            public void actionPerformed(ActionEvent e) {
-                hide();
-            }
-        });
-        buttonPanel.add(cancelButton);
-
-        this.dialog = new XBayaDialog(this.engine.getGUI(), "Load a Workflow from the Registry", mainPanel, buttonPanel);
-        this.dialog.setDefaultButton(this.okButton);
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/3e6c815a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/WorkflowInterpreterLaunchWindow.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/WorkflowInterpreterLaunchWindow.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/WorkflowInterpreterLaunchWindow.java
index 68fc482..e4bef63 100644
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/WorkflowInterpreterLaunchWindow.java
+++ b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/WorkflowInterpreterLaunchWindow.java
@@ -38,8 +38,6 @@ import javax.swing.JPanel;
 import javax.swing.border.EtchedBorder;
 import javax.xml.namespace.QName;
 
-import org.apache.airavata.client.api.AiravataAPI;
-import org.apache.airavata.client.api.ExperimentAdvanceOptions;
 import org.apache.airavata.common.utils.StringUtil;
 import org.apache.airavata.common.utils.XMLUtil;
 import org.apache.airavata.workflow.model.graph.system.InputNode;
@@ -47,11 +45,8 @@ import org.apache.airavata.workflow.model.graph.util.GraphUtil;
 import org.apache.airavata.workflow.model.graph.ws.WSNode;
 import org.apache.airavata.workflow.model.ode.ODEClient;
 import org.apache.airavata.workflow.model.wf.Workflow;
-import org.apache.airavata.workflow.model.wf.WorkflowInput;
 import org.apache.airavata.ws.monitor.MonitorConfiguration;
-import org.apache.airavata.ws.monitor.MonitorException;
 import org.apache.airavata.xbaya.XBayaEngine;
-import org.apache.airavata.xbaya.core.amazon.AmazonCredential;
 import org.apache.airavata.xbaya.graph.controller.NodeController;
 import org.apache.airavata.xbaya.jython.script.JythonScript;
 import org.apache.airavata.xbaya.ui.dialogs.XBayaDialog;
@@ -102,9 +97,9 @@ public class WorkflowInterpreterLaunchWindow {
      */
     public WorkflowInterpreterLaunchWindow(XBayaEngine engine) {
         this.engine = engine;
-        if (XBayaUtil.acquireJCRRegistry(engine)) {
+//        if (XBayaUtil.acquireJCRRegistry(engine)) {
             initGUI();
-        }
+//        }
     }
 
     /**
@@ -312,36 +307,36 @@ public class WorkflowInterpreterLaunchWindow {
             @Override
             public void run() {
 
-                try {
-                    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);
-                    if (AmazonCredential.getInstance().getAwsAccessKeyId() != null) {
-                        options.getCustomSecuritySettings().getAmazonWSSettings().setAccessKeyId(AmazonCredential.getInstance().getAwsAccessKeyId());
-                        options.getCustomSecuritySettings().getAmazonWSSettings().setSecretAccessKey(AmazonCredential.getInstance().getAwsSecretAccessKey());
-                    }
-
-                    //TODO get the token id from UI
-                    // For the moment hard code it
-                    // TODO Build UI to get the token id
-                    //options.getCustomSecuritySettings().getCredentialStoreSecuritySettings().setTokenId("1234");
-
-
-                    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);
-                    }
-                } catch (Exception e) {
-                    WorkflowInterpreterLaunchWindow.this.engine.getGUI().getErrorWindow().error(e);
-                }
+//                try {
+//                    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);
+//                    if (AmazonCredential.getInstance().getAwsAccessKeyId() != null) {
+//                        options.getCustomSecuritySettings().getAmazonWSSettings().setAccessKeyId(AmazonCredential.getInstance().getAwsAccessKeyId());
+//                        options.getCustomSecuritySettings().getAmazonWSSettings().setSecretAccessKey(AmazonCredential.getInstance().getAwsSecretAccessKey());
+//                    }
+//
+//                    //TODO get the token id from UI
+//                    // For the moment hard code it
+//                    // TODO Build UI to get the token id
+//                    //options.getCustomSecuritySettings().getCredentialStoreSecuritySettings().setTokenId("1234");
+//
+//
+//                    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);
+//                    }
+//                } catch (Exception e) {
+//                    WorkflowInterpreterLaunchWindow.this.engine.getGUI().getErrorWindow().error(e);
+//                }
             }
         }.start();
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/3e6c815a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/menues/EditMenuItem.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/menues/EditMenuItem.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/menues/EditMenuItem.java
index 05b6d90..8e605bc 100644
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/menues/EditMenuItem.java
+++ b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/menues/EditMenuItem.java
@@ -29,11 +29,8 @@ import javax.swing.JMenu;
 import javax.swing.JMenuItem;
 
 import org.apache.airavata.xbaya.XBayaEngine;
-import org.apache.airavata.xbaya.ui.dialogs.descriptors.DescriptorEditorDialog;
-import org.apache.airavata.xbaya.ui.dialogs.descriptors.DescriptorEditorDialog.DescriptorType;
 import org.apache.airavata.xbaya.ui.dialogs.workflow.ParameterPropertyWindow;
 import org.apache.airavata.xbaya.ui.dialogs.workflow.WorkflowPropertyWindow;
-import org.apache.airavata.xbaya.util.XBayaUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -79,9 +76,9 @@ public class EditMenuItem {
         this.workflowDescriptionItem = createWorkflowDescriptionItem();
         this.parameterReorderingItem = createParameterReorderingItem();
 
-        editHostDescription = createEditHostDescription();
-        editServiceDescription = createEditServiceDescription();
-        editApplicationDescription = createEditApplicationDescription();
+//        editHostDescription = createEditHostDescription();
+//        editServiceDescription = createEditServiceDescription();
+//        editApplicationDescription = createEditApplicationDescription();
 
         editMenu = new JMenu("Edit");
         editMenu.setMnemonic(KeyEvent.VK_E);
@@ -89,10 +86,10 @@ public class EditMenuItem {
         editMenu.add(this.workflowDescriptionItem);
         editMenu.add(this.parameterReorderingItem);
         
-        editMenu.addSeparator();
+//        editMenu.addSeparator();
         
-        editMenu.add(editHostDescription);
-        editMenu.add(editServiceDescription);
+//        editMenu.add(editHostDescription);
+//        editMenu.add(editServiceDescription);
 //        editMenu.add(editApplicationDescription);
     }
 
@@ -128,42 +125,42 @@ public class EditMenuItem {
         return menuItem;
     }
 
-    private JMenuItem createEditHostDescription() {
-        JMenuItem menuItem = new JMenuItem("Hosts...");
-        menuItem.addActionListener(new AbstractAction() {
-            public void actionPerformed(ActionEvent e) {
-            	if (XBayaUtil.acquireJCRRegistry(engine)) {
-					DescriptorEditorDialog dialog = new DescriptorEditorDialog(engine,DescriptorType.HOST);
-					dialog.show();
-				}
-        	}
-        });
-        return menuItem;
-    }
-    
-    private JMenuItem createEditServiceDescription() {
-        JMenuItem menuItem = new JMenuItem("Applications...");
-        menuItem.addActionListener(new AbstractAction() {
-            public void actionPerformed(ActionEvent e) {
-            	if (XBayaUtil.acquireJCRRegistry(engine)) {
-					DescriptorEditorDialog dialog = new DescriptorEditorDialog(engine,DescriptorType.SERVICE);
-					dialog.show();
-				}
-            }
-        });
-        return menuItem;
-    }
-    
-    private JMenuItem createEditApplicationDescription() {
-        JMenuItem menuItem = new JMenuItem("Application Descriptions...");
-        menuItem.addActionListener(new AbstractAction() {
-            public void actionPerformed(ActionEvent e) {
-            	if (XBayaUtil.acquireJCRRegistry(engine)) {
-					DescriptorEditorDialog dialog = new DescriptorEditorDialog(engine,DescriptorType.APPLICATION);
-					dialog.show();
-				}
-        	}
-        });
-        return menuItem;
-    }
+//    private JMenuItem createEditHostDescription() {
+//        JMenuItem menuItem = new JMenuItem("Hosts...");
+//        menuItem.addActionListener(new AbstractAction() {
+//            public void actionPerformed(ActionEvent e) {
+//            	if (XBayaUtil.acquireJCRRegistry(engine)) {
+//					DescriptorEditorDialog dialog = new DescriptorEditorDialog(engine,DescriptorType.HOST);
+//					dialog.show();
+//				}
+//        	}
+//        });
+//        return menuItem;
+//    }
+//    
+//    private JMenuItem createEditServiceDescription() {
+//        JMenuItem menuItem = new JMenuItem("Applications...");
+//        menuItem.addActionListener(new AbstractAction() {
+//            public void actionPerformed(ActionEvent e) {
+//            	if (XBayaUtil.acquireJCRRegistry(engine)) {
+//					DescriptorEditorDialog dialog = new DescriptorEditorDialog(engine,DescriptorType.SERVICE);
+//					dialog.show();
+//				}
+//            }
+//        });
+//        return menuItem;
+//    }
+//    
+//    private JMenuItem createEditApplicationDescription() {
+//        JMenuItem menuItem = new JMenuItem("Application Descriptions...");
+//        menuItem.addActionListener(new AbstractAction() {
+//            public void actionPerformed(ActionEvent e) {
+//            	if (XBayaUtil.acquireJCRRegistry(engine)) {
+//					DescriptorEditorDialog dialog = new DescriptorEditorDialog(engine,DescriptorType.APPLICATION);
+//					dialog.show();
+//				}
+//        	}
+//        });
+//        return menuItem;
+//    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/3e6c815a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/menues/RunMenuItem.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/menues/RunMenuItem.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/menues/RunMenuItem.java
index ab8f102..0b43f04 100644
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/menues/RunMenuItem.java
+++ b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/menues/RunMenuItem.java
@@ -34,8 +34,6 @@ import javax.swing.event.ChangeListener;
 import javax.swing.event.MenuEvent;
 import javax.swing.event.MenuListener;
 
-import org.apache.airavata.workflow.model.exceptions.WorkflowRuntimeException;
-import org.apache.airavata.workflow.model.wf.WorkflowExecutionState;
 import org.apache.airavata.ws.monitor.Monitor;
 import org.apache.airavata.ws.monitor.MonitorConfiguration;
 import org.apache.airavata.ws.monitor.MonitorException;
@@ -46,7 +44,6 @@ import org.apache.airavata.xbaya.XBayaConfiguration;
 import org.apache.airavata.xbaya.XBayaConfiguration.XBayaExecutionMode;
 import org.apache.airavata.xbaya.XBayaEngine;
 import org.apache.airavata.xbaya.core.ide.XBayaExecutionModeListener;
-import org.apache.airavata.xbaya.ui.dialogs.graph.dynamic.DynamicWorkflowRunnerWindow;
 import org.apache.airavata.xbaya.ui.dialogs.monitor.MonitorConfigurationWindow;
 import org.apache.airavata.xbaya.ui.experiment.WorkflowInterpreterLaunchWindow;
 import org.apache.airavata.xbaya.ui.monitor.MonitorStarter;
@@ -263,46 +260,6 @@ public class RunMenuItem  implements EventListener, XBayaExecutionModeListener{
         return item;
     }
 
-    private JMenuItem createLaunchDynamicWorkflowItem() {
-        JMenuItem menuItem = new JMenuItem("Run workflow...");
-        menuItem.setMnemonic(KeyEvent.VK_D);
-        AbstractAction action = new AbstractAction() {
-            private DynamicWorkflowRunnerWindow window;
-
-            public void actionPerformed(ActionEvent event) {
-            	if (isWorkflowRunning()){
-            		if (JOptionPane.showConfirmDialog(null, "A previous workflow excution data needs to be cleared before launching another workflow. Do you wish to continue?", "Run Dynamic Workflow", JOptionPane.YES_NO_OPTION)==JOptionPane.YES_OPTION){
-            			cleanup();
-                    }else{
-            			return;
-            		}
-            	}
-                if (this.window == null) {
-                    int count = 0;
-                    //there is a possibility the ealier run is not yet cleanedup yet.. so wait until it finishes
-                    // and sets the execution state to NONE as the last task of scheduleDynamically
-                    while(engine.getGUI().getWorkflow().getExecutionState() != WorkflowExecutionState.NONE){
-                        try {
-                            Thread.sleep(500);
-                        } catch (InterruptedException e) {
-                            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
-                        }
-                        count++;
-                        if(count > 20){
-                            throw new WorkflowRuntimeException("Error stopping previous workflow Execution");
-                        }
-                    }
-                    
-                }
-                this.window = new DynamicWorkflowRunnerWindow(engine);
-                this.window.show();
-            }
-        };
-		menuItem.addActionListener(action);
-		menuItem.setEnabled(false);
-        return menuItem;
-    }
-    
     private boolean isRunShouldBeActive() {
 		return engine.getGUI().getGraphCanvas() !=null;
 	}
@@ -368,20 +325,11 @@ public class RunMenuItem  implements EventListener, XBayaExecutionModeListener{
 	}
 	
 	private void cleanup() {
-		try {
-            try {
-                Thread.sleep(1000);
-            } catch (InterruptedException e) {
-                e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
-            }
-            engine.getWorkflowInterpreter().cleanup();
-		} catch (MonitorException e) {
-			this.engine.getGUI().getErrorWindow().error(e);
-		}
+        //TODO
 	}
 
 	private boolean isWorkflowRunning() {
-		return engine.getWorkflowInterpreter()!=null;
+		return true;
 	}
 
 	@Override

http://git-wip-us.apache.org/repos/asf/airavata/blob/3e6c815a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/menues/ViewMenuItem.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/menues/ViewMenuItem.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/menues/ViewMenuItem.java
index ab12e13..69ef34a 100644
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/menues/ViewMenuItem.java
+++ b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/menues/ViewMenuItem.java
@@ -72,7 +72,7 @@ public class ViewMenuItem {
 	 * Creates workflow menu.
 	 */
 	private void createWorkflowMenu() {
-		this.jcrRegistryView = createShpwJCRRegistryView();
+//		this.jcrRegistryView = createShpwJCRRegistryView();
 		this.componentsView = createShowComponentsView();
 
 		monitoringView = createShowMonitoringView();
@@ -81,7 +81,7 @@ public class ViewMenuItem {
 		viewMenu = new JMenu("View");
 		viewMenu.setMnemonic(KeyEvent.VK_V);
 
-		viewMenu.add(this.jcrRegistryView);
+//		viewMenu.add(this.jcrRegistryView);
 
 		viewMenu.addSeparator();
 
@@ -93,15 +93,15 @@ public class ViewMenuItem {
 		viewMenu.add(parametersView);
 	}
 
-	private JMenuItem createShpwJCRRegistryView() {
-		JMenuItem menuItem = new JMenuItem("Airavata Registry");
-		menuItem.addActionListener(new AbstractAction() {
-			public void actionPerformed(ActionEvent e) {
-				engine.getGUI().viewJCRBrowserPanel();
-			}
-		});
-		return menuItem;
-	}
+//	private JMenuItem createShpwJCRRegistryView() {
+//		JMenuItem menuItem = new JMenuItem("Airavata Registry");
+//		menuItem.addActionListener(new AbstractAction() {
+//			public void actionPerformed(ActionEvent e) {
+//				engine.getGUI().viewJCRBrowserPanel();
+//			}
+//		});
+//		return menuItem;
+//	}
 
 	private JMenuItem createShowComponentsView() {
 		JMenuItem menuItem = new JMenuItem("Components");

http://git-wip-us.apache.org/repos/asf/airavata/blob/3e6c815a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/menues/XBayaMenuItem.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/menues/XBayaMenuItem.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/menues/XBayaMenuItem.java
index 98dad2b..e58f0da 100644
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/menues/XBayaMenuItem.java
+++ b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/menues/XBayaMenuItem.java
@@ -39,24 +39,16 @@ import javax.swing.event.MenuListener;
 import org.apache.airavata.xbaya.XBayaConfiguration;
 import org.apache.airavata.xbaya.XBayaConfiguration.XBayaExecutionMode;
 import org.apache.airavata.xbaya.XBayaEngine;
-import org.apache.airavata.xbaya.component.registry.ComponentRegistryLoader;
 import org.apache.airavata.xbaya.core.generators.BPELFiler;
 import org.apache.airavata.xbaya.core.generators.ImageFiler;
 import org.apache.airavata.xbaya.core.generators.JythonFiler;
 import org.apache.airavata.xbaya.core.generators.ODEScriptFiler;
 import org.apache.airavata.xbaya.core.generators.WorkflowFiler;
 import org.apache.airavata.xbaya.core.ide.XBayaExecutionModeListener;
-import org.apache.airavata.xbaya.registry.RegistryAccesser;
 import org.apache.airavata.xbaya.ui.dialogs.component.URLRegistryWindow;
-import org.apache.airavata.xbaya.ui.dialogs.descriptors.ApplicationDescriptionDialog;
-import org.apache.airavata.xbaya.ui.dialogs.descriptors.DeploymentDescriptionDialog;
-import org.apache.airavata.xbaya.ui.dialogs.descriptors.HostDescriptionDialog;
-import org.apache.airavata.xbaya.ui.experiment.RegistryLoaderWindow;
 import org.apache.airavata.xbaya.ui.graph.GraphCanvas;
 import org.apache.airavata.xbaya.ui.widgets.ToolbarButton;
 import org.apache.airavata.xbaya.ui.widgets.XBayaToolBar;
-import org.apache.airavata.xbaya.util.RegistryConstants;
-import org.apache.airavata.xbaya.util.XBayaUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -122,8 +114,6 @@ public class XBayaMenuItem implements XBayaExecutionModeListener {
 
 	private JMenuItem importWorkflowItemFromRegistry;
 
-	private RegistryAccesser registryAccesser;
-
 	private XBayaToolBar toolBar;
 
 	private ToolbarButton toolbarButtonSave;
@@ -143,7 +133,6 @@ public class XBayaMenuItem implements XBayaExecutionModeListener {
     public XBayaMenuItem(XBayaEngine engine, XBayaToolBar toolBar) {
         this.engine = engine;
         this.toolBar=toolBar;
-        this.registryAccesser = new RegistryAccesser(engine);
 
         this.graphFiler = new WorkflowFiler(engine);
         this.jythonFiler = new JythonFiler(engine);
@@ -181,9 +170,9 @@ public class XBayaMenuItem implements XBayaExecutionModeListener {
         nextWorkflowTabItem = createNextWorkflowTabItem();
         urlItem = createURLRegistryItem();
         
-        createRegisterHostDesc();
-        createRegisterServiceDesc();
-        createRegisterApplicationDesc();
+//        createRegisterHostDesc();
+//        createRegisterServiceDesc();
+//        createRegisterApplicationDesc();
         
         xbayaMenuItem = new JMenu("XBaya");
         xbayaMenuItem.setMnemonic(KeyEvent.VK_X);
@@ -200,8 +189,8 @@ public class XBayaMenuItem implements XBayaExecutionModeListener {
 //	        
 //        xbayaMenuItem.add(newMenu);
         xbayaMenuItem.add(newWorkflowTabItem);
-        xbayaMenuItem.add(registerHostDesc);
-        xbayaMenuItem.add(this.registerServiceDesc);
+//        xbayaMenuItem.add(registerHostDesc);
+//        xbayaMenuItem.add(this.registerServiceDesc);
 //        xbayaMenuItem.add(registerApplicationDesc);
         xbayaMenuItem.add(this.openWorkflowItem);
 
@@ -279,11 +268,12 @@ public class XBayaMenuItem implements XBayaExecutionModeListener {
         this.saveWorkflowtoRegistryItem.addActionListener(new AbstractAction() {
 			private static final long serialVersionUID = 1L;
             public void actionPerformed(ActionEvent e) {
-                if (registryAccesser.saveWorkflow()){
-                	if (engine.getGUI().getGraphCanvas().getWorkflowFile()==null){
-                		engine.getGUI().getGraphCanvas().workflowSaved();
-                	}
-                }
+            	//FIXME
+//                if (registryAccesser.saveWorkflow()){
+//                	if (engine.getGUI().getGraphCanvas().getWorkflowFile()==null){
+//                		engine.getGUI().getGraphCanvas().workflowSaved();
+//                	}
+//                }
             }
         });
     }
@@ -304,78 +294,78 @@ public class XBayaMenuItem implements XBayaExecutionModeListener {
         return item;
     }
     
-    private void createRegisterServiceDesc() {
-        this.registerServiceDesc = new JMenuItem("Register Application...");
-
-        this.registerServiceDesc.addActionListener(new AbstractAction() {
-			private static final long serialVersionUID = 1L;
-            @Override
-            public void actionPerformed(ActionEvent e) {
-                if (XBayaUtil.acquireJCRRegistry(engine)) {
-                    try {
-                        DeploymentDescriptionDialog serviceDescriptionDialog = new DeploymentDescriptionDialog(XBayaMenuItem.this.engine.getGUI().getFrame(), engine.getConfiguration()
-                                        .getAiravataAPI());
-                    	serviceDescriptionDialog.open();
-//                        ServiceDescriptionDialog serviceDescriptionDialog = new ServiceDescriptionDialog(
-//                                engine.getConfiguration().getJcrComponentRegistry()
-//                                        .getRegistry());
-//                        serviceDescriptionDialog.open();
-                    	if (serviceDescriptionDialog.isServiceCreated()){
-//                    		engine.reloadRegistry();
-                    		ComponentRegistryLoader loader = ComponentRegistryLoader.getLoader(engine, RegistryConstants.REGISTRY_TYPE_JCR);
-                    		loader.load(engine.getConfiguration().getJcrComponentRegistry());
-                    	}
-                    } catch (Exception e1) {
-                        engine.getGUI().getErrorWindow().error(e1);
-                    }
-                }
-            }
-        });
-
-    }
-
-    private void createRegisterApplicationDesc() {
-        this.registerApplicationDesc = new JMenuItem("Register Application...");
-
-        this.registerApplicationDesc.addActionListener(new AbstractAction() {
-			private static final long serialVersionUID = 1L;
-            @Override
-            public void actionPerformed(ActionEvent e) {
-                if (XBayaUtil.acquireJCRRegistry(engine)) {
-                    try {
-                        ApplicationDescriptionDialog applicationDescriptionDialog = new ApplicationDescriptionDialog(
-                                engine);
-        	    		applicationDescriptionDialog.setLocationRelativeTo(engine.getGUI().getFrame());
-                        applicationDescriptionDialog.open();
-                    } catch (Exception e1) {
-                        engine.getGUI().getErrorWindow().error(e1);
-                    }
-                }
-            }
-        });
-
-    }
-
-    private void createRegisterHostDesc() {
-        this.registerHostDesc = new JMenuItem("Add Host...");
-
-        this.registerHostDesc.addActionListener(new AbstractAction() {
-			private static final long serialVersionUID = 1L;
-            @Override
-            public void actionPerformed(ActionEvent e) {
-                if (XBayaUtil.acquireJCRRegistry(engine)) {
-                    try {
-                        HostDescriptionDialog hostDescriptionDialog = new HostDescriptionDialog(
-                        		engine.getConfiguration().getAiravataAPI(),XBayaMenuItem.this.engine.getGUI().getFrame() );
-                        hostDescriptionDialog.open();
-                    } catch (Exception e1) {
-                        engine.getGUI().getErrorWindow().error(e1);
-                    }
-                }
-            }
-        });
-
-    }
+//    private void createRegisterServiceDesc() {
+//        this.registerServiceDesc = new JMenuItem("Register Application...");
+//
+//        this.registerServiceDesc.addActionListener(new AbstractAction() {
+//			private static final long serialVersionUID = 1L;
+//            @Override
+//            public void actionPerformed(ActionEvent e) {
+//                if (XBayaUtil.acquireJCRRegistry(engine)) {
+//                    try {
+//                        DeploymentDescriptionDialog serviceDescriptionDialog = new DeploymentDescriptionDialog(XBayaMenuItem.this.engine.getGUI().getFrame(), engine.getConfiguration()
+//                                        .getAiravataAPI());
+//                    	serviceDescriptionDialog.open();
+////                        ServiceDescriptionDialog serviceDescriptionDialog = new ServiceDescriptionDialog(
+////                                engine.getConfiguration().getJcrComponentRegistry()
+////                                        .getRegistry());
+////                        serviceDescriptionDialog.open();
+//                    	if (serviceDescriptionDialog.isServiceCreated()){
+////                    		engine.reloadRegistry();
+//                    		ComponentRegistryLoader loader = ComponentRegistryLoader.getLoader(engine, RegistryConstants.REGISTRY_TYPE_JCR);
+//                    		loader.load(engine.getConfiguration().getJcrComponentRegistry());
+//                    	}
+//                    } catch (Exception e1) {
+//                        engine.getGUI().getErrorWindow().error(e1);
+//                    }
+//                }
+//            }
+//        });
+//
+//    }
+
+//    private void createRegisterApplicationDesc() {
+//        this.registerApplicationDesc = new JMenuItem("Register Application...");
+//
+//        this.registerApplicationDesc.addActionListener(new AbstractAction() {
+//			private static final long serialVersionUID = 1L;
+//            @Override
+//            public void actionPerformed(ActionEvent e) {
+//                if (XBayaUtil.acquireJCRRegistry(engine)) {
+//                    try {
+//                        ApplicationDescriptionDialog applicationDescriptionDialog = new ApplicationDescriptionDialog(
+//                                engine);
+//        	    		applicationDescriptionDialog.setLocationRelativeTo(engine.getGUI().getFrame());
+//                        applicationDescriptionDialog.open();
+//                    } catch (Exception e1) {
+//                        engine.getGUI().getErrorWindow().error(e1);
+//                    }
+//                }
+//            }
+//        });
+//
+//    }
+
+//    private void createRegisterHostDesc() {
+//        this.registerHostDesc = new JMenuItem("Add Host...");
+//
+//        this.registerHostDesc.addActionListener(new AbstractAction() {
+//			private static final long serialVersionUID = 1L;
+//            @Override
+//            public void actionPerformed(ActionEvent e) {
+//                if (XBayaUtil.acquireJCRRegistry(engine)) {
+//                    try {
+//                        HostDescriptionDialog hostDescriptionDialog = new HostDescriptionDialog(
+//                        		engine.getConfiguration().getAiravataAPI(),XBayaMenuItem.this.engine.getGUI().getFrame() );
+//                        hostDescriptionDialog.open();
+//                    } catch (Exception e1) {
+//                        engine.getGUI().getErrorWindow().error(e1);
+//                    }
+//                }
+//            }
+//        });
+//
+//    }
     private JMenuItem createClearWorkflowItem() {
         JMenuItem menuItem = new JMenuItem("Clear Workflow");
         menuItem.addActionListener(new AbstractAction() {
@@ -521,7 +511,6 @@ public class XBayaMenuItem implements XBayaExecutionModeListener {
         importWorkflowItemFromRegistry.addActionListener(new AbstractAction() {
 			private static final long serialVersionUID = 1L;
             public void actionPerformed(ActionEvent e) {
-                new RegistryLoaderWindow(engine).show();
             }
         });
     }

http://git-wip-us.apache.org/repos/asf/airavata/blob/3e6c815a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/views/JCRBrowserPanel.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/views/JCRBrowserPanel.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/views/JCRBrowserPanel.java
index 33338f0..1157056 100644
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/views/JCRBrowserPanel.java
+++ b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/views/JCRBrowserPanel.java
@@ -1,287 +1,287 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-package org.apache.airavata.xbaya.ui.views;
-
-import java.awt.BorderLayout;
-import java.awt.Component;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.awt.event.KeyAdapter;
-import java.awt.event.KeyEvent;
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Observable;
-import java.util.Observer;
-
-import javax.swing.JPanel;
-import javax.swing.JPopupMenu;
-import javax.swing.JScrollPane;
-import javax.swing.JTree;
-import javax.swing.KeyStroke;
-import javax.swing.border.EmptyBorder;
-import javax.swing.tree.DefaultTreeModel;
-
-import org.apache.airavata.client.api.AiravataAPI;
-import org.apache.airavata.workflow.model.component.registry.JCRComponentRegistry;
-import org.apache.airavata.xbaya.XBayaEngine;
-import org.apache.airavata.xbaya.registrybrowser.nodes.AbstractAiravataTreeNode;
-import org.apache.airavata.xbaya.registrybrowser.nodes.AiravataTreeNodeFactory;
-import org.apache.airavata.xbaya.registrybrowser.nodes.RegistryTreeCellRenderer;
-import org.apache.airavata.xbaya.ui.actions.AbstractBrowserActionItem;
-import org.apache.airavata.xbaya.ui.actions.registry.browser.AddAction;
-import org.apache.airavata.xbaya.ui.actions.registry.browser.BrowserAction;
-import org.apache.airavata.xbaya.ui.actions.registry.browser.CopyAction;
-import org.apache.airavata.xbaya.ui.actions.registry.browser.DeleteAction;
-import org.apache.airavata.xbaya.ui.actions.registry.browser.EditAction;
-import org.apache.airavata.xbaya.ui.actions.registry.browser.ImportAction;
-import org.apache.airavata.xbaya.ui.actions.registry.browser.RefreshAction;
-import org.apache.airavata.xbaya.ui.actions.registry.browser.ViewAction;
-//import org.apache.airavata.registry.api.AiravataRegistry2;
-
-public class JCRBrowserPanel extends JPanel implements Observer {
-    private List<AbstractBrowserActionItem> browserActions = new ArrayList<AbstractBrowserActionItem>();
-    /**
-	 * 
-	 */
-    private static final long serialVersionUID = -4490110894914580271L;
-    private XBayaEngine engine;
-    private JTree tree;
-    private JPopupMenu popupMenu;
-    private AbstractBrowserActionItem actionDelete;
-
-    /**
-     * Create the dialog.
-     */
-    public JCRBrowserPanel(XBayaEngine engine) {
-        setEngine(engine);
-        initGUI();
-    }
-
-    private void initGUI() {
-        setBounds(100, 100, 450, 300);
-        this.setBorder(new EmptyBorder(5, 5, 5, 5));
-        this.setLayout(new BorderLayout(0, 0));
-        {
-            JScrollPane scrollPane = new JScrollPane();
-            this.add(scrollPane, BorderLayout.CENTER);
-            {
-                tree = new JTree(AiravataTreeNodeFactory.getTreeNode(getJCRRegistry() == null ? "No registry specified"
-                         : getEngine(), null));
-                tree.addKeyListener(new KeyAdapter() {
-                    @Override
-                    public void keyPressed(KeyEvent e) {
-                        if (e.getKeyCode() == KeyEvent.VK_F5) {
-                            triggerNodeAction(RefreshAction.ID);
-                        }
-                    }
-                });
-                tree.setCellRenderer(new RegistryTreeCellRenderer());
-                scrollPane.setViewportView(tree);
-
-                popupMenu = new JPopupMenu();
-                popupMenu.setLabel("");
-                addPopup(tree, popupMenu);
-
-                AbstractBrowserActionItem actionRefresh = new RefreshAction();
-                actionRefresh.getMenuItem().setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F5, 0));
-                actionRefresh.addActionListener(new ActionListener() {
-                    public void actionPerformed(ActionEvent e) {
-                        triggerNodeAction(RefreshAction.ID);
-                    }
-                });
-
-                actionDelete = new DeleteAction();
-                actionDelete.addActionListener(new ActionListener() {
-                    public void actionPerformed(ActionEvent arg0) {
-                        triggerNodeAction(DeleteAction.ID);
-                    }
-                });
-                AddAction actionAdd = new AddAction();
-                actionAdd.addActionListener(new ActionListener() {
-                    public void actionPerformed(ActionEvent arg0) {
-                        triggerNodeAction(AddAction.ID);
-                    }
-                });
-
-                EditAction actionEdit = new EditAction();
-                actionEdit.addActionListener(new ActionListener() {
-                    public void actionPerformed(ActionEvent arg0) {
-                        triggerNodeAction(EditAction.ID);
-                    }
-                });
-                ImportAction actionImport = new ImportAction();
-                actionImport.addActionListener(new ActionListener() {
-                    public void actionPerformed(ActionEvent arg0) {
-                        triggerNodeAction(ImportAction.ID);
-                    }
-                });
-                CopyAction actionCopy = new CopyAction();
-                actionCopy.addActionListener(new ActionListener() {
-                    public void actionPerformed(ActionEvent arg0) {
-                        triggerNodeAction(CopyAction.ID);
-                    }
-                });
-                ViewAction actionView = new ViewAction();
-                actionView.addActionListener(new ActionListener() {
-                    public void actionPerformed(ActionEvent arg0) {
-                        triggerNodeAction(ViewAction.ID);
-                    }
-                });
-                BrowserAction actionBrowser = new BrowserAction();
-                actionBrowser.addActionListener(new ActionListener() {
-                    public void actionPerformed(ActionEvent arg0) {
-                        triggerNodeAction(BrowserAction.ID);
-                    }
-                });
-                
-                tree.addMouseListener(new MouseAdapter(){
-					@Override
-					public void mouseClicked(MouseEvent e) {
-						if (e.getClickCount() == 2){
-							triggerNodeAction(null);
-						}
-					}
-                });
-                browserActions.add(actionAdd);
-                browserActions.add(actionView);
-                browserActions.add(actionImport);
-                browserActions.add(actionEdit);
-                browserActions.add(actionRefresh);
-                browserActions.add(actionDelete);
-                browserActions.add(actionCopy);
-                browserActions.add(actionBrowser);
-
-//                popupMenu.add(actionAdd.getMenuItem());
-//                popupMenu.add(actionDelete.getMenuItem());
-//                popupMenu.add(actionRefresh.getMenuItem());
-            }
-        }
-    }
-
-    public void close() {
-        setVisible(false);
-    }
-
-    public void open() {
-        setVisible(true);
-    }
-
-    public XBayaEngine getEngine() {
-        return engine;
-    }
-
-    public void setEngine(XBayaEngine engine) {
-        if (this.engine != null) {
-            this.engine.getConfiguration().deleteObserver(this);
-        }
-        this.engine = engine;
-        if (this.engine != null) {
-            this.engine.getConfiguration().addObserver(this);
-        }
-    }
-
-    private AiravataAPI getJCRRegistry() {
-        try {
-            return getEngine().getConfiguration().getAiravataAPI();
-        } catch (Exception e) {
-            // JCR registry not specified yet
-            return null;
-        }
-    }
-
-    public void update(Observable observable, Object o) {
-        if (getEngine().getConfiguration() == observable) {
-            if (o instanceof JCRComponentRegistry) {
-                resetModel();
-            } else if (o instanceof AiravataAPI) {
-                resetModel();
-            }
-        }
-    }
-
-    private void resetModel() {
-        tree.setModel(new DefaultTreeModel(AiravataTreeNodeFactory.getTreeNode(
-                getJCRRegistry() == null ? "No registry specified" : getEngine(), null)));
-    }
-
-    private void addPopup(Component component, final JPopupMenu popup) {
-        component.addMouseListener(new MouseAdapter() {
-            public void mousePressed(MouseEvent e) {
-                if (e.isPopupTrigger()) {
-                    showMenu(e);
-                }
-            }
-
-            public void mouseReleased(MouseEvent e) {
-                if (e.isPopupTrigger()) {
-                    showMenu(e);
-                }
-            }
-
-            private void showMenu(MouseEvent e) {
-                int selRow = tree.getRowForLocation(e.getX(), e.getY());
-                if (selRow != -1 && e.isPopupTrigger()) {
-                    tree.setSelectionRow(selRow);
-                    Object o = tree.getLastSelectedPathComponent();
-                    popup.removeAll();
-                    if (o instanceof AbstractAiravataTreeNode) {
-                        AbstractAiravataTreeNode node = ((AbstractAiravataTreeNode) o);
-                        for (AbstractBrowserActionItem action : browserActions) {
-                            boolean actionSupported = node.isActionSupported(action);
-                            action.setVisible(actionSupported);
-                            if (actionSupported) {
-                                action.setCaption(node.getActionCaption(action));
-                                action.setIcon(node.getActionIcon(action));
-                                action.setDescription(node.getActionDescription(action));
-                                popup.add(action.getMenuItem());
-                            }
-                        }
-                    }
-                    
-                    if (popup.getSubElements().length>0) {
-						popup.show(e.getComponent(), e.getX(), e.getY());
-					}
-                }
-            }
-        });
-    }
-
-    private void triggerNodeAction(String action) {
-        Object o = tree.getLastSelectedPathComponent();
-        if (o instanceof AbstractAiravataTreeNode) {
-            AbstractAiravataTreeNode node = ((AbstractAiravataTreeNode) o);
-            try {
-            	if (action==null){
-            		action=node.getDefaultAction();
-            	}
-                if (action!=null) {
-					node.triggerAction(tree, action);
-				}
-            } catch (Exception e) {
-                e.printStackTrace();
-                getEngine().getGUI().getErrorWindow().error(e);
-            }
-        }
-    }
-}
+///*
+// *
+// * Licensed to the Apache Software Foundation (ASF) under one
+// * or more contributor license agreements.  See the NOTICE file
+// * distributed with this work for additional information
+// * regarding copyright ownership.  The ASF licenses this file
+// * to you under the Apache License, Version 2.0 (the
+// * "License"); you may not use this file except in compliance
+// * with the License.  You may obtain a copy of the License at
+// *
+// *   http://www.apache.org/licenses/LICENSE-2.0
+// *
+// * Unless required by applicable law or agreed to in writing,
+// * software distributed under the License is distributed on an
+// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// * KIND, either express or implied.  See the License for the
+// * specific language governing permissions and limitations
+// * under the License.
+// *
+// */
+//
+//package org.apache.airavata.xbaya.ui.views;
+//
+//import java.awt.BorderLayout;
+//import java.awt.Component;
+//import java.awt.event.ActionEvent;
+//import java.awt.event.ActionListener;
+//import java.awt.event.KeyAdapter;
+//import java.awt.event.KeyEvent;
+//import java.awt.event.MouseAdapter;
+//import java.awt.event.MouseEvent;
+//import java.util.ArrayList;
+//import java.util.List;
+//import java.util.Observable;
+//import java.util.Observer;
+//
+//import javax.swing.JPanel;
+//import javax.swing.JPopupMenu;
+//import javax.swing.JScrollPane;
+//import javax.swing.JTree;
+//import javax.swing.KeyStroke;
+//import javax.swing.border.EmptyBorder;
+//import javax.swing.tree.DefaultTreeModel;
+//
+//import org.apache.airavata.client.api.AiravataAPI;
+//import org.apache.airavata.workflow.model.component.registry.JCRComponentRegistry;
+//import org.apache.airavata.xbaya.XBayaEngine;
+//import org.apache.airavata.xbaya.registrybrowser.nodes.AbstractAiravataTreeNode;
+//import org.apache.airavata.xbaya.registrybrowser.nodes.AiravataTreeNodeFactory;
+//import org.apache.airavata.xbaya.registrybrowser.nodes.RegistryTreeCellRenderer;
+//import org.apache.airavata.xbaya.ui.actions.AbstractBrowserActionItem;
+//import org.apache.airavata.xbaya.ui.actions.registry.browser.AddAction;
+//import org.apache.airavata.xbaya.ui.actions.registry.browser.BrowserAction;
+//import org.apache.airavata.xbaya.ui.actions.registry.browser.CopyAction;
+//import org.apache.airavata.xbaya.ui.actions.registry.browser.DeleteAction;
+//import org.apache.airavata.xbaya.ui.actions.registry.browser.EditAction;
+//import org.apache.airavata.xbaya.ui.actions.registry.browser.ImportAction;
+//import org.apache.airavata.xbaya.ui.actions.registry.browser.RefreshAction;
+//import org.apache.airavata.xbaya.ui.actions.registry.browser.ViewAction;
+////import org.apache.airavata.registry.api.AiravataRegistry2;
+//
+//public class JCRBrowserPanel extends JPanel implements Observer {
+//    private List<AbstractBrowserActionItem> browserActions = new ArrayList<AbstractBrowserActionItem>();
+//    /**
+//	 * 
+//	 */
+//    private static final long serialVersionUID = -4490110894914580271L;
+//    private XBayaEngine engine;
+//    private JTree tree;
+//    private JPopupMenu popupMenu;
+//    private AbstractBrowserActionItem actionDelete;
+//
+//    /**
+//     * Create the dialog.
+//     */
+//    public JCRBrowserPanel(XBayaEngine engine) {
+//        setEngine(engine);
+//        initGUI();
+//    }
+//
+//    private void initGUI() {
+//        setBounds(100, 100, 450, 300);
+//        this.setBorder(new EmptyBorder(5, 5, 5, 5));
+//        this.setLayout(new BorderLayout(0, 0));
+//        {
+//            JScrollPane scrollPane = new JScrollPane();
+//            this.add(scrollPane, BorderLayout.CENTER);
+//            {
+//                tree = new JTree(AiravataTreeNodeFactory.getTreeNode(getJCRRegistry() == null ? "No registry specified"
+//                         : getEngine(), null));
+//                tree.addKeyListener(new KeyAdapter() {
+//                    @Override
+//                    public void keyPressed(KeyEvent e) {
+//                        if (e.getKeyCode() == KeyEvent.VK_F5) {
+//                            triggerNodeAction(RefreshAction.ID);
+//                        }
+//                    }
+//                });
+//                tree.setCellRenderer(new RegistryTreeCellRenderer());
+//                scrollPane.setViewportView(tree);
+//
+//                popupMenu = new JPopupMenu();
+//                popupMenu.setLabel("");
+//                addPopup(tree, popupMenu);
+//
+//                AbstractBrowserActionItem actionRefresh = new RefreshAction();
+//                actionRefresh.getMenuItem().setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F5, 0));
+//                actionRefresh.addActionListener(new ActionListener() {
+//                    public void actionPerformed(ActionEvent e) {
+//                        triggerNodeAction(RefreshAction.ID);
+//                    }
+//                });
+//
+//                actionDelete = new DeleteAction();
+//                actionDelete.addActionListener(new ActionListener() {
+//                    public void actionPerformed(ActionEvent arg0) {
+//                        triggerNodeAction(DeleteAction.ID);
+//                    }
+//                });
+//                AddAction actionAdd = new AddAction();
+//                actionAdd.addActionListener(new ActionListener() {
+//                    public void actionPerformed(ActionEvent arg0) {
+//                        triggerNodeAction(AddAction.ID);
+//                    }
+//                });
+//
+//                EditAction actionEdit = new EditAction();
+//                actionEdit.addActionListener(new ActionListener() {
+//                    public void actionPerformed(ActionEvent arg0) {
+//                        triggerNodeAction(EditAction.ID);
+//                    }
+//                });
+//                ImportAction actionImport = new ImportAction();
+//                actionImport.addActionListener(new ActionListener() {
+//                    public void actionPerformed(ActionEvent arg0) {
+//                        triggerNodeAction(ImportAction.ID);
+//                    }
+//                });
+//                CopyAction actionCopy = new CopyAction();
+//                actionCopy.addActionListener(new ActionListener() {
+//                    public void actionPerformed(ActionEvent arg0) {
+//                        triggerNodeAction(CopyAction.ID);
+//                    }
+//                });
+//                ViewAction actionView = new ViewAction();
+//                actionView.addActionListener(new ActionListener() {
+//                    public void actionPerformed(ActionEvent arg0) {
+//                        triggerNodeAction(ViewAction.ID);
+//                    }
+//                });
+//                BrowserAction actionBrowser = new BrowserAction();
+//                actionBrowser.addActionListener(new ActionListener() {
+//                    public void actionPerformed(ActionEvent arg0) {
+//                        triggerNodeAction(BrowserAction.ID);
+//                    }
+//                });
+//                
+//                tree.addMouseListener(new MouseAdapter(){
+//					@Override
+//					public void mouseClicked(MouseEvent e) {
+//						if (e.getClickCount() == 2){
+//							triggerNodeAction(null);
+//						}
+//					}
+//                });
+//                browserActions.add(actionAdd);
+//                browserActions.add(actionView);
+//                browserActions.add(actionImport);
+//                browserActions.add(actionEdit);
+//                browserActions.add(actionRefresh);
+//                browserActions.add(actionDelete);
+//                browserActions.add(actionCopy);
+//                browserActions.add(actionBrowser);
+//
+////                popupMenu.add(actionAdd.getMenuItem());
+////                popupMenu.add(actionDelete.getMenuItem());
+////                popupMenu.add(actionRefresh.getMenuItem());
+//            }
+//        }
+//    }
+//
+//    public void close() {
+//        setVisible(false);
+//    }
+//
+//    public void open() {
+//        setVisible(true);
+//    }
+//
+//    public XBayaEngine getEngine() {
+//        return engine;
+//    }
+//
+//    public void setEngine(XBayaEngine engine) {
+//        if (this.engine != null) {
+//            this.engine.getConfiguration().deleteObserver(this);
+//        }
+//        this.engine = engine;
+//        if (this.engine != null) {
+//            this.engine.getConfiguration().addObserver(this);
+//        }
+//    }
+//
+//    private AiravataAPI getJCRRegistry() {
+//        try {
+//            return getEngine().getConfiguration().getAiravataAPI();
+//        } catch (Exception e) {
+//            // JCR registry not specified yet
+//            return null;
+//        }
+//    }
+//
+//    public void update(Observable observable, Object o) {
+//        if (getEngine().getConfiguration() == observable) {
+//            if (o instanceof JCRComponentRegistry) {
+//                resetModel();
+//            } else if (o instanceof AiravataAPI) {
+//                resetModel();
+//            }
+//        }
+//    }
+//
+//    private void resetModel() {
+//        tree.setModel(new DefaultTreeModel(AiravataTreeNodeFactory.getTreeNode(
+//                getJCRRegistry() == null ? "No registry specified" : getEngine(), null)));
+//    }
+//
+//    private void addPopup(Component component, final JPopupMenu popup) {
+//        component.addMouseListener(new MouseAdapter() {
+//            public void mousePressed(MouseEvent e) {
+//                if (e.isPopupTrigger()) {
+//                    showMenu(e);
+//                }
+//            }
+//
+//            public void mouseReleased(MouseEvent e) {
+//                if (e.isPopupTrigger()) {
+//                    showMenu(e);
+//                }
+//            }
+//
+//            private void showMenu(MouseEvent e) {
+//                int selRow = tree.getRowForLocation(e.getX(), e.getY());
+//                if (selRow != -1 && e.isPopupTrigger()) {
+//                    tree.setSelectionRow(selRow);
+//                    Object o = tree.getLastSelectedPathComponent();
+//                    popup.removeAll();
+//                    if (o instanceof AbstractAiravataTreeNode) {
+//                        AbstractAiravataTreeNode node = ((AbstractAiravataTreeNode) o);
+//                        for (AbstractBrowserActionItem action : browserActions) {
+//                            boolean actionSupported = node.isActionSupported(action);
+//                            action.setVisible(actionSupported);
+//                            if (actionSupported) {
+//                                action.setCaption(node.getActionCaption(action));
+//                                action.setIcon(node.getActionIcon(action));
+//                                action.setDescription(node.getActionDescription(action));
+//                                popup.add(action.getMenuItem());
+//                            }
+//                        }
+//                    }
+//                    
+//                    if (popup.getSubElements().length>0) {
+//						popup.show(e.getComponent(), e.getX(), e.getY());
+//					}
+//                }
+//            }
+//        });
+//    }
+//
+//    private void triggerNodeAction(String action) {
+//        Object o = tree.getLastSelectedPathComponent();
+//        if (o instanceof AbstractAiravataTreeNode) {
+//            AbstractAiravataTreeNode node = ((AbstractAiravataTreeNode) o);
+//            try {
+//            	if (action==null){
+//            		action=node.getDefaultAction();
+//            	}
+//                if (action!=null) {
+//					node.triggerAction(tree, action);
+//				}
+//            } catch (Exception e) {
+//                e.printStackTrace();
+//                getEngine().getGUI().getErrorWindow().error(e);
+//            }
+//        }
+//    }
+//}

http://git-wip-us.apache.org/repos/asf/airavata/blob/3e6c815a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/util/InterpreterUtil.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/util/InterpreterUtil.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/util/InterpreterUtil.java
index 8f1a01d..725a20f 100644
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/util/InterpreterUtil.java
+++ b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/util/InterpreterUtil.java
@@ -366,26 +366,26 @@ public class InterpreterUtil {
         return sum;
     }
 
-    public static String getEPR(WSNode wsNode) {
-        Iterable<WsdlService> services = wsNode.getComponent().getWSDL().services();
-        Iterator<WsdlService> iterator = services.iterator();
-        if (iterator.hasNext()) {
-            Iterable<WsdlPort> ports = iterator.next().ports();
-            Iterator<WsdlPort> portIterator = ports.iterator();
-            if (portIterator.hasNext()) {
-                WsdlPort port = portIterator.next();
-                Iterable children = port.xml().children();
-                Iterator childIterator = children.iterator();
-                while (childIterator.hasNext()) {
-                    Object next = childIterator.next();
-                    if (next instanceof XmlElementWithViewsImpl) {
-                        org.xmlpull.infoset.XmlAttribute epr = ((XmlElementWithViewsImpl) next).attribute("location");
-                        return epr.getValue();
-                    }
-                }
-            }
-        }
-        return null;
-    }
+//    public static String getEPR(WSNode wsNode) {
+//        Iterable<WsdlService> services = wsNode.getComponent().getWSDL().services();
+//        Iterator<WsdlService> iterator = services.iterator();
+//        if (iterator.hasNext()) {
+//            Iterable<WsdlPort> ports = iterator.next().ports();
+//            Iterator<WsdlPort> portIterator = ports.iterator();
+//            if (portIterator.hasNext()) {
+//                WsdlPort port = portIterator.next();
+//                Iterable children = port.xml().children();
+//                Iterator childIterator = children.iterator();
+//                while (childIterator.hasNext()) {
+//                    Object next = childIterator.next();
+//                    if (next instanceof XmlElementWithViewsImpl) {
+//                        org.xmlpull.infoset.XmlAttribute epr = ((XmlElementWithViewsImpl) next).attribute("location");
+//                        return epr.getValue();
+//                    }
+//                }
+//            }
+//        }
+//        return null;
+//    }
 
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/3e6c815a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/util/XBayaUtil.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/util/XBayaUtil.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/util/XBayaUtil.java
index 326cb02..0be61b0 100644
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/util/XBayaUtil.java
+++ b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/util/XBayaUtil.java
@@ -21,24 +21,20 @@
 
 package org.apache.airavata.xbaya.util;
 
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
 import java.net.HttpURLConnection;
 import java.net.SocketTimeoutException;
 import java.net.URISyntaxException;
 import java.net.URL;
-import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collection;
 import java.util.Iterator;
-import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
 
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.apache.airavata.client.stub.interpretor.NameValue;
+import org.apache.airavata.api.Airavata;
+import org.apache.airavata.api.client.AiravataClientFactory;
+import org.apache.airavata.api.workflow.Workflow.Client;
 import org.apache.airavata.common.utils.StringUtil;
+import org.apache.airavata.model.error.AiravataClientConnectException;
 import org.apache.airavata.workflow.model.exceptions.WorkflowException;
 import org.apache.airavata.workflow.model.exceptions.WorkflowRuntimeException;
 import org.apache.airavata.workflow.model.graph.DataPort;
@@ -51,20 +47,14 @@ import org.apache.airavata.workflow.model.graph.system.ForEachNode;
 import org.apache.airavata.workflow.model.graph.system.InputNode;
 import org.apache.airavata.workflow.model.wf.Workflow;
 import org.apache.airavata.ws.monitor.MonitorConfiguration;
+import org.apache.airavata.xbaya.ThriftClientData;
 import org.apache.airavata.xbaya.XBayaConfiguration;
 import org.apache.airavata.xbaya.XBayaEngine;
-import org.apache.airavata.xbaya.interpretor.SystemComponentInvoker;
-import org.apache.airavata.xbaya.interpretor.WorkFlowInterpreterException;
-import org.apache.airavata.xbaya.invoker.GenericInvoker;
 import org.apache.airavata.xbaya.invoker.Invoker;
-import org.apache.airavata.xbaya.invoker.WorkflowInvokerWrapperForGFacInvoker;
 import org.apache.airavata.xbaya.lead.LeadContextHeaderHelper;
 import org.apache.airavata.xbaya.ui.dialogs.registry.RegistryWindow;
-import org.apache.axis2.util.XMLUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.w3c.dom.Document;
-import org.xml.sax.SAXException;
 import org.xmlpull.infoset.XmlElement;
 
 import xsul.lead.LeadContextHeader;
@@ -148,103 +138,19 @@ public class XBayaUtil {
         }
     }
 
-    public static boolean acquireJCRRegistry(XBayaEngine engine) {
-        XBayaConfiguration configuration = engine.getConfiguration();
-        if (configuration.getAiravataAPI() == null) {
-        	updateJCRRegistryInfo(engine);
-        }
-        return engine.getConfiguration().getAiravataAPI() != null;
-    }
+//    public static boolean acquireJCRRegistry(XBayaEngine engine) {
+//        XBayaConfiguration configuration = engine.getConfiguration();
+//        if (configuration.getAiravataAPI() == null) {
+//        	updateJCRRegistryInfo(engine);
+//        }
+//        return engine.getConfiguration().getAiravataAPI() != null;
+//    }
     
     public static void updateJCRRegistryInfo(XBayaEngine xbayaEngine) {
     	RegistryWindow window = new RegistryWindow(xbayaEngine);
         window.show();
 	}
-    
-    public static Object getInputsForForEachNode(final ForEachNode forEachNode,
-			final LinkedList<String> listOfValues, Map<Node, Invoker> invokerMap) throws WorkflowException {
-		Node forEachInputNode = forEachNode.getInputPort(0).getFromNode();
-		// if input node for for-each is WSNode
-		Object returnValForProvenance = null;
-		if (forEachInputNode instanceof InputNode) {
-			for (DataPort dataPort : forEachNode.getInputPorts()) {
-				returnValForProvenance = XBayaUtil
-						.findInputFromPort(dataPort, invokerMap);
-				if (null == returnValForProvenance) {
-					throw new WorkFlowInterpreterException(
-							"Unable to find input for the node:"
-									+ forEachNode.getID());
-				}
-				String[] vals = StringUtil.getElementsFromString(returnValForProvenance.toString());
-				listOfValues.addAll(Arrays.asList(vals));
-			}
-		} else {
-			Invoker workflowInvoker = invokerMap
-					.get(forEachInputNode);
-			if (workflowInvoker != null) {
-				if (workflowInvoker instanceof GenericInvoker) {
-
-					returnValForProvenance = ((GenericInvoker) workflowInvoker)
-							.getOutputs();
-					String message = returnValForProvenance.toString();
-
-					XmlElement msgElmt = XmlConstants.BUILDER
-							.parseFragmentFromString(message);
-					Iterator children = msgElmt.children().iterator();
-					while (children.hasNext()) {
-						Object object = children.next();
-						// foreachWSNode.getInputPort(0).getType()
-						if (object instanceof XmlElement) {
-							listOfValues.add(XmlConstants.BUILDER
-									.serializeToString(object));
-							// TODO fix for simple type - Done
-						}
-					}
-				} else if (workflowInvoker instanceof WorkflowInvokerWrapperForGFacInvoker) {
-					String outputName = forEachInputNode.getOutputPort(0)
-							.getName();
-					returnValForProvenance = workflowInvoker
-							.getOutput(outputName);
-					org.xmlpull.v1.builder.XmlElement msgElmt = (org.xmlpull.v1.builder.XmlElement) returnValForProvenance;
-					Iterator children = msgElmt.children();
-					while (children.hasNext()) {
-						Object object = children.next();
-						if (object instanceof org.xmlpull.v1.builder.XmlElement) {
-							org.xmlpull.v1.builder.XmlElement child = (org.xmlpull.v1.builder.XmlElement) object;
-							Iterator valItr = child.children();
-							if (valItr.hasNext()) {
-								Object object2 = valItr.next();
-								if (object2 instanceof String) {
-									listOfValues.add(object2.toString());
-								}
-							}
-						}
-					}
-				} else if (workflowInvoker instanceof SystemComponentInvoker) {
-					String outputName = forEachInputNode.getOutputPort(0)
-							.getName();
-					returnValForProvenance = workflowInvoker
-							.getOutput(outputName);
-					XmlElement msgElmt = XmlConstants.BUILDER
-							.parseFragmentFromString("<temp>"
-									+ returnValForProvenance + "</temp>");
-					Iterator valItr = msgElmt.children().iterator();
-					while (valItr.hasNext()) {
-						Object object2 = valItr.next();
-						if (object2 instanceof XmlElement) {
-							listOfValues.add(((XmlElement) object2).children()
-									.iterator().next().toString());
-						}
-					}
-				}
-			} else {
-				throw new WorkFlowInterpreterException(
-						"Did not find inputs from WS to foreach");
-			}
-		}
-		return returnValForProvenance;
-	}
-
+   
     /**
      *
      * @param inputPort
@@ -328,20 +234,30 @@ public class XBayaUtil {
 	}
 	
 	
-	public static List<NameValue> getIOParameterData(String xml) throws ParserConfigurationException, SAXException, IOException{
-		List<NameValue> parameters=new ArrayList<NameValue>();
-		Document parameterDocument = XMLUtils.newDocument(new ByteArrayInputStream(xml.getBytes()));
-		org.w3c.dom.NodeList childNodes = parameterDocument.getDocumentElement().getChildNodes();
-		for(int i=0;i<childNodes.getLength();i++){
-			org.w3c.dom.Node parameterNode = childNodes.item(i);
-			NameValue pair = new NameValue();
-			pair.setName(parameterNode.getLocalName());
-			pair.setValue(parameterNode.getTextContent());
-			parameters.add(pair);
-		}
-		return parameters;
+//	public static List<NameValue> getIOParameterData(String xml) throws ParserConfigurationException, SAXException, IOException{
+//		List<NameValue> parameters=new ArrayList<NameValue>();
+//		Document parameterDocument = XMLUtils.newDocument(new ByteArrayInputStream(xml.getBytes()));
+//		org.w3c.dom.NodeList childNodes = parameterDocument.getDocumentElement().getChildNodes();
+//		for(int i=0;i<childNodes.getLength();i++){
+//			org.w3c.dom.Node parameterNode = childNodes.item(i);
+//			NameValue pair = new NameValue();
+//			pair.setName(parameterNode.getLocalName());
+//			pair.setValue(parameterNode.getTextContent());
+//			parameters.add(pair);
+//		}
+//		return parameters;
+//	}
+
+	public static Airavata.Client getAiravataClient(ThriftClientData data) throws AiravataClientConnectException{
+		return AiravataClientFactory.createAiravataClient(data.getServerAddress(),data.getServerPort());
+	}
+	
+	public static Client getWorkflowClient(ThriftClientData data) throws AiravataClientConnectException{
+		return AiravataClientFactory.createWorkflowClient(data.getServerAddress(),data.getServerPort());
 	}
+	
 
+	
 //    public static AiravataRegistry2 getRegistry(URL url) throws IOException, RepositoryException, URISyntaxException {
 //        Properties properties = new Properties();
 //        properties.load(url.openStream());

http://git-wip-us.apache.org/repos/asf/airavata/blob/3e6c815a/modules/xbaya-gui/src/test/java/org/apache/airavata/xbaya/interpreter/ComplexForEachWorkflowTest.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/test/java/org/apache/airavata/xbaya/interpreter/ComplexForEachWorkflowTest.java b/modules/xbaya-gui/src/test/java/org/apache/airavata/xbaya/interpreter/ComplexForEachWorkflowTest.java
index bb876df..a096071 100644
--- a/modules/xbaya-gui/src/test/java/org/apache/airavata/xbaya/interpreter/ComplexForEachWorkflowTest.java
+++ b/modules/xbaya-gui/src/test/java/org/apache/airavata/xbaya/interpreter/ComplexForEachWorkflowTest.java
@@ -1,73 +1,73 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.xbaya.interpreter;
-
-import java.io.IOException;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.util.UUID;
-
-//import org.apache.airavata.registry.api.AiravataRegistry2;
-import org.apache.airavata.workflow.model.exceptions.WorkflowException;
-import org.apache.airavata.workflow.model.wf.Workflow;
-import org.apache.airavata.xbaya.XBayaConfiguration;
-import org.apache.airavata.xbaya.interpreter.utils.WorkflowTestUtils;
-import org.apache.airavata.xbaya.interpretor.SSWorkflowInterpreterInteractorImpl;
-import org.apache.airavata.xbaya.interpretor.StandaloneNotificationSender;
-import org.apache.airavata.xbaya.interpretor.WorkflowInterpreter;
-import org.apache.airavata.xbaya.interpretor.WorkflowInterpreterConfiguration;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.MethodRule;
-import org.junit.rules.TestWatchman;
-import org.junit.runners.model.FrameworkMethod;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class ComplexForEachWorkflowTest {
-    final Logger logger = LoggerFactory.getLogger(ForEachWorkflowTest.class);
-
-    @Rule
-    public MethodRule watchman = new TestWatchman() {
-        public void starting(FrameworkMethod method) {
-            logger.info("{} being run...", method.getName());
-        }
-    };
-
-    @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,
-                UUID.randomUUID().toString(), conf.getMessageBoxURL(), conf.getBrokerURL(), conf.getAiravataAPI(), conf,null,null,true);
-
-        workflowInterpreterConfiguration.setNotifier(new StandaloneNotificationSender(workflowInterpreterConfiguration.getTopic(),workflowInterpreterConfiguration.getWorkflow()));
-        SSWorkflowInterpreterInteractorImpl ssWorkflowInterpreterInteractorImpl = new SSWorkflowInterpreterInteractorImpl();
-
-        WorkflowInterpreter interpretor = new WorkflowInterpreter(workflowInterpreterConfiguration,ssWorkflowInterpreterInteractorImpl);
-        interpretor.scheduleDynamically();
-    }
-}
+///*
+// *
+// * Licensed to the Apache Software Foundation (ASF) under one
+// * or more contributor license agreements.  See the NOTICE file
+// * distributed with this work for additional information
+// * regarding copyright ownership.  The ASF licenses this file
+// * to you under the Apache License, Version 2.0 (the
+// * "License"); you may not use this file except in compliance
+// * with the License.  You may obtain a copy of the License at
+// *
+// *   http://www.apache.org/licenses/LICENSE-2.0
+// *
+// * Unless required by applicable law or agreed to in writing,
+// * software distributed under the License is distributed on an
+// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// * KIND, either express or implied.  See the License for the
+// * specific language governing permissions and limitations
+// * under the License.
+// *
+//*/
+//package org.apache.airavata.xbaya.interpreter;
+//
+//import java.io.IOException;
+//import java.net.URISyntaxException;
+//import java.net.URL;
+//import java.util.UUID;
+//
+////import org.apache.airavata.registry.api.AiravataRegistry2;
+//import org.apache.airavata.workflow.model.exceptions.WorkflowException;
+//import org.apache.airavata.workflow.model.wf.Workflow;
+//import org.apache.airavata.xbaya.XBayaConfiguration;
+//import org.apache.airavata.xbaya.interpreter.utils.WorkflowTestUtils;
+//import org.apache.airavata.xbaya.interpretor.SSWorkflowInterpreterInteractorImpl;
+//import org.apache.airavata.xbaya.interpretor.StandaloneNotificationSender;
+//import org.apache.airavata.xbaya.interpretor.WorkflowInterpreter;
+//import org.apache.airavata.xbaya.interpretor.WorkflowInterpreterConfiguration;
+//import org.junit.Rule;
+//import org.junit.Test;
+//import org.junit.rules.MethodRule;
+//import org.junit.rules.TestWatchman;
+//import org.junit.runners.model.FrameworkMethod;
+//import org.slf4j.Logger;
+//import org.slf4j.LoggerFactory;
+//
+//public class ComplexForEachWorkflowTest {
+//    final Logger logger = LoggerFactory.getLogger(ForEachWorkflowTest.class);
+//
+//    @Rule
+//    public MethodRule watchman = new TestWatchman() {
+//        public void starting(FrameworkMethod method) {
+//            logger.info("{} being run...", method.getName());
+//        }
+//    };
+//
+//    @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,
+//                UUID.randomUUID().toString(), conf.getMessageBoxURL(), conf.getBrokerURL(), conf.getAiravataAPI(), conf,null,null,true);
+//
+//        workflowInterpreterConfiguration.setNotifier(new StandaloneNotificationSender(workflowInterpreterConfiguration.getTopic(),workflowInterpreterConfiguration.getWorkflow()));
+//        SSWorkflowInterpreterInteractorImpl ssWorkflowInterpreterInteractorImpl = new SSWorkflowInterpreterInteractorImpl();
+//
+//        WorkflowInterpreter interpretor = new WorkflowInterpreter(workflowInterpreterConfiguration,ssWorkflowInterpreterInteractorImpl);
+//        interpretor.scheduleDynamically();
+//    }
+//}


Mime
View raw message