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/09/18 18:47:52 UTC
svn commit: r1387248 - in /incubator/airavata/trunk/modules:
airavata-client/src/main/java/org/apache/airavata/client/
airavata-client/src/main/java/org/apache/airavata/client/impl/
commons/registry-api/src/main/java/org/apache/airavata/registry/api/ c...
Author: samindaw
Date: Tue Sep 18 16:47:51 2012
New Revision: 1387248
URL: http://svn.apache.org/viewvc?rev=1387248&view=rev
Log:
updating provenance registry api
Added:
incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowNodeIOData.java
- copied, changed from r1386978, incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowServiceIOData.java
Removed:
incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowServiceIOData.java
incubator/airavata/trunk/modules/distribution/src/main/resources/conf/provenance.sql
Modified:
incubator/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataClient.java
incubator/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ProvenanceManagerImpl.java
incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/AiravataRegistry1.java
incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/AiravataRegistryblahblah.java
incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/ProvenanceRegistry.java
incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/impl/AiravataJCRRegistry.java
incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/impl/WorkflowExecutionImpl.java
incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowExecution.java
incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowInstanceNodePortData.java
incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowNodeGramData.java
incubator/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/AiravataJPARegistry.java
incubator/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/AbstractResource.java
incubator/airavata/trunk/modules/registry/airavata-registry-service/src/main/java/org/apache/airavata/registry/services/RegistryService.java
incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpreter.java
incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/model/registrybrowser/XBayaWorkflowExperiments.java
incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/provenance/ProvenanceReader.java
incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/provenance/ProvenanceWrite.java
incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/provenance/WorkflowNodeStatusUpdater.java
incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/provenance/WorkflowStatusUpdater.java
incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/registrybrowser/nodes/XBayaWorkflowExperimentNode.java
Modified: incubator/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataClient.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataClient.java?rev=1387248&r1=1387247&r2=1387248&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataClient.java (original)
+++ incubator/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataClient.java Tue Sep 18 16:47:51 2012
@@ -403,15 +403,15 @@ public class AiravataClient implements A
private void runPreWorkflowExecutionTasks(String topic, String user,
String metadata,String workflowInstanceName) throws RegistryException {
if (user != null) {
- getRegistry().saveWorkflowExecutionUser(topic, user);
+ getRegistry().updateExperimentExecutionUser(topic, user);
}
if (metadata != null) {
- getRegistry().saveWorkflowExecutionMetadata(topic, metadata);
+ getRegistry().updateExperimentMetadata(topic, metadata);
}
if (workflowInstanceName==null) {
workflowInstanceName=topic;
}
- getRegistry().saveWorkflowExecutionName(topic, workflowInstanceName);
+ getRegistry().updateExperimentName(topic, workflowInstanceName);
}
public String runWorkflow(String topic, NameValue[] inputs) throws Exception {
@@ -457,17 +457,17 @@ public class AiravataClient implements A
public List<WorkflowExecution> getWorkflowExecutionDataByUser(String user)
throws RegistryException {
- return getRegistry().getWorkflowExecutionByUser(user);
+ return getRegistry().getExperimentByUser(user);
}
public WorkflowExecution getWorkflowExecutionData(String topic)
throws RegistryException {
- return getRegistry().getWorkflowExecution(topic);
+ return getRegistry().getExperiment(topic);
}
public List<WorkflowExecution> getWorkflowExecutionData(String user,
int pageSize, int PageNo) throws RegistryException {
- return getRegistry().getWorkflowExecutionByUser(user, pageSize, PageNo);
+ return getRegistry().getExperimentByUser(user, pageSize, PageNo);
}
public static String getWorkflow() {
Modified: incubator/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ProvenanceManagerImpl.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ProvenanceManagerImpl.java?rev=1387248&r1=1387247&r2=1387248&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ProvenanceManagerImpl.java (original)
+++ incubator/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ProvenanceManagerImpl.java Tue Sep 18 16:47:51 2012
@@ -41,7 +41,7 @@ import org.apache.airavata.registry.api.
import org.apache.airavata.registry.api.workflow.WorkflowInstanceStatus;
import org.apache.airavata.registry.api.workflow.WorkflowInstanceStatus.ExecutionStatus;
import org.apache.airavata.registry.api.workflow.WorkflowInstanceUser;
-import org.apache.airavata.registry.api.workflow.WorkflowServiceIOData;
+import org.apache.airavata.registry.api.workflow.WorkflowNodeIOData;
public class ProvenanceManagerImpl implements ProvenanceManager {
private AiravataClient client;
@@ -55,7 +55,7 @@ public class ProvenanceManagerImpl imple
WorkflowInstanceNodePortData data)
throws AiravataAPIInvocationException {
try {
- getClient().getRegistry().saveWorkflowExecutionServiceInput(data);
+ getClient().getRegistry().updateWorkflowNodeInput(data);
} catch (RegistryException e) {
throw new AiravataAPIInvocationException(e);
}
@@ -73,7 +73,7 @@ public class ProvenanceManagerImpl imple
WorkflowInstanceNodePortData data)
throws AiravataAPIInvocationException {
try {
- getClient().getRegistry().saveWorkflowExecutionServiceOutput(data);
+ getClient().getRegistry().updateWorkflowNodeOutput(data);
} catch (RegistryException e) {
throw new AiravataAPIInvocationException(e);
}
@@ -91,7 +91,7 @@ public class ProvenanceManagerImpl imple
public List<WorkflowInstanceNodePortData> getWorkflowInstanceNodeInputData(
WorkflowInstanceNode node) throws AiravataAPIInvocationException {
try {
- List<WorkflowServiceIOData> list = getClient().getRegistry().searchWorkflowExecutionServiceInput(node.getWorkflowInstance().getExperimentId(), ".*", node.getNodeId());
+ List<WorkflowNodeIOData> list = getClient().getRegistry().searchWorkflowInstanceNodeInput(node.getWorkflowInstance().getExperimentId(), ".*", node.getNodeId());
return generateWorkflowInstanceNodePortData(list);
} catch (RegistryException e) {
throw new AiravataAPIInvocationException(e);
@@ -99,9 +99,9 @@ public class ProvenanceManagerImpl imple
}
private List<WorkflowInstanceNodePortData> generateWorkflowInstanceNodePortData(
- List<WorkflowServiceIOData> list) {
+ List<WorkflowNodeIOData> list) {
List<WorkflowInstanceNodePortData> portData=new ArrayList<WorkflowInstanceNodePortData>();
- for (WorkflowServiceIOData data : list) {
+ for (WorkflowNodeIOData data : list) {
portData.add(new WorkflowInstanceNodePortData(data));
}
return portData;
@@ -131,7 +131,7 @@ public class ProvenanceManagerImpl imple
@Override
public Map<WorkflowInstanceNode,List<WorkflowInstanceNodePortData>> getWorkflowInstanceNodeInputData(String workflowName, String nodeId) throws AiravataAPIInvocationException{
try {
- List<WorkflowServiceIOData> list = getClient().getRegistry().searchWorkflowExecutionServiceInput(".*", workflowName, nodeId);
+ List<WorkflowNodeIOData> list = getClient().getRegistry().searchWorkflowInstanceNodeInput(".*", workflowName, nodeId);
return groupNodePortData(list);
} catch (RegistryException e) {
throw new AiravataAPIInvocationException(e);
@@ -139,9 +139,9 @@ public class ProvenanceManagerImpl imple
}
private Map<WorkflowInstanceNode, List<WorkflowInstanceNodePortData>> groupNodePortData(
- List<WorkflowServiceIOData> list) {
+ List<WorkflowNodeIOData> list) {
Map<WorkflowInstanceNode,List<WorkflowInstanceNodePortData>> portData=new HashMap<WorkflowInstanceNode, List<WorkflowInstanceNodePortData>>();
- for (WorkflowServiceIOData data : list) {
+ for (WorkflowNodeIOData data : list) {
WorkflowInstanceNodePortData workflowInstanceNodePortData = new WorkflowInstanceNodePortData(data);
List<WorkflowInstanceNodePortData> portDataList = getWorkflowInstanceNodePortDataListForWorkflowInstanceNode(portData, workflowInstanceNodePortData.getWorkflowInstanceNode(), true);
portDataList.add(workflowInstanceNodePortData);
@@ -153,7 +153,7 @@ public class ProvenanceManagerImpl imple
public List<WorkflowInstanceNodePortData> getWorkflowInstanceNodeOutputData(
WorkflowInstanceNode node) throws AiravataAPIInvocationException {
try {
- List<WorkflowServiceIOData> list = getClient().getRegistry().searchWorkflowExecutionServiceOutput(node.getWorkflowInstance().getExperimentId(), ".*", node.getNodeId());
+ List<WorkflowNodeIOData> list = getClient().getRegistry().searchWorkflowInstanceNodeOutput(node.getWorkflowInstance().getExperimentId(), ".*", node.getNodeId());
return generateWorkflowInstanceNodePortData(list);
} catch (RegistryException e) {
throw new AiravataAPIInvocationException(e);
@@ -171,7 +171,7 @@ public class ProvenanceManagerImpl imple
@Override
public Map<WorkflowInstanceNode,List<WorkflowInstanceNodePortData>> getWorkflowInstanceNodeOutputData(String workflowName, String nodeId) throws AiravataAPIInvocationException{
try {
- List<WorkflowServiceIOData> list = getClient().getRegistry().searchWorkflowExecutionServiceOutput(".*", workflowName, nodeId);
+ List<WorkflowNodeIOData> list = getClient().getRegistry().searchWorkflowInstanceNodeOutput(".*", workflowName, nodeId);
return groupNodePortData(list);
} catch (RegistryException e) {
throw new AiravataAPIInvocationException(e);
@@ -188,7 +188,7 @@ public class ProvenanceManagerImpl imple
public void setWorkflowInstanceStatus(WorkflowInstanceStatus status)
throws AiravataAPIInvocationException {
try {
- getClient().getRegistry().saveWorkflowExecutionStatus(status.getWorkflowInstance().getExperimentId(), status);
+ getClient().getRegistry().updateWorkflowInstanceStatus(status.getWorkflowInstance().getExperimentId(), status);
} catch (RegistryException e) {
throw new AiravataAPIInvocationException(e);
}
@@ -200,7 +200,7 @@ public class ProvenanceManagerImpl imple
String experimentId, String workflowInstanceId)
throws AiravataAPIInvocationException {
try {
- return getClient().getRegistry().getWorkflowExecutionStatus(experimentId);
+ return getClient().getRegistry().getWorkflowInstanceStatus(experimentId);
} catch (RegistryException e) {
throw new AiravataAPIInvocationException(e);
}
@@ -217,7 +217,7 @@ public class ProvenanceManagerImpl imple
public void setWorkflowInstanceUser(String experimentId, String workflowInstanceId,
String user) throws AiravataAPIInvocationException {
try {
- getClient().getRegistry().saveWorkflowExecutionUser(experimentId, user);
+ getClient().getRegistry().updateExperimentExecutionUser(experimentId, user);
} catch (RegistryException e) {
throw new AiravataAPIInvocationException(e);
}
@@ -240,7 +240,7 @@ public class ProvenanceManagerImpl imple
WorkflowInstance workflowInstance)
throws AiravataAPIInvocationException {
try {
- return new WorkflowInstanceUser(workflowInstance,getClient().getRegistry().getWorkflowExecutionUser(workflowInstance.getExperimentId()));
+ return new WorkflowInstanceUser(workflowInstance,getClient().getRegistry().getExperimentExecutionUser(workflowInstance.getExperimentId()));
} catch (RegistryException e) {
throw new AiravataAPIInvocationException(e);
}
@@ -251,7 +251,7 @@ public class ProvenanceManagerImpl imple
String workflowInstanceId, String metadata)
throws AiravataAPIInvocationException {
try {
- getClient().getRegistry().saveWorkflowExecutionMetadata(experimentId, metadata);
+ getClient().getRegistry().updateExperimentMetadata(experimentId, metadata);
} catch (RegistryException e) {
throw new AiravataAPIInvocationException(e);
}
@@ -277,7 +277,7 @@ public class ProvenanceManagerImpl imple
WorkflowInstance workflowInstance)
throws AiravataAPIInvocationException {
try {
- return new WorkflowInstanceMetadata(workflowInstance, getClient().getRegistry().getWorkflowExecutionMetadata(workflowInstance.getExperimentId()));
+ return new WorkflowInstanceMetadata(workflowInstance, getClient().getRegistry().getExperimentMetadata(workflowInstance.getExperimentId()));
} catch (RegistryException e) {
throw new AiravataAPIInvocationException(e);
}
@@ -286,7 +286,7 @@ public class ProvenanceManagerImpl imple
@Override
public List<String> getExperiments(String owner) throws AiravataAPIInvocationException{
try {
- return getClient().getRegistry().getWorkflowExecutionIdByUser(owner);
+ return getClient().getRegistry().getExperimentIdByUser(owner);
} catch (RegistryException e) {
throw new AiravataAPIInvocationException(e);
}
@@ -318,7 +318,7 @@ public class ProvenanceManagerImpl imple
public List<WorkflowInstanceData> getWorkflowInstances(String user,
int pageSize, int pageNo) throws AiravataAPIInvocationException {
try {
- List<WorkflowExecution> experimentIds = getClient().getRegistry().getWorkflowExecutionByUser(user, pageSize, pageNo);
+ List<WorkflowExecution> experimentIds = getClient().getRegistry().getExperimentByUser(user, pageSize, pageNo);
List<WorkflowInstanceData> list=new ArrayList<WorkflowInstanceData>();
for (WorkflowExecution execution : experimentIds) {
WorkflowInstanceData workflowInstanceData = createWorkflowInstanceData(execution);
@@ -354,7 +354,7 @@ public class ProvenanceManagerImpl imple
public WorkflowInstanceData getWorkflowInstanceData(String experimentId,
String workflowInstanceId) throws AiravataAPIInvocationException {
try {
- return createWorkflowInstanceData(getClient().getRegistry().getWorkflowExecution(experimentId));
+ return createWorkflowInstanceData(getClient().getRegistry().getExperiment(experimentId));
} catch (RegistryException e) {
throw new AiravataAPIInvocationException(e);
}
@@ -385,7 +385,7 @@ public class ProvenanceManagerImpl imple
String workflowInstanceId, String instanceName)
throws AiravataAPIInvocationException {
try {
- getClient().getRegistry().saveWorkflowExecutionName(experimentId, instanceName);
+ getClient().getRegistry().updateExperimentName(experimentId, instanceName);
} catch (RegistryException e) {
throw new AiravataAPIInvocationException(e);
}
@@ -408,7 +408,7 @@ public class ProvenanceManagerImpl imple
WorkflowInstance workflowInstance)
throws AiravataAPIInvocationException {
try {
- return new WorkflowInstanceName(workflowInstance, getClient().getRegistry().getWorkflowExecutionName(workflowInstance.getExperimentId()));
+ return new WorkflowInstanceName(workflowInstance, getClient().getRegistry().getExperimentName(workflowInstance.getExperimentId()));
} catch (RegistryException e) {
throw new AiravataAPIInvocationException(e);
}
Modified: incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/AiravataRegistry1.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/AiravataRegistry1.java?rev=1387248&r1=1387247&r2=1387248&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/AiravataRegistry1.java (original)
+++ incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/AiravataRegistry1.java Tue Sep 18 16:47:51 2012
@@ -234,15 +234,15 @@ public interface AiravataRegistry1 exten
public void deleteHostDescription(String hostId) throws RegistryException;
- public boolean saveWorkflowExecutionServiceInput(WorkflowServiceIOData workflowInputData) throws RegistryException;
+ public boolean saveWorkflowExecutionServiceInput(WorkflowNodeIOData workflowInputData) throws RegistryException;
- public boolean saveWorkflowExecutionServiceOutput(WorkflowServiceIOData workflowOutputData)throws RegistryException;
+ public boolean saveWorkflowExecutionServiceOutput(WorkflowNodeIOData workflowOutputData)throws RegistryException;
- public List<WorkflowServiceIOData> searchWorkflowExecutionServiceInput(String experimentIdRegEx, String workflowNameRegEx, String nodeNameRegEx)throws RegistryException;
+ public List<WorkflowNodeIOData> searchWorkflowExecutionServiceInput(String experimentIdRegEx, String workflowNameRegEx, String nodeNameRegEx)throws RegistryException;
public String getWorkflowExecutionTemplateName(String experimentId) throws RegistryException;
- public List<WorkflowServiceIOData> searchWorkflowExecutionServiceOutput(String experimentIdRegEx, String workflowNameRegEx, String nodeNameRegEx)throws RegistryException;
+ public List<WorkflowNodeIOData> searchWorkflowExecutionServiceOutput(String experimentIdRegEx, String workflowNameRegEx, String nodeNameRegEx)throws RegistryException;
public boolean saveWorkflowExecutionName(String experimentId,String workflowIntanceName)throws RegistryException;
Modified: incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/AiravataRegistryblahblah.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/AiravataRegistryblahblah.java?rev=1387248&r1=1387247&r2=1387248&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/AiravataRegistryblahblah.java (original)
+++ incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/AiravataRegistryblahblah.java Tue Sep 18 16:47:51 2012
@@ -234,15 +234,15 @@ public interface AiravataRegistryblahbla
public void deleteHostDescription(String hostId) throws RegistryException;
- public boolean saveWorkflowExecutionServiceInput(WorkflowServiceIOData workflowInputData) throws RegistryException;
+ public boolean saveWorkflowExecutionServiceInput(WorkflowNodeIOData workflowInputData) throws RegistryException;
- public boolean saveWorkflowExecutionServiceOutput(WorkflowServiceIOData workflowOutputData)throws RegistryException;
+ public boolean saveWorkflowExecutionServiceOutput(WorkflowNodeIOData workflowOutputData)throws RegistryException;
- public List<WorkflowServiceIOData> searchWorkflowExecutionServiceInput(String experimentIdRegEx, String workflowNameRegEx, String nodeNameRegEx)throws RegistryException;
+ public List<WorkflowNodeIOData> searchWorkflowExecutionServiceInput(String experimentIdRegEx, String workflowNameRegEx, String nodeNameRegEx)throws RegistryException;
public String getWorkflowExecutionTemplateName(String experimentId) throws RegistryException;
- public List<WorkflowServiceIOData> searchWorkflowExecutionServiceOutput(String experimentIdRegEx, String workflowNameRegEx, String nodeNameRegEx)throws RegistryException;
+ public List<WorkflowNodeIOData> searchWorkflowExecutionServiceOutput(String experimentIdRegEx, String workflowNameRegEx, String nodeNameRegEx)throws RegistryException;
public boolean saveWorkflowExecutionName(String experimentId,String workflowIntanceName)throws RegistryException;
Modified: incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/ProvenanceRegistry.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/ProvenanceRegistry.java?rev=1387248&r1=1387247&r2=1387248&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/ProvenanceRegistry.java (original)
+++ incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/ProvenanceRegistry.java Tue Sep 18 16:47:51 2012
@@ -31,6 +31,15 @@ import org.apache.airavata.registry.api.
public interface ProvenanceRegistry extends AiravataSubRegistry{
/*------------------------------------------- Experiment data ---------------------------------------------*/
+
+ /**
+ * Returns true if the experiment exists
+ * @param experimentId
+ * @return
+ * @throws RegistryException
+ */
+ public abstract boolean isExperimentExists(String experimentId) throws RegistryException;
+
/**
* Save the username of the user who runs this experiment
* @param experimentId
@@ -38,7 +47,7 @@ public interface ProvenanceRegistry exte
* @return
* @throws RegistryException
*/
- public abstract boolean saveWorkflowExecutionUser(String experimentId, String user) throws RegistryException;
+ public abstract boolean updateExperimentExecutionUser(String experimentId, String user) throws RegistryException;
/**
* Retrieve the user who is runing the experiment
@@ -46,7 +55,7 @@ public interface ProvenanceRegistry exte
* @return
* @throws RegistryException
*/
- public abstract String getWorkflowExecutionUser(String experimentId) throws RegistryException;
+ public abstract String getExperimentExecutionUser(String experimentId) throws RegistryException;
/**
* Get the name of the workflow intance
@@ -54,7 +63,7 @@ public interface ProvenanceRegistry exte
* @return
* @throws RegistryException
*/
- public abstract String getWorkflowExecutionName(String experimentId) throws RegistryException;
+ public abstract String getExperimentName(String experimentId) throws RegistryException;
/**
* Save a name for this workflow execution
@@ -63,42 +72,15 @@ public interface ProvenanceRegistry exte
* @return
* @throws RegistryException
*/
- public abstract boolean saveWorkflowExecutionName(String experimentId,String workflowIntanceName)throws RegistryException;
+ public abstract boolean updateExperimentName(String experimentId,String workflowIntanceName)throws RegistryException;
- /**
- * Save a status for this workflow execution with the current time at the moment
- * @param experimentId
- * @param status - contains the status
- * @return
- * @throws RegistryException
- */
- public abstract boolean saveWorkflowExecutionStatus(String experimentId,ExecutionStatus status)throws RegistryException;
-
- /**
- * Save a status for this workflow execution
- * @param experimentId
- * @param status - contains the status
- * @return
- * @throws RegistryException
- */
- public abstract boolean saveWorkflowExecutionStatus(String experimentId,WorkflowInstanceStatus status)throws RegistryException;
-
-
- /**
- * Return the status of the execution
- * @param experimentId
- * @return
- * @throws RegistryException
- */
- public abstract WorkflowInstanceStatus getWorkflowExecutionStatus(String experimentId)throws RegistryException;
-
/**
* Return the metadata information saved for the experiment
* @param experimentId
* @return
* @throws RegistryException
*/
- public abstract String getWorkflowExecutionMetadata(String experimentId) throws RegistryException;
+ public abstract String getExperimentMetadata(String experimentId) throws RegistryException;
/**
* Save the metadata for the experiment
@@ -107,7 +89,7 @@ public interface ProvenanceRegistry exte
* @return
* @throws RegistryException
*/
- public abstract boolean saveWorkflowExecutionMetadata(String experimentId, String metadata) throws RegistryException;
+ public abstract boolean updateExperimentMetadata(String experimentId, String metadata) throws RegistryException;
/**
* Return the template name of the workflow that this intance was created from
@@ -126,15 +108,46 @@ public interface ProvenanceRegistry exte
*/
public abstract void setWorkflowExecutionTemplateName(String experimentId, String workflowInstanceId) throws RegistryException;
+ public List<WorkflowInstance> getExperimentWorkflowInstances(String experimentId) throws RegistryException;
/*-------------------------------------- Experiment Workflow instance node data ----------------------------------------*/
+
+ public boolean isWorkflowInstanceExists(String instanceId) throws RegistryException;
+
+ /**
+ * Save a status for this workflow execution with the current time at the moment
+ * @param instanceId
+ * @param status - contains the status
+ * @return
+ * @throws RegistryException
+ */
+ public abstract boolean updateWorkflowInstanceStatus(String instanceId,ExecutionStatus status)throws RegistryException;
+
+ /**
+ * Save a status for this workflow execution
+ * @param instanceId
+ * @param status - contains the status
+ * @return
+ * @throws RegistryException
+ */
+ public abstract boolean updateWorkflowInstanceStatus(String instanceId,WorkflowInstanceStatus status)throws RegistryException;
+
+
+ /**
+ * Return the status of the execution
+ * @param instanceId
+ * @return
+ * @throws RegistryException
+ */
+ public abstract WorkflowInstanceStatus getWorkflowInstanceStatus(String instanceId)throws RegistryException;
+
/**
* Save the input data of a node in the workflow instance of an experiment
* @param workflowInputData
* @return true if successfully saved
* @throws RegistryException
*/
- public abstract boolean saveWorkflowExecutionServiceInput(WorkflowServiceIOData workflowInputData) throws RegistryException;
+ public abstract boolean updateWorkflowNodeInput(WorkflowNodeIOData workflowInputData) throws RegistryException;
/**
* Save the output data of a node in the workflow instance of an experiment
@@ -142,7 +155,7 @@ public interface ProvenanceRegistry exte
* @return true if successfully saved
* @throws RegistryException
*/
- public abstract boolean saveWorkflowExecutionServiceOutput(WorkflowServiceIOData workflowOutputData)throws RegistryException;
+ public abstract boolean updateWorkflowNodeOutput(WorkflowNodeIOData workflowOutputData)throws RegistryException;
/**
* Return a list of data passed as input for service node which regex matched nodeId, workflow template id & experiment id
@@ -152,7 +165,7 @@ public interface ProvenanceRegistry exte
* @return
* @throws RegistryException
*/
- public abstract List<WorkflowServiceIOData> searchWorkflowExecutionServiceInput(String experimentIdRegEx, String workflowNameRegEx, String nodeNameRegEx)throws RegistryException;
+ public abstract List<WorkflowNodeIOData> searchWorkflowInstanceNodeInput(String experimentIdRegEx, String workflowNameRegEx, String nodeNameRegEx)throws RegistryException;
/**
* Return a list of data returned as output from service node which regex matched nodeId, workflow template id & experiment id
@@ -162,7 +175,11 @@ public interface ProvenanceRegistry exte
* @return
* @throws RegistryException
*/
- public abstract List<WorkflowServiceIOData> searchWorkflowExecutionServiceOutput(String experimentIdRegEx, String workflowNameRegEx, String nodeNameRegEx)throws RegistryException;
+ public abstract List<WorkflowNodeIOData> searchWorkflowInstanceNodeOutput(String experimentIdRegEx, String workflowNameRegEx, String nodeNameRegEx)throws RegistryException;
+
+ public abstract List<WorkflowNodeIOData> getWorkflowInstanceNodeInput(String workflowInstanceId, String nodeType)throws RegistryException;
+
+ public abstract List<WorkflowNodeIOData> getWorkflowInstanceNodeOutput(String workflowInstanceId, String nodeType)throws RegistryException;
/**
* Saves the results of output nodes in a workflow
@@ -187,6 +204,7 @@ public interface ProvenanceRegistry exte
/**
* Get the output results of a output node of an experiment
+ * @deprecated
* @param experimentId - also the workflow id
* @param outputNodeName
* @return
@@ -196,6 +214,7 @@ public interface ProvenanceRegistry exte
/**
* Get the list of output node results of an experiment
+ * @deprecated
* @param experimentId - also the workflow id
* @return
* @throws RegistryException
@@ -204,6 +223,7 @@ public interface ProvenanceRegistry exte
/**
* Get the names of the output nodes of a workflow instance run
+ * @deprecated
* @param exeperimentId - also the workflow id
* @return
* @throws RegistryException
@@ -217,7 +237,7 @@ public interface ProvenanceRegistry exte
* @return
* @throws RegistryException
*/
- public abstract WorkflowExecution getWorkflowExecution(String experimentId) throws RegistryException;
+ public abstract WorkflowExecution getExperiment(String experimentId) throws RegistryException;
/**
* Return experiment ids of experiments launched by the given user
@@ -225,7 +245,7 @@ public interface ProvenanceRegistry exte
* @return - experiment id list
* @throws RegistryException
*/
- public abstract List<String> getWorkflowExecutionIdByUser(String user) throws RegistryException;
+ public abstract List<String> getExperimentIdByUser(String user) throws RegistryException;
/**
* Return experiments launched by the given user
@@ -233,7 +253,7 @@ public interface ProvenanceRegistry exte
* @return experiment object list each populated by current data of that experiment
* @throws RegistryException
*/
- public abstract List<WorkflowExecution> getWorkflowExecutionByUser(String user) throws RegistryException;
+ public abstract List<WorkflowExecution> getExperimentByUser(String user) throws RegistryException;
/**
* Return the pageNo set of experiments launched by the given user if grouped in to pages of size pageSize
@@ -243,7 +263,7 @@ public interface ProvenanceRegistry exte
* @return
* @throws RegistryException
*/
- public abstract List<WorkflowExecution> getWorkflowExecutionByUser(String user, int pageSize, int pageNo) throws RegistryException;
+ public abstract List<WorkflowExecution> getExperimentByUser(String user, int pageSize, int pageNo) throws RegistryException;
/**
* This store set of metadata for each Workflow Run, Not the workflowNode Specific data, just full workflow Run specific data
Modified: incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/impl/AiravataJCRRegistry.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/impl/AiravataJCRRegistry.java?rev=1387248&r1=1387247&r2=1387248&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/impl/AiravataJCRRegistry.java (original)
+++ incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/impl/AiravataJCRRegistry.java Tue Sep 18 16:47:51 2012
@@ -821,22 +821,22 @@ public class AiravataJCRRegistry extends
return false;
}
- public boolean saveWorkflowExecutionServiceInput(WorkflowServiceIOData workflowInputData) throws RegistryException{
+ public boolean saveWorkflowExecutionServiceInput(WorkflowNodeIOData workflowInputData) throws RegistryException{
if (getProvenanceRegistry()!=null){
- return getProvenanceRegistry().saveWorkflowExecutionServiceInput(workflowInputData);
+ return getProvenanceRegistry().updateWorkflowNodeInput(workflowInputData);
}
return saveWorkflowIO(workflowInputData, INPUT);
}
- public boolean saveWorkflowExecutionServiceOutput(WorkflowServiceIOData workflowOutputData) throws RegistryException{
+ public boolean saveWorkflowExecutionServiceOutput(WorkflowNodeIOData workflowOutputData) throws RegistryException{
if (getProvenanceRegistry()!=null){
- return getProvenanceRegistry().saveWorkflowExecutionServiceOutput(workflowOutputData);
+ return getProvenanceRegistry().updateWorkflowNodeOutput(workflowOutputData);
}
return saveWorkflowIO(workflowOutputData, OUTPUT);
}
- private boolean saveWorkflowIO(WorkflowServiceIOData workflowOutputData, String type) throws RegistryException{
+ private boolean saveWorkflowIO(WorkflowNodeIOData workflowOutputData, String type) throws RegistryException{
Session session = null;
boolean isSaved = true;
try {
@@ -855,18 +855,18 @@ public class AiravataJCRRegistry extends
return isSaved;
}
- public List<WorkflowServiceIOData> searchWorkflowExecutionServiceInput(String experimentIdRegEx, String workflowNameRegEx,
+ public List<WorkflowNodeIOData> searchWorkflowExecutionServiceInput(String experimentIdRegEx, String workflowNameRegEx,
String nodeNameRegEx) throws RegistryException{
if (getProvenanceRegistry()!=null){
- return getProvenanceRegistry().searchWorkflowExecutionServiceInput(experimentIdRegEx, workflowNameRegEx, nodeNameRegEx);
+ return getProvenanceRegistry().searchWorkflowInstanceNodeInput(experimentIdRegEx, workflowNameRegEx, nodeNameRegEx);
}
return searchWorkflowIO(experimentIdRegEx, workflowNameRegEx, nodeNameRegEx, INPUT);
}
- public List<WorkflowServiceIOData> searchWorkflowExecutionServiceOutput(String experimentIdRegEx, String workflowNameRegEx,
+ public List<WorkflowNodeIOData> searchWorkflowExecutionServiceOutput(String experimentIdRegEx, String workflowNameRegEx,
String nodeNameRegEx) throws RegistryException{
if (getProvenanceRegistry()!=null){
- return getProvenanceRegistry().searchWorkflowExecutionServiceOutput(experimentIdRegEx, workflowNameRegEx, nodeNameRegEx);
+ return getProvenanceRegistry().searchWorkflowInstanceNodeOutput(experimentIdRegEx, workflowNameRegEx, nodeNameRegEx);
}
return searchWorkflowIO(experimentIdRegEx, workflowNameRegEx, nodeNameRegEx, OUTPUT);
}
@@ -893,9 +893,9 @@ public class AiravataJCRRegistry extends
return null;
}
- private List<WorkflowServiceIOData> searchWorkflowIO(String experimentIdRegEx, String workflowNameRegEx,
+ private List<WorkflowNodeIOData> searchWorkflowIO(String experimentIdRegEx, String workflowNameRegEx,
String nodeNameRegEx, String type) throws RegistryException{
- List<WorkflowServiceIOData> workflowIODataList = new ArrayList<WorkflowServiceIOData>();
+ List<WorkflowNodeIOData> workflowIODataList = new ArrayList<WorkflowNodeIOData>();
Session session = null;
try {
session = getSession();
@@ -923,7 +923,7 @@ public class AiravataJCRRegistry extends
}
Node ioNode = getOrAddNode(serviceNode, type);
if (ioNode.hasProperty(PROPERTY_WORKFLOW_IO_CONTENT)) {
- WorkflowServiceIOData workflowIOData = new WorkflowServiceIOData();
+ WorkflowNodeIOData workflowIOData = new WorkflowNodeIOData();
workflowIOData.setExperimentId(experimentNode
.getName());
workflowIOData
@@ -947,7 +947,7 @@ public class AiravataJCRRegistry extends
public boolean saveWorkflowExecutionStatus(String experimentId,WorkflowInstanceStatus status)throws RegistryException{
if (getProvenanceRegistry()!=null){
- return getProvenanceRegistry().saveWorkflowExecutionStatus(experimentId, status.getExecutionStatus());
+ return getProvenanceRegistry().updateWorkflowInstanceStatus(experimentId, status.getExecutionStatus());
}
Session session = null;
boolean isSaved = true;
@@ -973,7 +973,7 @@ public class AiravataJCRRegistry extends
public WorkflowInstanceStatus getWorkflowExecutionStatus(String experimentId)throws RegistryException{
if (getProvenanceRegistry()!=null){
- return getProvenanceRegistry().getWorkflowExecutionStatus(experimentId);
+ return getProvenanceRegistry().getWorkflowInstanceStatus(experimentId);
}
Session session = null;
WorkflowInstanceStatus property = null;
@@ -1166,7 +1166,7 @@ public class AiravataJCRRegistry extends
public boolean saveWorkflowExecutionUser(String experimentId, String user)
throws RegistryException {
if (getProvenanceRegistry()!=null){
- return getProvenanceRegistry().saveWorkflowExecutionUser(experimentId, user);
+ return getProvenanceRegistry().updateExperimentExecutionUser(experimentId, user);
}
Session session = null;
boolean isSaved = true;
@@ -1195,7 +1195,7 @@ public class AiravataJCRRegistry extends
public String getWorkflowExecutionUser(String experimentId)
throws RegistryException {
if (getProvenanceRegistry()!=null){
- return getProvenanceRegistry().getWorkflowExecutionUser(experimentId);
+ return getProvenanceRegistry().getExperimentExecutionUser(experimentId);
}
Session session = null;
String property = null;
@@ -1218,7 +1218,7 @@ public class AiravataJCRRegistry extends
public WorkflowExecution getWorkflowExecution(String experimentId)
throws RegistryException {
if (getProvenanceRegistry()!=null){
- return getProvenanceRegistry().getWorkflowExecution(experimentId);
+ return getProvenanceRegistry().getExperiment(experimentId);
}
WorkflowExecution workflowExecution = new WorkflowExecutionImpl();
workflowExecution.setExperimentId(experimentId);
@@ -1248,7 +1248,7 @@ public class AiravataJCRRegistry extends
public List<String> getWorkflowExecutionIdByUser(String user)
throws RegistryException {
if (getProvenanceRegistry()!=null){
- return getProvenanceRegistry().getWorkflowExecutionIdByUser(user);
+ return getProvenanceRegistry().getExperimentIdByUser(user);
}
Session session = null;
List<String> ids=new ArrayList<String>();
@@ -1273,7 +1273,7 @@ public class AiravataJCRRegistry extends
public List<WorkflowExecution> getWorkflowExecutionByUser(String user)
throws RegistryException {
if (getProvenanceRegistry()!=null){
- return getProvenanceRegistry().getWorkflowExecutionByUser(user);
+ return getProvenanceRegistry().getExperimentByUser(user);
}
return getWorkflowExecution(user,-1,-1);
}
@@ -1298,7 +1298,7 @@ public class AiravataJCRRegistry extends
public List<WorkflowExecution> getWorkflowExecutionByUser(String user,
int pageSize, int pageNo) throws RegistryException {
if (getProvenanceRegistry()!=null){
- return getProvenanceRegistry().getWorkflowExecutionByUser(user, pageSize, pageNo);
+ return getProvenanceRegistry().getExperimentByUser(user, pageSize, pageNo);
}
return getWorkflowExecution(user,pageSize*pageNo,pageSize*(pageNo+1));
}
@@ -1306,7 +1306,7 @@ public class AiravataJCRRegistry extends
public String getWorkflowExecutionMetadata(String experimentId)
throws RegistryException {
if (getProvenanceRegistry()!=null){
- return getProvenanceRegistry().getWorkflowExecutionMetadata(experimentId);
+ return getProvenanceRegistry().getExperimentMetadata(experimentId);
}
Session session = null;
String property = null;
@@ -1329,7 +1329,7 @@ public class AiravataJCRRegistry extends
public boolean saveWorkflowExecutionMetadata(String experimentId,
String metadata) throws RegistryException {
if (getProvenanceRegistry()!=null){
- return getProvenanceRegistry().saveWorkflowExecutionMetadata(experimentId, metadata);
+ return getProvenanceRegistry().updateExperimentMetadata(experimentId, metadata);
}
Session session = null;
boolean isSaved = true;
@@ -1351,7 +1351,7 @@ public class AiravataJCRRegistry extends
public boolean saveWorkflowExecutionStatus(String experimentId,
ExecutionStatus status) throws RegistryException {
if (getProvenanceRegistry()!=null){
- return getProvenanceRegistry().saveWorkflowExecutionStatus(experimentId, status);
+ return getProvenanceRegistry().updateWorkflowInstanceStatus(experimentId, status);
}
return saveWorkflowExecutionStatus(experimentId,new WorkflowInstanceStatus(new WorkflowInstance(experimentId, experimentId), status));
}
@@ -1360,7 +1360,7 @@ public class AiravataJCRRegistry extends
public boolean saveWorkflowExecutionName(String experimentId,
String workflowIntanceName) throws RegistryException {
if (getProvenanceRegistry()!=null){
- return getProvenanceRegistry().saveWorkflowExecutionName(experimentId, workflowIntanceName);
+ return getProvenanceRegistry().updateExperimentName(experimentId, workflowIntanceName);
}
Session session = null;
boolean isSaved = true;
@@ -1382,7 +1382,7 @@ public class AiravataJCRRegistry extends
public String getWorkflowExecutionName(String experimentId)
throws RegistryException {
if (getProvenanceRegistry()!=null){
- return getProvenanceRegistry().getWorkflowExecutionName(experimentId);
+ return getProvenanceRegistry().getExperimentName(experimentId);
}
Session session = null;
String property = null;
Modified: incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/impl/WorkflowExecutionImpl.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/impl/WorkflowExecutionImpl.java?rev=1387248&r1=1387247&r2=1387248&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/impl/WorkflowExecutionImpl.java (original)
+++ incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/impl/WorkflowExecutionImpl.java Tue Sep 18 16:47:51 2012
@@ -27,13 +27,13 @@ import java.util.List;
import org.apache.airavata.registry.api.workflow.WorkflowExecution;
import org.apache.airavata.registry.api.workflow.WorkflowInstanceStatus;
import org.apache.airavata.registry.api.workflow.WorkflowIOData;
-import org.apache.airavata.registry.api.workflow.WorkflowServiceIOData;
+import org.apache.airavata.registry.api.workflow.WorkflowNodeIOData;
public class WorkflowExecutionImpl implements WorkflowExecution{
private WorkflowInstanceStatus executionStatus;
private String user;
- private List<WorkflowServiceIOData> serviceInput;
- private List<WorkflowServiceIOData> serviceOutput;
+ private List<WorkflowNodeIOData> serviceInput;
+ private List<WorkflowNodeIOData> serviceOutput;
private List<WorkflowIOData> output;
private String experimentId;
private String metadata;
@@ -69,22 +69,22 @@ public class WorkflowExecutionImpl imple
public void setUser(String user) {
this.user = user;
}
- public List<WorkflowServiceIOData> getServiceInput() {
+ public List<WorkflowNodeIOData> getServiceInput() {
if (serviceInput==null){
- serviceInput=new ArrayList<WorkflowServiceIOData>();
+ serviceInput=new ArrayList<WorkflowNodeIOData>();
}
return serviceInput;
}
- public void setServiceInput(List<WorkflowServiceIOData> serviceInput) {
+ public void setServiceInput(List<WorkflowNodeIOData> serviceInput) {
this.serviceInput = serviceInput;
}
- public List<WorkflowServiceIOData> getServiceOutput() {
+ public List<WorkflowNodeIOData> getServiceOutput() {
if (serviceOutput==null){
- serviceOutput=new ArrayList<WorkflowServiceIOData>();
+ serviceOutput=new ArrayList<WorkflowNodeIOData>();
}
return serviceOutput;
}
- public void setServiceOutput(List<WorkflowServiceIOData> serviceOutput) {
+ public void setServiceOutput(List<WorkflowNodeIOData> serviceOutput) {
this.serviceOutput = serviceOutput;
}
public List<WorkflowIOData> getOutput() {
@@ -97,24 +97,24 @@ public class WorkflowExecutionImpl imple
this.output = output;
}
- public void addServiceInput(WorkflowServiceIOData serviceInput) {
+ public void addServiceInput(WorkflowNodeIOData serviceInput) {
getServiceInput().add(serviceInput);
}
- public void addServiceOutput(WorkflowServiceIOData serviceOutput) {
+ public void addServiceOutput(WorkflowNodeIOData serviceOutput) {
getServiceOutput().add(serviceOutput);
}
public void addOutput(WorkflowIOData output) {
getOutput().add(output);
}
- public WorkflowServiceIOData getServiceInput(String nodeId) {
- return (WorkflowServiceIOData)getIOData(nodeId, getServiceInput());
+ public WorkflowNodeIOData getServiceInput(String nodeId) {
+ return (WorkflowNodeIOData)getIOData(nodeId, getServiceInput());
}
- public WorkflowServiceIOData getServiceOutput(String nodeId) {
- return (WorkflowServiceIOData)getIOData(nodeId, getServiceOutput());
+ public WorkflowNodeIOData getServiceOutput(String nodeId) {
+ return (WorkflowNodeIOData)getIOData(nodeId, getServiceOutput());
}
public WorkflowIOData getOutput(String nodeId) {
- return (WorkflowServiceIOData)getIOData(nodeId, getOutput());
+ return (WorkflowNodeIOData)getIOData(nodeId, getOutput());
}
private WorkflowIOData getIOData(String nodeId, List<?> list) {
Modified: incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowExecution.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowExecution.java?rev=1387248&r1=1387247&r2=1387248&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowExecution.java (original)
+++ incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowExecution.java Tue Sep 18 16:47:51 2012
@@ -29,11 +29,11 @@ public interface WorkflowExecution {
public String getTopic();
public WorkflowInstanceStatus getExecutionStatus();
public String getUser();
- public List<WorkflowServiceIOData> getServiceInput();
- public List<WorkflowServiceIOData> getServiceOutput();
+ public List<WorkflowNodeIOData> getServiceInput();
+ public List<WorkflowNodeIOData> getServiceOutput();
public List<WorkflowIOData> getOutput();
- public WorkflowServiceIOData getServiceInput(String nodeId);
- public WorkflowServiceIOData getServiceOutput(String nodeId);
+ public WorkflowNodeIOData getServiceInput(String nodeId);
+ public WorkflowNodeIOData getServiceOutput(String nodeId);
public WorkflowIOData getOutput(String nodeId);
public String getMetadata();
public String getWorkflowInstanceName();
@@ -42,11 +42,11 @@ public interface WorkflowExecution {
public void setTopic(String topic);
public void setExecutionStatus(WorkflowInstanceStatus executionStatus);
public void setUser(String user);
- public void setServiceInput(List<WorkflowServiceIOData> serviceInputs);
- public void setServiceOutput(List<WorkflowServiceIOData> serviceOutputs);
+ public void setServiceInput(List<WorkflowNodeIOData> serviceInputs);
+ public void setServiceOutput(List<WorkflowNodeIOData> serviceOutputs);
public void setOutput(List<WorkflowIOData> outputs);
- public void addServiceInput(WorkflowServiceIOData serviceInput);
- public void addServiceOutput(WorkflowServiceIOData serviceOutput);
+ public void addServiceInput(WorkflowNodeIOData serviceInput);
+ public void addServiceOutput(WorkflowNodeIOData serviceOutput);
public void addOutput(WorkflowIOData output);
public void setMetadata(String metadata);
public void setWorkflowInstanceName(String workflowInstanceName);
Modified: incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowInstanceNodePortData.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowInstanceNodePortData.java?rev=1387248&r1=1387247&r2=1387248&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowInstanceNodePortData.java (original)
+++ incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowInstanceNodePortData.java Tue Sep 18 16:47:51 2012
@@ -21,10 +21,10 @@
package org.apache.airavata.registry.api.workflow;
-public class WorkflowInstanceNodePortData extends WorkflowServiceIOData {
+public class WorkflowInstanceNodePortData extends WorkflowNodeIOData {
private WorkflowInstanceNode workflowInstanceNode;
- public WorkflowInstanceNodePortData(WorkflowServiceIOData data) {
+ public WorkflowInstanceNodePortData(WorkflowNodeIOData data) {
workflowInstanceNode=new WorkflowInstanceNode(new WorkflowInstance(data.getExperimentId(), data.getWorkflowId()),data.getNodeId());
workflowInstanceNode.getWorkflowInstance().setWorkflowName(data.getWorkflowName());
setValue(data.getValue());
Modified: incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowNodeGramData.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowNodeGramData.java?rev=1387248&r1=1387247&r2=1387248&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowNodeGramData.java (original)
+++ incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowNodeGramData.java Tue Sep 18 16:47:51 2012
@@ -25,12 +25,14 @@ public class WorkflowNodeGramData {
String rsl;
String invokedHost;
String gramJobID;
+ private String workflowInstanceId;
- public WorkflowNodeGramData(String nodeID, String rsl, String invokedHost, String gramJobID) {
+ public WorkflowNodeGramData(String workflowInstanceId, String nodeID, String rsl, String invokedHost, String gramJobID) {
NodeID = nodeID;
this.rsl = rsl;
this.invokedHost = invokedHost;
this.gramJobID = gramJobID;
+ this.setWorkflowInstanceId(workflowInstanceId);
}
public void setNodeID(String nodeID) {
@@ -64,4 +66,12 @@ public class WorkflowNodeGramData {
public String getGramJobID() {
return gramJobID;
}
+
+ public String getWorkflowInstanceId() {
+ return workflowInstanceId;
+ }
+
+ public void setWorkflowInstanceId(String workflowInstanceId) {
+ this.workflowInstanceId = workflowInstanceId;
+ }
}
Copied: incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowNodeIOData.java (from r1386978, incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowServiceIOData.java)
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowNodeIOData.java?p2=incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowNodeIOData.java&p1=incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowServiceIOData.java&r1=1386978&r2=1387248&rev=1387248&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowServiceIOData.java (original)
+++ incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowNodeIOData.java Tue Sep 18 16:47:51 2012
@@ -21,7 +21,7 @@
package org.apache.airavata.registry.api.workflow;
-public class WorkflowServiceIOData extends WorkflowIOData {
+public class WorkflowNodeIOData extends WorkflowIOData {
private String experimentId;
private String workflowName;
private String workflowId;
@@ -33,10 +33,10 @@ public class WorkflowServiceIOData exten
private WorkflowInstanceStatus nodeStatus = new
WorkflowInstanceStatus(new WorkflowInstance(experimentId,workflowId,workflowName), WorkflowInstanceStatus.ExecutionStatus.STARTED);
- public WorkflowServiceIOData() {
+ public WorkflowNodeIOData() {
}
- public WorkflowServiceIOData(String data, String experimentId,String workflowInstanceID, String workflowId,
+ public WorkflowNodeIOData(String data, String experimentId,String workflowInstanceID, String workflowId,
String nodeId,String workflowName) {
super(nodeId,data);
setExperimentId(experimentId);
@@ -45,12 +45,12 @@ public class WorkflowServiceIOData exten
setWorkflowName(workflowName);
}
- public WorkflowServiceIOData(String data, String experimentId,String workflowInstanceID,
+ public WorkflowNodeIOData(String data, String experimentId,String workflowInstanceID,
String nodeId,String workflowName) {
this(data, experimentId, experimentId,workflowInstanceID, nodeId, workflowName);
}
- public WorkflowServiceIOData(String experimentId,String workflowInstanceID, String workflowName, String workflowId, WorkflowNodeType nodeType) {
+ public WorkflowNodeIOData(String experimentId,String workflowInstanceID, String workflowName, String workflowId, WorkflowNodeType nodeType) {
this.experimentId = experimentId;
this.workflowInstanceId = workflowInstanceID;
this.workflowName = workflowName;
Modified: incubator/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/AiravataJPARegistry.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/AiravataJPARegistry.java?rev=1387248&r1=1387247&r2=1387248&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/AiravataJPARegistry.java (original)
+++ incubator/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/AiravataJPARegistry.java Tue Sep 18 16:47:51 2012
@@ -76,7 +76,7 @@ import org.apache.airavata.registry.api.
import org.apache.airavata.registry.api.workflow.WorkflowInstanceStatus.ExecutionStatus;
import org.apache.airavata.registry.api.workflow.WorkflowNodeGramData;
import org.apache.airavata.registry.api.workflow.WorkflowRunTimeData;
-import org.apache.airavata.registry.api.workflow.WorkflowServiceIOData;
+import org.apache.airavata.registry.api.workflow.WorkflowNodeIOData;
import org.apache.xmlbeans.XmlException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -755,42 +755,42 @@ public class AiravataJPARegistry extends
@Override
- public WorkflowExecution getWorkflowExecution(String arg0)
+ public WorkflowExecution getExperiment(String arg0)
throws RegistryException {
// TODO Auto-generated method stub
return null;
}
@Override
- public List<WorkflowExecution> getWorkflowExecutionByUser(String arg0)
+ public List<WorkflowExecution> getExperimentByUser(String arg0)
throws RegistryException {
// TODO Auto-generated method stub
return null;
}
@Override
- public List<WorkflowExecution> getWorkflowExecutionByUser(String arg0,
+ public List<WorkflowExecution> getExperimentByUser(String arg0,
int arg1, int arg2) throws RegistryException {
// TODO Auto-generated method stub
return null;
}
@Override
- public List<String> getWorkflowExecutionIdByUser(String arg0)
+ public List<String> getExperimentIdByUser(String arg0)
throws RegistryException {
// TODO Auto-generated method stub
return null;
}
@Override
- public String getWorkflowExecutionMetadata(String arg0)
+ public String getExperimentMetadata(String arg0)
throws RegistryException {
// TODO Auto-generated method stub
return null;
}
@Override
- public String getWorkflowExecutionName(String arg0)
+ public String getExperimentName(String arg0)
throws RegistryException {
// TODO Auto-generated method stub
return null;
@@ -811,7 +811,7 @@ public class AiravataJPARegistry extends
q.setParameter("workflow_InstanceID", instanceID);
q.setParameter("node_id", nodeID);
Node_Data singleResult = (Node_Data) q.getSingleResult();
- WorkflowServiceIOData workflowIOData = new WorkflowServiceIOData(singleResult.getOutputs(),instanceID,instanceID,null,nodeID,null);
+ WorkflowNodeIOData workflowIOData = new WorkflowNodeIOData(singleResult.getOutputs(),instanceID,instanceID,null,nodeID,null);
return workflowIOData;
}
@@ -823,7 +823,7 @@ public class AiravataJPARegistry extends
}
@Override
- public WorkflowInstanceStatus getWorkflowExecutionStatus(String instanceID)
+ public WorkflowInstanceStatus getWorkflowInstanceStatus(String instanceID)
throws RegistryException {
EntityManager em = ResourceUtils.getEntityManager();
em.getTransaction().begin();
@@ -837,7 +837,7 @@ public class AiravataJPARegistry extends
}
@Override
- public String getWorkflowExecutionUser(String arg0)
+ public String getExperimentExecutionUser(String arg0)
throws RegistryException {
return null;
@@ -870,14 +870,14 @@ public class AiravataJPARegistry extends
}
@Override
- public boolean saveWorkflowExecutionMetadata(String arg0, String arg1)
+ public boolean updateExperimentMetadata(String arg0, String arg1)
throws RegistryException {
// TODO Auto-generated method stub
return true;
}
@Override
- public boolean saveWorkflowExecutionName(String arg0, String arg1)
+ public boolean updateExperimentName(String arg0, String arg1)
throws RegistryException {
// TODO Auto-generated method stub
@@ -911,7 +911,7 @@ public class AiravataJPARegistry extends
}
@Override
- public boolean saveWorkflowExecutionServiceInput(WorkflowServiceIOData arg0)
+ public boolean updateWorkflowNodeInput(WorkflowNodeIOData arg0)
throws RegistryException {
// TODO Auto-generated method stub
EntityManager em = ResourceUtils.getEntityManager();
@@ -937,7 +937,7 @@ public class AiravataJPARegistry extends
}
@Override
- public boolean saveWorkflowExecutionServiceOutput(WorkflowServiceIOData arg0)
+ public boolean updateWorkflowNodeOutput(WorkflowNodeIOData arg0)
throws RegistryException {
// TODO Auto-generated method stub
@@ -962,7 +962,7 @@ public class AiravataJPARegistry extends
}
@Override
- public boolean saveWorkflowExecutionStatus(String arg0, ExecutionStatus arg1)
+ public boolean updateWorkflowInstanceStatus(String arg0, ExecutionStatus arg1)
throws RegistryException {
// TODO Auto-generated method stub
@@ -982,7 +982,7 @@ public class AiravataJPARegistry extends
}
@Override
- public boolean saveWorkflowExecutionUser(String arg0, String arg1)
+ public boolean updateExperimentExecutionUser(String arg0, String arg1)
throws RegistryException {
// TODO Auto-generated method stub
return false;
@@ -1062,7 +1062,7 @@ public class AiravataJPARegistry extends
}
@Override
- public List<WorkflowServiceIOData> searchWorkflowExecutionServiceInput(
+ public List<WorkflowNodeIOData> searchWorkflowInstanceNodeInput(
String arg0, String arg1, String arg2) throws RegistryException {
// TODO Auto-generated method stub
@@ -1070,7 +1070,7 @@ public class AiravataJPARegistry extends
}
@Override
- public List<WorkflowServiceIOData> searchWorkflowExecutionServiceOutput(
+ public List<WorkflowNodeIOData> searchWorkflowInstanceNodeOutput(
String arg0, String arg1, String arg2) throws RegistryException {
// TODO Auto-generated method stub
return null;
@@ -1091,10 +1091,52 @@ public class AiravataJPARegistry extends
}
@Override
- public boolean saveWorkflowExecutionStatus(String experimentId,
+ public boolean updateWorkflowInstanceStatus(String experimentId,
WorkflowInstanceStatus status) throws RegistryException {
// TODO Auto-generated method stub
return false;
}
+
+ @Override
+ public boolean isExperimentExists(String experimentId)
+ throws RegistryException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+
+ @Override
+ public List<WorkflowInstance> getExperimentWorkflowInstances(
+ String experimentId) throws RegistryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+
+ @Override
+ public boolean isWorkflowInstanceExists(String instanceId)
+ throws RegistryException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+
+ @Override
+ public List<WorkflowNodeIOData> getWorkflowInstanceNodeInput(
+ String workflowInstanceId, String nodeType)
+ throws RegistryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+
+ @Override
+ public List<WorkflowNodeIOData> getWorkflowInstanceNodeOutput(
+ String workflowInstanceId, String nodeType)
+ throws RegistryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
}
Modified: incubator/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/AbstractResource.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/AbstractResource.java?rev=1387248&r1=1387247&r2=1387248&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/AbstractResource.java (original)
+++ incubator/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/AbstractResource.java Tue Sep 18 16:47:51 2012
@@ -22,13 +22,6 @@ package org.apache.airavata.persistance.
import org.apache.airavata.persistance.registry.jpa.Resource;
import org.apache.airavata.persistance.registry.jpa.ResourceType;
-import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
-
-import javax.persistence.EntityManager;
-import javax.persistence.EntityManagerFactory;
-import javax.persistence.Persistence;
-import java.util.HashMap;
-import java.util.Map;
public abstract class AbstractResource implements Resource {
//table names
Modified: incubator/airavata/trunk/modules/registry/airavata-registry-service/src/main/java/org/apache/airavata/registry/services/RegistryService.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/registry/airavata-registry-service/src/main/java/org/apache/airavata/registry/services/RegistryService.java?rev=1387248&r1=1387247&r2=1387248&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/registry/airavata-registry-service/src/main/java/org/apache/airavata/registry/services/RegistryService.java (original)
+++ incubator/airavata/trunk/modules/registry/airavata-registry-service/src/main/java/org/apache/airavata/registry/services/RegistryService.java Tue Sep 18 16:47:51 2012
@@ -49,7 +49,11 @@ public class RegistryService implements
@Override
public void startUp(ConfigurationContext configurationContext, AxisService axisService) {
//todo have to read these properties from some configuration
- String jdbcUrl = null;
+ initializeDB();
+ }
+
+ private void initializeDB() {
+ String jdbcUrl = null;
String jdbcDriver = null;
URL resource = this.getClass().getClassLoader().getResource("repository.properties");
Properties properties = new Properties();
@@ -91,7 +95,7 @@ public class RegistryService implements
WorkerResource workerResource = (WorkerResource)gatewayResource.create(ResourceType.GATEWAY_WORKER);
workerResource.setUser(userResource.getUserName());
workerResource.save();
- }
+ }
@Override
public void shutDown(ConfigurationContext configurationContext, AxisService axisService) {
Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpreter.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpreter.java?rev=1387248&r1=1387247&r2=1387248&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpreter.java (original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpreter.java Tue Sep 18 16:47:51 2012
@@ -271,7 +271,7 @@ public class WorkflowInterpreter {
try {
try {
this.getConfig().getConfiguration().getJcrComponentRegistry().getRegistry()
- .saveWorkflowExecutionStatus(this.config.getTopic(), ExecutionStatus.FINISHED);
+ .updateWorkflowInstanceStatus(this.config.getTopic(), ExecutionStatus.FINISHED);
} catch (Exception e) {
throw new WorkflowException(e);
}
@@ -284,7 +284,7 @@ public class WorkflowInterpreter {
if (this.config.isActOnProvenance()) {
try {
this.getConfig().getConfiguration().getJcrComponentRegistry().getRegistry()
- .saveWorkflowExecutionStatus(this.config.getTopic(), ExecutionStatus.FAILED);
+ .updateWorkflowInstanceStatus(this.config.getTopic(), ExecutionStatus.FAILED);
} catch (RegistryException e) {
throw new WorkflowException(e);
}
Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/model/registrybrowser/XBayaWorkflowExperiments.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/model/registrybrowser/XBayaWorkflowExperiments.java?rev=1387248&r1=1387247&r2=1387248&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/model/registrybrowser/XBayaWorkflowExperiments.java (original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/model/registrybrowser/XBayaWorkflowExperiments.java Tue Sep 18 16:47:51 2012
@@ -31,7 +31,7 @@ import javax.xml.parsers.ParserConfigura
import org.apache.airavata.common.registry.api.exception.RegistryException;
import org.apache.airavata.registry.api.AiravataRegistry2;
-import org.apache.airavata.registry.api.workflow.WorkflowServiceIOData;
+import org.apache.airavata.registry.api.workflow.WorkflowNodeIOData;
import org.apache.airavata.schemas.gfac.Parameter;
import org.apache.airavata.xbaya.interpretor.NameValue;
import org.apache.airavata.xbaya.util.XBayaUtil;
@@ -48,8 +48,8 @@ public class XBayaWorkflowExperiments {
Map<String, XBayaWorkflowExperiment> experiments=new HashMap<String,XBayaWorkflowExperiment>();
try {
initializeExperimentMap(experiments);
- List<WorkflowServiceIOData> workflowInput = getRegistry().searchWorkflowExecutionServiceInput(null, null, null);
- List<WorkflowServiceIOData> workflowOutput = getRegistry().searchWorkflowExecutionServiceOutput(null, null, null);
+ List<WorkflowNodeIOData> workflowInput = getRegistry().searchWorkflowInstanceNodeInput(null, null, null);
+ List<WorkflowNodeIOData> workflowOutput = getRegistry().searchWorkflowInstanceNodeOutput(null, null, null);
createChildren(experiments, workflowInput, true);
createChildren(experiments, workflowOutput, false);
} catch (RegistryException e) {
@@ -60,7 +60,7 @@ public class XBayaWorkflowExperiments {
public void initializeExperimentMap(Map<String, XBayaWorkflowExperiment> experiments){
try {
- List<String> workflowExecutionIdByUser = getRegistry().getWorkflowExecutionIdByUser(".*");
+ List<String> workflowExecutionIdByUser = getRegistry().getExperimentIdByUser(".*");
for (String expId : workflowExecutionIdByUser) {
XBayaWorkflowExperiment xBayaWorkflowExperiment = new XBayaWorkflowExperiment(expId, null);
xBayaWorkflowExperiment.add(new XBayaWorkflow(expId,getRegistry().getWorkflowExecutionTemplateName(expId,expId),null));
@@ -73,8 +73,8 @@ public class XBayaWorkflowExperiments {
private void createChildren(
Map<String, XBayaWorkflowExperiment> experiments,
- List<WorkflowServiceIOData> workflowIO, boolean inputData) {
- for (WorkflowServiceIOData workflowIOData : workflowIO) {
+ List<WorkflowNodeIOData> workflowIO, boolean inputData) {
+ for (WorkflowNodeIOData workflowIOData : workflowIO) {
if (!experiments.containsKey(workflowIOData.getExperimentId())){
experiments.put(workflowIOData.getExperimentId(),new XBayaWorkflowExperiment(workflowIOData.getExperimentId(), null));
}
Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/provenance/ProvenanceReader.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/provenance/ProvenanceReader.java?rev=1387248&r1=1387247&r2=1387248&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/provenance/ProvenanceReader.java (original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/provenance/ProvenanceReader.java Tue Sep 18 16:47:51 2012
@@ -24,7 +24,7 @@ import java.util.List;
import org.apache.airavata.registry.api.AiravataRegistry2;
import org.apache.airavata.registry.api.workflow.WorkflowExecution;
-import org.apache.airavata.registry.api.workflow.WorkflowServiceIOData;
+import org.apache.airavata.registry.api.workflow.WorkflowNodeIOData;
import org.apache.airavata.workflow.model.graph.Node;
public class ProvenanceReader {
@@ -45,12 +45,12 @@ public class ProvenanceReader {
public Object read() throws Exception {
try {
- WorkflowExecution workflowExecution = registry.getWorkflowExecution(experimentId);
- List<WorkflowServiceIOData> serviceOutput = workflowExecution.getServiceOutput();
+ WorkflowExecution workflowExecution = registry.getExperiment(experimentId);
+ List<WorkflowNodeIOData> serviceOutput = workflowExecution.getServiceOutput();
if (serviceOutput.size() == 0) {
return null;
}
- for (WorkflowServiceIOData data : serviceOutput) {
+ for (WorkflowNodeIOData data : serviceOutput) {
if (this.node.getID().equals(data.getNodeId())) {
return data.getValue();
}
Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/provenance/ProvenanceWrite.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/provenance/ProvenanceWrite.java?rev=1387248&r1=1387247&r2=1387248&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/provenance/ProvenanceWrite.java (original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/provenance/ProvenanceWrite.java Tue Sep 18 16:47:51 2012
@@ -27,7 +27,7 @@ import java.util.Map;
import org.apache.airavata.common.registry.api.exception.RegistryException;
import org.apache.airavata.common.utils.XMLUtil;
import org.apache.airavata.registry.api.AiravataRegistry2;
-import org.apache.airavata.registry.api.workflow.WorkflowServiceIOData;
+import org.apache.airavata.registry.api.workflow.WorkflowNodeIOData;
import org.apache.airavata.workflow.model.exceptions.WorkflowException;
import org.apache.airavata.workflow.model.graph.DataPort;
import org.apache.airavata.workflow.model.graph.ForEachExecutableNode;
@@ -175,7 +175,7 @@ public final class ProvenanceWrite imple
}
if (inputs!=null) {
try {
- this.registry.saveWorkflowExecutionServiceInput(new WorkflowServiceIOData(
+ this.registry.updateWorkflowNodeInput(new WorkflowNodeIOData(
xsul5.XmlConstants.BUILDER.serializeToString(inputs),
experimentId,experimentId, node.getID(), this.workflowName));
} catch (RegistryException e) {
@@ -207,7 +207,7 @@ public final class ProvenanceWrite imple
}
}
try {
- this.registry.saveWorkflowExecutionServiceOutput(new WorkflowServiceIOData(xsul5.XmlConstants.BUILDER.serializeToString(outputs), experimentId,experimentId, node.getID(),this.workflowName));
+ this.registry.updateWorkflowNodeOutput(new WorkflowNodeIOData(xsul5.XmlConstants.BUILDER.serializeToString(outputs), experimentId,experimentId, node.getID(),this.workflowName));
} catch (RegistryException e) {
throw new WorkflowException(e);
}
Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/provenance/WorkflowNodeStatusUpdater.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/provenance/WorkflowNodeStatusUpdater.java?rev=1387248&r1=1387247&r2=1387248&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/provenance/WorkflowNodeStatusUpdater.java (original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/provenance/WorkflowNodeStatusUpdater.java Tue Sep 18 16:47:51 2012
@@ -24,7 +24,7 @@ import org.apache.airavata.common.regist
import org.apache.airavata.registry.api.AiravataRegistry2;
import org.apache.airavata.registry.api.workflow.WorkflowInstanceStatus;
import org.apache.airavata.registry.api.workflow.WorkflowNodeType;
-import org.apache.airavata.registry.api.workflow.WorkflowServiceIOData;
+import org.apache.airavata.registry.api.workflow.WorkflowNodeIOData;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -39,12 +39,12 @@ public class WorkflowNodeStatusUpdater {
public boolean workflowStarted(String workflowInstanceID,String nodeID,String inputs,String workflowID){
try {
- WorkflowServiceIOData workflowServiceIOData = new WorkflowServiceIOData(inputs, workflowInstanceID,workflowInstanceID, workflowID, nodeID, null);
+ WorkflowNodeIOData workflowServiceIOData = new WorkflowNodeIOData(inputs, workflowInstanceID,workflowInstanceID, workflowID, nodeID, null);
//todo we currently save only service nodes
WorkflowNodeType workflowNodeType = new WorkflowNodeType();
workflowNodeType.setNodeType(WorkflowNodeType.WorkflowNode.SERVICENODE);
workflowServiceIOData.setNodeType(workflowNodeType);
- registry.saveWorkflowExecutionServiceInput(workflowServiceIOData); registry.saveWorkflowNodeStatus(workflowInstanceID, nodeID, WorkflowInstanceStatus.ExecutionStatus.STARTED);
+ registry.updateWorkflowNodeInput(workflowServiceIOData); registry.saveWorkflowNodeStatus(workflowInstanceID, nodeID, WorkflowInstanceStatus.ExecutionStatus.STARTED);
registry.saveWorkflowNodeStatus(workflowInstanceID, nodeID, WorkflowInstanceStatus.ExecutionStatus.STARTED);
} catch (RegistryException e) {
logger.error("Error updating Wokflow Node status !!");
@@ -65,10 +65,10 @@ public class WorkflowNodeStatusUpdater {
public boolean workflowFinished(String workflowInstanceID,String nodeID,String inputs,String workflowID){
try {
- WorkflowServiceIOData workflowServiceIOData = new WorkflowServiceIOData(inputs, workflowInstanceID,workflowInstanceID, workflowID, nodeID, null);
+ WorkflowNodeIOData workflowServiceIOData = new WorkflowNodeIOData(inputs, workflowInstanceID,workflowInstanceID, workflowID, nodeID, null);
WorkflowNodeType workflowNodeType = new WorkflowNodeType();
workflowNodeType.setNodeType(WorkflowNodeType.WorkflowNode.SERVICENODE);
- registry.saveWorkflowExecutionServiceOutput(workflowServiceIOData);
+ registry.updateWorkflowNodeOutput(workflowServiceIOData);
registry.saveWorkflowNodeStatus(workflowInstanceID, nodeID, WorkflowInstanceStatus.ExecutionStatus.FINISHED);
} catch (RegistryException e) {
logger.error("Error updating Wokflow Node status !!");
Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/provenance/WorkflowStatusUpdater.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/provenance/WorkflowStatusUpdater.java?rev=1387248&r1=1387247&r2=1387248&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/provenance/WorkflowStatusUpdater.java (original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/provenance/WorkflowStatusUpdater.java Tue Sep 18 16:47:51 2012
@@ -40,7 +40,7 @@ public class WorkflowStatusUpdater {
public boolean workflowStarted(String experimentID){
try {
- registry.saveWorkflowExecutionStatus(experimentID, WorkflowInstanceStatus.ExecutionStatus.STARTED);
+ registry.updateWorkflowInstanceStatus(experimentID, WorkflowInstanceStatus.ExecutionStatus.STARTED);
} catch (RegistryException e) {
logger.error("Error updating Wokflow Node status !!");
return false;
@@ -50,7 +50,7 @@ public class WorkflowStatusUpdater {
public boolean workflowFailed(String experimentID){
try {
- registry.saveWorkflowExecutionStatus(experimentID, WorkflowInstanceStatus.ExecutionStatus.FAILED);
+ registry.updateWorkflowInstanceStatus(experimentID, WorkflowInstanceStatus.ExecutionStatus.FAILED);
} catch (RegistryException e) {
logger.error("Error updating Wokflow Node status !!");
return false;
@@ -60,7 +60,7 @@ public class WorkflowStatusUpdater {
public boolean workflowFinished(String experimentID){
try {
- registry.saveWorkflowExecutionStatus(experimentID, WorkflowInstanceStatus.ExecutionStatus.FINISHED);
+ registry.updateWorkflowInstanceStatus(experimentID, WorkflowInstanceStatus.ExecutionStatus.FINISHED);
} catch (RegistryException e) {
logger.error("Error updating Wokflow Node status !!");
return false;
@@ -70,7 +70,7 @@ public class WorkflowStatusUpdater {
public boolean workflowRunning(String experimentID){
try {
- registry.saveWorkflowExecutionStatus(experimentID, WorkflowInstanceStatus.ExecutionStatus.RUNNING);
+ registry.updateWorkflowInstanceStatus(experimentID, WorkflowInstanceStatus.ExecutionStatus.RUNNING);
} catch (RegistryException e) {
logger.error("Error updating Wokflow Node status !!");
return false;
@@ -80,7 +80,7 @@ public class WorkflowStatusUpdater {
public boolean workflowPaused(String experimentID){
try {
- registry.saveWorkflowExecutionStatus(experimentID, WorkflowInstanceStatus.ExecutionStatus.PAUSED);
+ registry.updateWorkflowInstanceStatus(experimentID, WorkflowInstanceStatus.ExecutionStatus.PAUSED);
} catch (RegistryException e) {
logger.error("Error updating Wokflow Node status !!");
return false;
@@ -93,7 +93,7 @@ public class WorkflowStatusUpdater {
WorkflowRunTimeData workflowRunTimeData = new WorkflowRunTimeData(experimentID, workflowInstanceID, workflowTemplateID, currentTime,
WorkflowInstanceStatus.ExecutionStatus.STARTED, currentTime);
try {
- registry.saveWorkflowExecutionName(experimentID, workflowInstanceID);
+ registry.updateExperimentName(experimentID, workflowInstanceID);
registry.saveWorkflowData(workflowRunTimeData);
} catch (RegistryException e) {
logger.error("Error saving Workflow Data !!");
Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/registrybrowser/nodes/XBayaWorkflowExperimentNode.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/registrybrowser/nodes/XBayaWorkflowExperimentNode.java?rev=1387248&r1=1387247&r2=1387248&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/registrybrowser/nodes/XBayaWorkflowExperimentNode.java (original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/registrybrowser/nodes/XBayaWorkflowExperimentNode.java Tue Sep 18 16:47:51 2012
@@ -51,7 +51,7 @@ public class XBayaWorkflowExperimentNode
public String getCaption(boolean selected, boolean expanded, boolean leaf, boolean hasFocus) {
if (workflowExecutionName==null) {
try {
- workflowExecutionName = getRegistry().getWorkflowExecutionName(getExperiment().getExperimentId());
+ workflowExecutionName = getRegistry().getExperimentName(getExperiment().getExperimentId());
} catch (RegistryException e) {
e.printStackTrace();
}
@@ -61,7 +61,7 @@ public class XBayaWorkflowExperimentNode
}
String caption=workflowExecutionName;
try {
- WorkflowInstanceStatus workflowExecutionStatus = getRegistry().getWorkflowExecutionStatus(getExperiment().getExperimentId());
+ WorkflowInstanceStatus workflowExecutionStatus = getRegistry().getWorkflowInstanceStatus(getExperiment().getExperimentId());
if (workflowExecutionStatus!=null && workflowExecutionStatus.getExecutionStatus()!=null){
caption += " - <i>" + workflowExecutionStatus.getExecutionStatus().toString()+"</i>";
if (workflowExecutionStatus.getStatusUpdateTime()!=null) {