airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From samin...@apache.org
Subject [01/20] introducing workflow support in airavata api + other related modules
Date Wed, 23 Jul 2014 16:48:15 GMT
Repository: airavata
Updated Branches:
  refs/heads/master 88269c433 -> e6126da9e


http://git-wip-us.apache.org/repos/asf/airavata/blob/a8974b7c/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/ws/WSComponentRegistry.java
----------------------------------------------------------------------
diff --git a/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/ws/WSComponentRegistry.java
b/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/ws/WSComponentRegistry.java
index db9f287..e9d4efd 100644
--- a/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/ws/WSComponentRegistry.java
+++ b/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/ws/WSComponentRegistry.java
@@ -30,7 +30,6 @@ import java.util.Map;
 
 import org.apache.airavata.common.utils.WSDLUtil;
 import org.apache.airavata.workflow.model.component.Component;
-import org.apache.airavata.workflow.model.component.ComponentException;
 import org.apache.airavata.workflow.model.component.ComponentReference;
 import org.apache.airavata.workflow.model.component.ComponentRegistry;
 import org.apache.airavata.workflow.model.component.ComponentRegistryException;
@@ -71,8 +70,8 @@ public class WSComponentRegistry extends ComponentRegistry {
             String name = urlString.substring(urlString.lastIndexOf('/') + 1);
             treeLeaf = new URLComponentReference(name, components);
 
-        } catch (ComponentException e) {
-            e.printStackTrace();
+//        } catch (ComponentException e) {
+//            e.printStackTrace();
         } catch (WsdlException e) {
             e.printStackTrace();
         } catch (URISyntaxException e) {

http://git-wip-us.apache.org/repos/asf/airavata/blob/a8974b7c/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/ws/WorkflowComponent.java
----------------------------------------------------------------------
diff --git a/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/ws/WorkflowComponent.java
b/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/ws/WorkflowComponent.java
index b4a1493..fd90c69 100644
--- a/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/ws/WorkflowComponent.java
+++ b/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/ws/WorkflowComponent.java
@@ -65,15 +65,14 @@ public class WorkflowComponent extends WSComponent {
      * @throws ComponentException
      */
     public WorkflowComponent(Workflow workflow) throws ComponentException {
-        super(workflow.getWorkflowWSDL());
         this.workflow = workflow;
         this.templateID = this.workflow.getGPELTemplateID();
 
-        // Add template ID to WSDL
-        for (WsdlPortType portType : this.wsdl.portTypes()) {
-            XmlElement templateIDElement = portType.xml().addElement(GPEL_NAMESPACE, WORKFLOW_TEMPLATE_ID_TAG);
-            templateIDElement.setText(this.templateID.toString());
-        }
+//        // Add template ID to WSDL
+//        for (WsdlPortType portType : this.wsdl.portTypes()) {
+//            XmlElement templateIDElement = portType.xml().addElement(GPEL_NAMESPACE, WORKFLOW_TEMPLATE_ID_TAG);
+//            templateIDElement.setText(this.templateID.toString());
+//        }
     }
 
     /**
@@ -96,16 +95,16 @@ public class WorkflowComponent extends WSComponent {
      * @throws ComponentException
      */
     public WorkflowComponent(WsdlDefinitions wsdl, QName portTypeQName, String operationName)
throws ComponentException {
-        super(wsdl, portTypeQName, operationName);
-        try {
-            // Get template ID from WSDL
-            WsdlPortType portType = this.wsdl.getPortType(portTypeQName.getLocalPart());
-            XmlElement templateIDElement = portType.xml().element(GPEL_NAMESPACE, WORKFLOW_TEMPLATE_ID_TAG);
-            String templateIDString = templateIDElement.requiredText();
-            this.templateID = new URI(templateIDString);
-        } catch (URISyntaxException e) {
-            throw new ComponentException(e);
-        }
+//        super(wsdl, portTypeQName, operationName);
+//        try {
+//            // Get template ID from WSDL
+//            WsdlPortType portType = this.wsdl.getPortType(portTypeQName.getLocalPart());
+//            XmlElement templateIDElement = portType.xml().element(GPEL_NAMESPACE, WORKFLOW_TEMPLATE_ID_TAG);
+//            String templateIDString = templateIDElement.requiredText();
+//            this.templateID = new URI(templateIDString);
+//        } catch (URISyntaxException e) {
+//            throw new ComponentException(e);
+//        }
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/airavata/blob/a8974b7c/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/gpel/DSCUtil.java
----------------------------------------------------------------------
diff --git a/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/gpel/DSCUtil.java
b/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/gpel/DSCUtil.java
index d4440d6..3ed669e 100644
--- a/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/gpel/DSCUtil.java
+++ b/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/gpel/DSCUtil.java
@@ -79,18 +79,18 @@ public class DSCUtil {
     public static Map<String, WsdlDefinitions> createCWSDLs(Workflow workflow, URI
dscURL) {
         Map<String, WsdlDefinitions> WSDLMap = new HashMap<String, WsdlDefinitions>();
         Graph graph = workflow.getGraph();
-        for (WSNode node : GraphUtil.getWSNodes(graph)) {
-            String partnerLinkName = BPELScript.createPartnerLinkName(node.getID());
-            WsdlDefinitions wsdl = node.getComponent().getWSDL();
-            if (WSDLUtil.isAWSDL(wsdl)) {
-                try {
-                    wsdl = convertToCWSDL(WSDLUtil.deepClone(wsdl), dscURL);
-                } catch (UtilsException e) {
-                    e.printStackTrace();
-                }
-            }
-            WSDLMap.put(partnerLinkName, wsdl);
-        }
+//        for (WSNode node : GraphUtil.getWSNodes(graph)) {
+//            String partnerLinkName = BPELScript.createPartnerLinkName(node.getID());
+//            WsdlDefinitions wsdl = node.getComponent().getWSDL();
+//            if (WSDLUtil.isAWSDL(wsdl)) {
+//                try {
+//                    wsdl = convertToCWSDL(WSDLUtil.deepClone(wsdl), dscURL);
+//                } catch (UtilsException e) {
+//                    e.printStackTrace();
+//                }
+//            }
+//            WSDLMap.put(partnerLinkName, wsdl);
+//        }
         return WSDLMap;
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/a8974b7c/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/gpel/script/WorkflowWSDL.java
----------------------------------------------------------------------
diff --git a/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/gpel/script/WorkflowWSDL.java
b/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/gpel/script/WorkflowWSDL.java
index 7c32a71..4fd30ad 100644
--- a/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/gpel/script/WorkflowWSDL.java
+++ b/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/gpel/script/WorkflowWSDL.java
@@ -417,8 +417,9 @@ public class WorkflowWSDL {
         WSComponentPort componentPort = port.getWSComponentPort();
         WsdlDefinitions wsdl = null;
         if (componentPort != null) {
-            wsdl = componentPort.getComponent().getWSDL();
-            type = declareTypeIfNecessary(wsdl, type);
+        	//FIXME
+//            wsdl = componentPort.getComponent().getWSDL();
+//            type = declareTypeIfNecessary(wsdl, type);
         }
         int arrayDimension = port.getArrayDimension();
         if (arrayDimension == 1) {

http://git-wip-us.apache.org/repos/asf/airavata/blob/a8974b7c/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/graph/util/GraphUtil.java
----------------------------------------------------------------------
diff --git a/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/graph/util/GraphUtil.java
b/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/graph/util/GraphUtil.java
index 6db6efc..0dc3e2c 100644
--- a/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/graph/util/GraphUtil.java
+++ b/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/graph/util/GraphUtil.java
@@ -106,7 +106,9 @@ public class GraphUtil {
 		List<N> nodes = new LinkedList<N>();
 		for (Node node : graph.getNodes()) {
 			if (klass.isInstance(node)) {
-				nodes.add((N) node);
+				if (!nodes.contains(node)) {
+					nodes.add((N) node);
+				}
 			}
 		}
 		return nodes;

http://git-wip-us.apache.org/repos/asf/airavata/blob/a8974b7c/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/graph/ws/WSNode.java
----------------------------------------------------------------------
diff --git a/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/graph/ws/WSNode.java
b/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/graph/ws/WSNode.java
index 88c469a..00ded8f 100644
--- a/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/graph/ws/WSNode.java
+++ b/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/graph/ws/WSNode.java
@@ -23,9 +23,7 @@ package org.apache.airavata.workflow.model.graph.ws;
 
 import javax.xml.namespace.QName;
 
-import org.apache.airavata.workflow.model.component.ComponentException;
 import org.apache.airavata.workflow.model.component.ws.WSComponent;
-import org.apache.airavata.workflow.model.component.ws.WSComponentFactory;
 import org.apache.airavata.workflow.model.graph.Edge;
 import org.apache.airavata.workflow.model.graph.ForEachExecutableNode;
 import org.apache.airavata.workflow.model.graph.Graph;
@@ -33,7 +31,6 @@ import org.apache.airavata.workflow.model.graph.GraphException;
 import org.apache.airavata.workflow.model.graph.GraphSchema;
 import org.apache.airavata.workflow.model.graph.impl.NodeImpl;
 import org.apache.airavata.workflow.model.graph.util.GraphUtil;
-import org.apache.airavata.workflow.model.utils.MessageConstants;
 import org.xmlpull.infoset.XmlElement;
 
 public class WSNode extends NodeImpl implements ForEachExecutableNode{
@@ -172,16 +169,5 @@ public class WSNode extends NodeImpl implements ForEachExecutableNode{
             this.operationName = operationElement.requiredText();
         }
     }
-
-    @Override
-    @Deprecated
-    protected void parseComponent(XmlElement componentElement) throws GraphException {
-        try {
-            String componentString = componentElement.requiredText();
-            WSComponent wsdlComponent = WSComponentFactory.createComponent(componentString);
-            setComponent(wsdlComponent);
-        } catch (ComponentException e) {
-            throw new GraphException(MessageConstants.COMPONENT_FORMAT_ERROR, e);
-        }
-    }
+   
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/a8974b7c/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/wf/Workflow.java
----------------------------------------------------------------------
diff --git a/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/wf/Workflow.java
b/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/wf/Workflow.java
index d708611..22bb29d 100644
--- a/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/wf/Workflow.java
+++ b/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/wf/Workflow.java
@@ -38,7 +38,6 @@ import javax.imageio.ImageIO;
 import javax.xml.namespace.QName;
 
 import org.apache.airavata.common.exception.UtilsException;
-import org.apache.airavata.common.utils.StringUtil;
 import org.apache.airavata.common.utils.WSDLUtil;
 import org.apache.airavata.common.utils.XMLUtil;
 import org.apache.airavata.workflow.model.component.Component;
@@ -56,6 +55,7 @@ import org.apache.airavata.workflow.model.graph.GraphSchema;
 import org.apache.airavata.workflow.model.graph.Node;
 import org.apache.airavata.workflow.model.graph.impl.NodeImpl;
 import org.apache.airavata.workflow.model.graph.system.InputNode;
+import org.apache.airavata.workflow.model.graph.system.OutputNode;
 import org.apache.airavata.workflow.model.graph.util.GraphUtil;
 import org.apache.airavata.workflow.model.graph.ws.WSGraph;
 import org.apache.airavata.workflow.model.graph.ws.WSGraphFactory;
@@ -398,27 +398,27 @@ public class Workflow implements Cloneable {
     public Map<String, WsdlDefinitions> getWSDLs() {
 
         Map<String, WsdlDefinitions> wsdls = new LinkedHashMap<String, WsdlDefinitions>();
-        Map<WsdlDefinitions, String> ids = new HashMap<WsdlDefinitions, String>();
-        // Use LinkedHashMap to preserve the order of WSDLs, which is useful for
-        // some unit tests.
-
-        for (WSNode node : GraphUtil.getNodes(this.graph, WSNode.class)) {
-            WsdlDefinitions wsdl = node.getComponent().getWSDL();
-            if (wsdls.containsValue(wsdl)) {
-                String id = ids.get(wsdl);
-                node.setWSDLID(id);
-            } else {
-                // Assign unique key
-                String name = WSDLUtil.getWSDLName(wsdl);
-                String id = StringUtil.convertToJavaIdentifier(name);
-                while (wsdls.containsKey(id)) {
-                    id = StringUtil.incrementName(id);
-                }
-                wsdls.put(id, wsdl);
-                ids.put(wsdl, id);
-                node.setWSDLID(id);
-            }
-        }
+//        Map<WsdlDefinitions, String> ids = new HashMap<WsdlDefinitions, String>();
+//        // Use LinkedHashMap to preserve the order of WSDLs, which is useful for
+//        // some unit tests.
+//
+//        for (WSNode node : GraphUtil.getNodes(this.graph, WSNode.class)) {
+//            WsdlDefinitions wsdl = node.getComponent().getWSDL();
+//            if (wsdls.containsValue(wsdl)) {
+//                String id = ids.get(wsdl);
+//                node.setWSDLID(id);
+//            } else {
+//                // Assign unique key
+//                String name = WSDLUtil.getWSDLName(wsdl);
+//                String id = StringUtil.convertToJavaIdentifier(name);
+//                while (wsdls.containsKey(id)) {
+//                    id = StringUtil.incrementName(id);
+//                }
+//                wsdls.put(id, wsdl);
+//                ids.put(wsdl, id);
+//                node.setWSDLID(id);
+//            }
+//        }
         return wsdls;
     }
 
@@ -474,15 +474,12 @@ public class Workflow implements Cloneable {
      * @throws ComponentException
      */
     public List<WSComponentPort> getInputs() throws ComponentException {
-        if (this.workflowWSDL == null) {
-            try {
-                this.createScript();
-            } catch (GraphException e) {
-                throw new IllegalStateException(e.getMessage());
-            }
-        }
-        WSComponent component = WSComponentFactory.createComponent(this.workflowWSDL);
-        return component.getInputPorts();
+        List<InputNode> nodes = GraphUtil.getNodes(this.graph, InputNode.class);
+        List<WSComponentPort> ports = new ArrayList<WSComponentPort>();
+        for (InputNode inputNode : nodes) {
+        	ports.add(new WSComponentPort(inputNode.getName(), inputNode.getOutputPorts().get(0).getType(),
null));
+		}
+        return ports;
     }
     
 	public List<WorkflowInput> getWorkflowInputs() throws Exception{
@@ -501,11 +498,12 @@ public class Workflow implements Cloneable {
      * @throws ComponentException
      */
     public List<WSComponentPort> getOutputs() throws ComponentException {
-        if (this.workflowWSDL == null) {
-            throw new IllegalStateException();
-        }
-        WSComponent component = WSComponentFactory.createComponent(this.workflowWSDL);
-        return component.getOutputPorts();
+    	List<OutputNode> nodes = GraphUtil.getNodes(this.graph, OutputNode.class);
+        List<WSComponentPort> ports = new ArrayList<WSComponentPort>();
+        for (OutputNode outputNode : nodes) {
+        	ports.add(new WSComponentPort(outputNode.getName(), outputNode.getOutputPorts().get(0).getType(),
null));
+		}
+        return ports;
     }
 
     /**
@@ -529,7 +527,8 @@ public class Workflow implements Cloneable {
      */
     public XmlElement toXML() {
         // This must be before graph.toXML() to set WSDL ID to each node.
-        Map<String, WsdlDefinitions> wsdls = getWSDLs();
+    	//FIXME 
+//        Map<String, WsdlDefinitions> wsdls = getWSDLs();
 
         XmlElement workflowElement = XMLUtil.BUILDER.newFragment(NS_XWF, WORKFLOW_TAG);
 
@@ -547,12 +546,12 @@ public class Workflow implements Cloneable {
 
         // WSDLs
         XmlElement wsdlsElement = workflowElement.addElement(NS_XWF, WSDLS_TAG);
-        for (String id : wsdls.keySet()) {
-            WsdlDefinitions wsdl = wsdls.get(id);
-            XmlElement wsdlElement = wsdlsElement.addElement(NS_XWF, WSDL_TAG);
-            wsdlElement.setAttributeValue(NS_XWF, ID_ATTRIBUTE, id);
-            wsdlElement.setText(XMLUtil.xmlElementToString(wsdl.xml()));
-        }
+//        for (String id : wsdls.keySet()) {
+//            WsdlDefinitions wsdl = wsdls.get(id);
+//            XmlElement wsdlElement = wsdlsElement.addElement(NS_XWF, WSDL_TAG);
+//            wsdlElement.setAttributeValue(NS_XWF, ID_ATTRIBUTE, id);
+//            wsdlElement.setText(XMLUtil.xmlElementToString(wsdl.xml()));
+//        }
 
         // Image
         if (this.image != null) {
@@ -631,11 +630,12 @@ public class Workflow implements Cloneable {
                 }
                 WSComponentKey key = new WSComponentKey(id, portType, operation);
 
-                WSComponent component;
+                WSComponent component = null;
                 if (components.containsKey(key)) {
                     component = components.get(key);
                 } else {
-                    component = WSComponentFactory.createComponent(wsdl, portType, operation);
+                	//FIXME
+//                    component = WSComponentFactory.createComponent(wsdl, portType, operation);
                     components.put(key, component);
                 }
                 node.setComponent(component);
@@ -935,7 +935,6 @@ public class Workflow implements Cloneable {
 		return editable;
 	}
 
-
 	public void setEditable(boolean editable) {
 		this.editable = editable;
 		getGraph().setEditable(isEditable());

http://git-wip-us.apache.org/repos/asf/airavata/blob/a8974b7c/modules/xbaya-gui/pom.xml
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/pom.xml b/modules/xbaya-gui/pom.xml
index f4e4030..e359c74 100644
--- a/modules/xbaya-gui/pom.xml
+++ b/modules/xbaya-gui/pom.xml
@@ -211,6 +211,11 @@
         </dependency>
         <dependency>
             <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-workflow-engine</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
             <artifactId>airavata-common-utils</artifactId>
             <version>${project.version}</version>
         </dependency>

http://git-wip-us.apache.org/repos/asf/airavata/blob/a8974b7c/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/registry/RegistryWindow.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/registry/RegistryWindow.java
b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/registry/RegistryWindow.java
index 2e1d7de..1ae1131 100644
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/registry/RegistryWindow.java
+++ b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/registry/RegistryWindow.java
@@ -74,7 +74,7 @@ public class RegistryWindow {
 
     private ThriftServiceType serviceType;
     
-    private DefaultComboBoxModel<ThriftServiceType> serviceTypeModel;
+    private DefaultComboBoxModel serviceTypeModel;
     
     /**
      * @param engine
@@ -141,7 +141,7 @@ public class RegistryWindow {
         XBayaLabel serverPortLabel = new XBayaLabel("Server Port", this.portTextField);
         XBayaLabel gatewayNameLabel = new XBayaLabel("Gateway Name", this.gatewayNameTextField);
         XBayaLabel gatewayUserLabel = new XBayaLabel("Gateway TUser", this.usernameTextField);
-        serviceTypeModel = new DefaultComboBoxModel<ThriftServiceType>(ThriftServiceType.values());
+        serviceTypeModel = new DefaultComboBoxModel(ThriftServiceType.values());
         serviceTypeModel.setSelectedItem(ThriftServiceType.API_SERVICE);
 		this.serviceTypeCombo = new XBayaComboBox(serviceTypeModel);
         JLabel serviceTypeLabel = new JLabel("Airavata Service");

http://git-wip-us.apache.org/repos/asf/airavata/blob/a8974b7c/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 e4bef63..2671d30 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
@@ -29,6 +29,11 @@ import java.util.List;
 import java.util.UUID;
 //import org.apache.airavata.registry.api.AiravataRegistry2;
 
+
+
+
+
+
 import javax.swing.AbstractAction;
 import javax.swing.BorderFactory;
 import javax.swing.JButton;
@@ -38,8 +43,18 @@ import javax.swing.JPanel;
 import javax.swing.border.EtchedBorder;
 import javax.xml.namespace.QName;
 
+import org.apache.airavata.common.utils.ServerSettings;
 import org.apache.airavata.common.utils.StringUtil;
 import org.apache.airavata.common.utils.XMLUtil;
+import org.apache.airavata.model.workspace.experiment.DataObjectType;
+import org.apache.airavata.model.workspace.experiment.DataType;
+import org.apache.airavata.model.workspace.experiment.Experiment;
+import org.apache.airavata.orchestrator.client.OrchestratorClientFactory;
+import org.apache.airavata.orchestrator.cpi.OrchestratorService;
+import org.apache.airavata.registry.cpi.RegistryException;
+import org.apache.airavata.workflow.engine.interpretor.WorkflowInterpreter;
+import org.apache.airavata.workflow.engine.interpretor.WorkflowInterpreterConfiguration;
+import org.apache.airavata.workflow.model.exceptions.WorkflowException;
 import org.apache.airavata.workflow.model.graph.system.InputNode;
 import org.apache.airavata.workflow.model.graph.util.GraphUtil;
 import org.apache.airavata.workflow.model.graph.ws.WSNode;
@@ -55,7 +70,6 @@ import org.apache.airavata.xbaya.ui.utils.ErrorMessages;
 import org.apache.airavata.xbaya.ui.widgets.GridPanel;
 import org.apache.airavata.xbaya.ui.widgets.XBayaLabel;
 import org.apache.airavata.xbaya.ui.widgets.XBayaTextField;
-import org.apache.airavata.xbaya.util.XBayaUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.xmlpull.infoset.XmlElement;
@@ -276,14 +290,26 @@ public class WorkflowInterpreterLaunchWindow {
         final List<InputNode> inputNodes = GraphUtil.getInputNodes(this.workflow.getGraph());
         builder.newFragment("inputs");
         new ODEClient();
+        final Experiment experiment = new Experiment();
+        experiment.setApplicationId(workflow.getName());
+        experiment.setExperimentID("some-id");
+        experiment.setProjectID("prj1");
+        experiment.setName("some-exp");
+        experiment.setUserName("me");
         for (int i = 0; i < inputNodes.size(); i++) {
             InputNode inputNode = inputNodes.get(i);
             XBayaTextField parameterTextField = this.parameterTextFields.get(i);
             inputNode.getID();
             String value = parameterTextField.getText();
-            inputNode.setDefaultValue(value);
+//            inputNode.setDefaultValue(value);
+            DataObjectType elem = new DataObjectType();
+            elem.setKey(inputNode.getID());
+            elem.setType(DataType.STRING);
+            elem.setValue(value);
+			experiment.addToExperimentInputs(elem );
         }
-
+        
+        
 //        final String workflowInterpreterUrl = this.workflowInterpreterTextField.getText();
 //        if (null != workflowInterpreterUrl && !"".equals(workflowInterpreterUrl))
{
 //            try {
@@ -306,7 +332,15 @@ public class WorkflowInterpreterLaunchWindow {
         new Thread() {
             @Override
             public void run() {
-
+            	WorkflowInterpreter workflowInterpreter = new WorkflowInterpreter(experiment,
null, new WorkflowInterpreterConfiguration(workflow),getOrchestratorClient());
+                try {
+        			workflowInterpreter.scheduleDynamically();
+        		} catch (WorkflowException e) {
+        			e.printStackTrace();
+        		} catch (RegistryException e) {
+        			// TODO Auto-generated catch block
+        			e.printStackTrace();
+        		}
 //                try {
 //                    List<WorkflowInput> workflowInputs=new ArrayList<WorkflowInput>();
 //                    for (int i = 0; i < inputNodes.size(); i++) {
@@ -342,4 +376,10 @@ public class WorkflowInterpreterLaunchWindow {
 
         hide();
     }
+    
+	private OrchestratorService.Client getOrchestratorClient() {
+		final int serverPort = Integer.parseInt(ServerSettings.getSetting(org.apache.airavata.common.utils.Constants.ORCHESTRATOR_SERVER_PORT,"8940"));
+        final String serverHost = ServerSettings.getSetting(org.apache.airavata.common.utils.Constants.ORCHESTRATOR_SERVER_HOST,
null);
+        return OrchestratorClientFactory.createOrchestratorClient(serverHost, serverPort);
+	}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/a8974b7c/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 80e75b1..b78a396 100644
--- a/pom.xml
+++ b/pom.xml
@@ -508,6 +508,7 @@
                 <module>modules/distribution</module>
                 <module>modules/ws-messenger</module>
                 <module>modules/integration-tests</module>
+                <module>modules/xbaya-gui</module>
             </modules>
         </profile>
         <profile>


Mime
View raw message