airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From samin...@apache.org
Subject svn commit: r1234191 - /incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/clients/XBayaClient.java
Date Fri, 20 Jan 2012 22:30:53 GMT
Author: samindaw
Date: Fri Jan 20 22:30:52 2012
New Revision: 1234191

URL: http://svn.apache.org/viewvc?rev=1234191&view=rev
Log:
saving user info once the workflow is executed

Modified:
    incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/clients/XBayaClient.java

Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/clients/XBayaClient.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/clients/XBayaClient.java?rev=1234191&r1=1234190&r2=1234191&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/clients/XBayaClient.java
(original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/clients/XBayaClient.java
Fri Jan 20 22:30:52 2012
@@ -39,6 +39,7 @@ import javax.jcr.RepositoryException;
 
 import org.apache.airavata.common.registry.api.exception.RegistryException;
 import org.apache.airavata.registry.api.AiravataRegistry;
+import org.apache.airavata.registry.api.WorkflowExecution;
 import org.apache.airavata.registry.api.impl.AiravataJCRRegistry;
 import org.apache.airavata.xbaya.component.ComponentException;
 import org.apache.airavata.xbaya.component.ws.WSComponentPort;
@@ -238,18 +239,19 @@ public class XBayaClient {
         }
     }
 
-    public String runWorkflow(String topic){
+    public String runWorkflow(String topic, String user){
 		String worflowoutput= null;
 		try {
 			WorkflowInterpretorStub stub = new WorkflowInterpretorStub(getClientConfiguration().getXbayaServiceURL().toString());
 		    worflowoutput = stub.launchWorkflow(workflow, topic, getClientConfiguration().getMyproxyPassword(),getClientConfiguration().getMyproxyUsername(),
null,
 					configurations);
+		    getRegistry().saveWorkflowExecutionUser(topic, user);
 		    log.info("Workflow output : " + worflowoutput);
 		} catch (AxisFault e) {
 			log.fine(e.getMessage(), e);
 		} catch (RemoteException e) {
 			log.fine(e.getMessage(), e);
-		} catch (IOException e) {
+		} catch (RegistryException e) {
 			log.fine(e.getMessage(), e);
 		}
 		return worflowoutput;
@@ -272,7 +274,23 @@ public class XBayaClient {
 		}
 		return worflowoutput;
 	}
-
+    
+    public List<WorkflowExecution> getWorkflowExecutionData(String user) throws RegistryException{
+    	return getRegistry().getWorkflowExecutionByUser(user);
+    }
+    
+    /**
+     * 
+     * @param user
+     * @param pageSize - number of executions to return (page size)
+     * @param PageNo - which page to return to (>=0) 
+     * @return
+     * @throws RegistryException
+     */
+    public List<WorkflowExecution> getWorkflowExecutionData(String user, int pageSize,
int PageNo) throws RegistryException{
+    	return getRegistry().getWorkflowExecutionByUser(user, pageSize, PageNo);
+    }
+    
     public static String getWorkflow() {
         return workflow;
     }



Mime
View raw message