You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sa...@apache.org on 2012/03/19 22:39:22 UTC
svn commit: r1302666 -
/incubator/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/airavata/AiravataClient.java
Author: samindaw
Date: Mon Mar 19 21:39:22 2012
New Revision: 1302666
URL: http://svn.apache.org/viewvc?rev=1302666&view=rev
Log:
overloading runworkflow to include user & metadata
Modified:
incubator/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/airavata/AiravataClient.java
Modified: incubator/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/airavata/AiravataClient.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/airavata/AiravataClient.java?rev=1302666&r1=1302665&r2=1302666&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/airavata/AiravataClient.java (original)
+++ incubator/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/airavata/AiravataClient.java Mon Mar 19 21:39:22 2012
@@ -474,7 +474,7 @@ public class AiravataClient {
}
return workflowList;
}
-
+
/**
* Execute the given workflow template with the given inputs and return the topic id
* @param workflowTemplateId
@@ -482,6 +482,19 @@ public class AiravataClient {
* @return
*/
public String runWorkflow(String workflowTemplateId,List<WorkflowInput> inputs) throws Exception{
+ return runWorkflow(workflowTemplateId,inputs,getRegistry().getUsername(),null);
+ }
+
+ /**
+ * Execute the given workflow template with the given inputs, user, metadata and return the topic id
+ * @param workflowTemplateId
+ * @param inputs
+ * @param user
+ * @param metadata
+ * @return
+ * @throws Exception
+ */
+ public String runWorkflow(String workflowTemplateId,List<WorkflowInput> inputs, String user, String metadata) throws Exception{
try {
List<WSComponentPort> ports = getWSComponentPortInputs(workflowTemplateId);
for (WorkflowInput input : inputs) {
@@ -503,7 +516,7 @@ public class AiravataClient {
}
workflow=getWorkflowAsString(workflowTemplateId).getString();
String topic=workflowTemplateId+"_"+UUID.randomUUID();
- return runWorkflow(topic, inputValues.toArray(new NameValue[]{}));
+ return runWorkflow(topic, inputValues.toArray(new NameValue[]{}), user, metadata);
} catch (PathNotFoundException e) {
e.printStackTrace();
} catch (RegistryException e) {