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 2014/07/19 16:08:31 UTC

[3/3] git commit: moving about status listener classes out of hte gfac

moving about status listener classes out of hte gfac


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/92838e4a
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/92838e4a
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/92838e4a

Branch: refs/heads/workflow-support
Commit: 92838e4a8d9a678e795c9deedaba76aeac652dc3
Parents: 601d5ad
Author: Saminda Wijeratne <sa...@gmail.com>
Authored: Sat Jul 19 09:23:19 2014 -0400
Committer: Saminda Wijeratne <sa...@gmail.com>
Committed: Sat Jul 19 09:23:19 2014 -0400

----------------------------------------------------------------------
 .../server/handler/AiravataServerHandler.java   |  98 ++++---
 .../util/AiravataExperimentStatusUpdator.java   | 117 ++++++++
 .../api/server/util/DataModelUtils.java         |  56 ++++
 .../tools/RegisterSampleApplications.java       | 207 +++++++++++---
 .../airavata/model/util/ExecutionType.java      |  28 ++
 .../model/util/ExperimentModelUtil.java         |  16 +-
 .../experimentModel.thrift                      |   3 +-
 modules/commons/utils/pom.xml                   |   7 +-
 .../common/utils/AbstractActivityListener.java  |  27 ++
 .../airavata/common/utils/MonitorPublisher.java |  47 ++++
 .../main/resources/airavata-server.properties   |   2 +-
 modules/distribution/server/pom.xml             |   5 +
 .../server/src/main/assembly/bin-assembly.xml   |   1 +
 .../airavata/gfac/server/GfacServerHandler.java |  20 +-
 .../airavata/gfac/core/cpi/BetterGfacImpl.java  |  34 ++-
 .../apache/airavata/gfac/core/cpi/GFacImpl.java |  33 ++-
 .../gfac/core/handler/AbstractHandler.java      |   2 +-
 .../handler/AbstractRecoverableHandler.java     |   2 +-
 .../core/monitor/AbstractActivityListener.java  |  54 ++--
 .../AiravataExperimentStatusUpdator.java        | 232 ++++++++--------
 .../core/monitor/AiravataJobStatusUpdator.java  |   3 +-
 .../core/monitor/AiravataTaskStatusUpdator.java |   3 +-
 .../AiravataWorkflowNodeStatusUpdator.java      |   3 +-
 .../core/monitor/GfacInternalStatusUpdator.java |  17 +-
 .../core/notification/MonitorPublisher.java     |  94 +++----
 .../gfac/core/provider/AbstractProvider.java    |   3 +-
 .../provider/AbstractRecoverableProvider.java   |   2 +-
 .../gfac/services/impl/LocalProviderTest.java   |  17 +-
 .../monitor/core/AiravataAbstractMonitor.java   |   2 +-
 .../handlers/GridPushMonitorHandler.java        |  13 +-
 .../monitor/impl/pull/qstat/HPCPullMonitor.java |  22 +-
 .../monitor/impl/push/amqp/AMQPMonitor.java     |  21 +-
 .../monitor/impl/push/amqp/BasicConsumer.java   |  11 +-
 .../apache/airavata/job/AMQPMonitorTest.java    |  21 +-
 .../job/QstatMonitorTestWithMyProxyAuth.java    |  21 +-
 .../airavata/workflow/engine/WorkflowUtils.java |  56 ++++
 .../engine/interpretor/WorkflowInterpreter.java | 267 ++++++++++---------
 .../engine/util/ProxyMonitorPublisher.java      |  62 +++++
 .../model/component/ws/WSComponent.java         |   2 +-
 .../ui/dialogs/registry/RegistryWindow.java     |   4 +-
 .../WorkflowInterpreterLaunchWindow.java        | 127 +++++----
 41 files changed, 1190 insertions(+), 572 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/92838e4a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
index 58d8acf..3c610f0 100644
--- a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
+++ b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
@@ -33,7 +33,6 @@ import java.util.Random;
 import org.airavata.appcatalog.cpi.AppCatalog;
 import org.airavata.appcatalog.cpi.AppCatalogException;
 import org.airavata.appcatalog.cpi.ApplicationDeployment;
-import org.airavata.appcatalog.cpi.ApplicationInterface;
 import org.airavata.appcatalog.cpi.ComputeResource;
 import org.airavata.appcatalog.cpi.GwyResourceProfile;
 import org.apache.aiaravata.application.catalog.data.impl.AppCatalogFactory;
@@ -46,6 +45,7 @@ import org.apache.aiaravata.application.catalog.data.resources.SshJobSubmissionR
 import org.apache.aiaravata.application.catalog.data.util.AppCatalogThriftConversion;
 import org.apache.airavata.api.Airavata;
 import org.apache.airavata.api.airavataAPIConstants;
+import org.apache.airavata.api.server.util.DataModelUtils;
 import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.common.utils.ServerSettings;
 import org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription;
@@ -53,7 +53,16 @@ import org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule;
 import org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription;
 import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
 import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
-import org.apache.airavata.model.appcatalog.computeresource.*;
+import org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription;
+import org.apache.airavata.model.appcatalog.computeresource.DataMovementInterface;
+import org.apache.airavata.model.appcatalog.computeresource.DataMovementProtocol;
+import org.apache.airavata.model.appcatalog.computeresource.GridFTPDataMovement;
+import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionInterface;
+import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol;
+import org.apache.airavata.model.appcatalog.computeresource.LOCALDataMovement;
+import org.apache.airavata.model.appcatalog.computeresource.LOCALSubmission;
+import org.apache.airavata.model.appcatalog.computeresource.SCPDataMovement;
+import org.apache.airavata.model.appcatalog.computeresource.SSHJobSubmission;
 import org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference;
 import org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile;
 import org.apache.airavata.model.error.AiravataClientException;
@@ -63,6 +72,7 @@ import org.apache.airavata.model.error.ExperimentNotFoundException;
 import org.apache.airavata.model.error.InvalidRequestException;
 import org.apache.airavata.model.error.LaunchValidationException;
 import org.apache.airavata.model.error.ProjectNotFoundException;
+import org.apache.airavata.model.util.ExecutionType;
 import org.apache.airavata.model.workspace.Project;
 import org.apache.airavata.model.workspace.experiment.ComputationalResourceScheduling;
 import org.apache.airavata.model.workspace.experiment.DataObjectType;
@@ -88,8 +98,6 @@ import org.apache.airavata.registry.cpi.RegistryModelType;
 import org.apache.airavata.registry.cpi.utils.Constants;
 import org.apache.airavata.registry.cpi.utils.Constants.FieldConstants.TaskDetailConstants;
 import org.apache.airavata.registry.cpi.utils.Constants.FieldConstants.WorkflowNodeConstants;
-import org.apache.airavata.workflow.catalog.WorkflowCatalogException;
-import org.apache.airavata.workflow.catalog.WorkflowCatalogFactory;
 import org.apache.airavata.workflow.engine.WorkflowEngine;
 import org.apache.airavata.workflow.engine.WorkflowEngineException;
 import org.apache.airavata.workflow.engine.WorkflowEngineFactory;
@@ -1027,55 +1035,41 @@ public class AiravataServerHandler implements Airavata.Iface, Watcher {
         final String expID = airavataExperimentId;
         final String token = airavataCredStoreToken;
         synchronized (this) {
-        	try {
-				ApplicationInterface applicationInterface = AppCatalogFactory.getAppCatalog().getApplicationInterface();
-				List<String> allApplicationInterfaceIds = applicationInterface.getAllApplicationInterfaceIds();
-				Experiment experiment = getExperiment(expID);
-				String applicationId = experiment.getApplicationId();
-				Thread thread = null;
-				if (allApplicationInterfaceIds.contains(applicationId)){
-					//its an single application execution experiment
-			    	final OrchestratorService.Client orchestratorClient = getOrchestratorClient();
-					if (orchestratorClient.validateExperiment(expID)) {
-						thread = new Thread() {
-		                    public void run() {
-		                        try {
-	                        		launchSingleAppExperiment(expID, token, orchestratorClient);
-		                        } catch (TException e) {
-		                            e.printStackTrace();  
-								}
-		                    }
-		                };	
-		            } else {
-		                throw new InvalidRequestException("Experiment Validation Failed, please check the configuration");
-		            }
-	                
-				} else {
-					List<String> allWorkflows = WorkflowCatalogFactory.getWorkflowCatalog().getAllWorkflows();
-					if (allWorkflows.contains(applicationId)){
-						//its a workflow execution experiment
-						thread = new Thread() {
-		                    public void run() {
-		                        try {
-	                        		launchWorkflowExperiment(expID, token);
-		                        } catch (TException e) {
-		                            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
-								}
-		                    }
-		                };
-					} else {
-						throw new InvalidRequestException("Experiment '"+expID+"' launch failed. Unable to locate an application or a workflow with the id "+applicationId);
-					}
-				}
-				thread.start();
-			} catch (AppCatalogException e1) {
-				// TODO Auto-generated catch block
-				e1.printStackTrace();
-			} catch (WorkflowCatalogException e1) {
-				// TODO Auto-generated catch block
-				e1.printStackTrace();
+    		Experiment experiment = getExperiment(expID);
+			ExecutionType executionType = DataModelUtils.getExecutionType(experiment);
+			Thread thread = null;
+			if (executionType==ExecutionType.SINGLE_APP){
+				//its an single application execution experiment
+		    	final OrchestratorService.Client orchestratorClient = getOrchestratorClient();
+				if (orchestratorClient.validateExperiment(expID)) {
+					thread = new Thread() {
+	                    public void run() {
+	                        try {
+                        		launchSingleAppExperiment(expID, token, orchestratorClient);
+	                        } catch (TException e) {
+	                            e.printStackTrace();  
+							}
+	                    }
+	                };	
+	            } else {
+	                throw new InvalidRequestException("Experiment Validation Failed, please check the configuration");
+	            }
+                
+			} else if (executionType == ExecutionType.WORKFLOW){
+					//its a workflow execution experiment
+					thread = new Thread() {
+	                    public void run() {
+	                        try {
+                        		launchWorkflowExperiment(expID, token);
+	                        } catch (TException e) {
+	                            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
+							}
+	                    }
+	                };
+			} else {
+				throw new InvalidRequestException("Experiment '"+expID+"' launch failed. Unable to figureout execution type for application "+experiment.getApplicationId());
 			}
-            
+			thread.start();
         }
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/92838e4a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/util/AiravataExperimentStatusUpdator.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/util/AiravataExperimentStatusUpdator.java b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/util/AiravataExperimentStatusUpdator.java
new file mode 100644
index 0000000..f75d95c
--- /dev/null
+++ b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/util/AiravataExperimentStatusUpdator.java
@@ -0,0 +1,117 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.api.server.util;
+
+import java.util.Calendar;
+
+import org.apache.airavata.common.utils.AbstractActivityListener;
+import org.apache.airavata.common.utils.MonitorPublisher;
+import org.apache.airavata.gfac.core.monitor.state.ExperimentStatusChangedEvent;
+import org.apache.airavata.gfac.core.monitor.state.WorkflowNodeStatusChangedEvent;
+import org.apache.airavata.model.util.ExecutionType;
+import org.apache.airavata.model.workspace.experiment.Experiment;
+import org.apache.airavata.model.workspace.experiment.ExperimentState;
+import org.apache.airavata.registry.cpi.Registry;
+import org.apache.airavata.registry.cpi.RegistryException;
+import org.apache.airavata.registry.cpi.RegistryModelType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.google.common.eventbus.Subscribe;
+
+public class AiravataExperimentStatusUpdator implements AbstractActivityListener {
+    private final static Logger logger = LoggerFactory.getLogger(AiravataExperimentStatusUpdator.class);
+
+    private Registry airavataRegistry;
+    private MonitorPublisher monitorPublisher;
+
+    public Registry getAiravataRegistry() {
+        return airavataRegistry;
+    }
+
+    public void setAiravataRegistry(Registry airavataRegistry) {
+        this.airavataRegistry = airavataRegistry;
+    }
+    
+    @Subscribe
+    public void setupExperimentStatus(WorkflowNodeStatusChangedEvent nodeStatus) {
+		try {
+			boolean updateExperimentStatus=true;
+	        ExperimentState state = ExperimentState.UNKNOWN;
+	        switch (nodeStatus.getState()) {
+	            case CANCELED:
+	                state = ExperimentState.CANCELED; updateExperimentStatus = true;
+	                break;
+	            case COMPLETED:
+	                state = ExperimentState.COMPLETED; updateExperimentStatus = false;
+	                break;
+	            case INVOKED:
+	                state = ExperimentState.LAUNCHED; updateExperimentStatus = false;
+	                break;
+	            case FAILED:
+	                state = ExperimentState.FAILED; updateExperimentStatus = true;
+	                break;
+	            case EXECUTING:
+	                state = ExperimentState.EXECUTING; updateExperimentStatus = true;
+	                break;
+	            case CANCELING:
+	                state = ExperimentState.CANCELING; updateExperimentStatus = true;
+	                break;
+	            default:
+	                break;
+	        }
+	        if (!updateExperimentStatus){
+				ExecutionType executionType = DataModelUtils.getExecutionType((Experiment) airavataRegistry.get(RegistryModelType.EXPERIMENT, nodeStatus.getIdentity().getExperimentID()));
+				updateExperimentStatus=(executionType==ExecutionType.SINGLE_APP);
+	        }
+			updateExperimentStatus(nodeStatus.getIdentity().getExperimentID(), state);
+			logger.debug("Publishing experiment status for "+nodeStatus.getIdentity().getExperimentID()+":"+state.toString());
+			monitorPublisher.publish(new ExperimentStatusChangedEvent(nodeStatus.getIdentity(), state));
+		} catch (Exception e) {
+            logger.error("Error persisting data" + e.getLocalizedMessage(), e);
+		}
+    }
+    
+    public  void updateExperimentStatus(String experimentId, ExperimentState state) throws Exception {
+        logger.info("Updating the experiment status of experiment: " + experimentId + " to " + state.toString());
+    	Experiment details = (Experiment)airavataRegistry.get(RegistryModelType.EXPERIMENT, experimentId);
+        if(details == null) {
+            details = new Experiment();
+            details.setExperimentID(experimentId);
+        }
+        org.apache.airavata.model.workspace.experiment.ExperimentStatus status = new org.apache.airavata.model.workspace.experiment.ExperimentStatus();
+        status.setExperimentState(state);
+        status.setTimeOfStateChange(Calendar.getInstance().getTimeInMillis());
+        details.setExperimentStatus(status);
+        airavataRegistry.update(RegistryModelType.EXPERIMENT_STATUS, status, experimentId);
+
+    }
+
+	public void setup(Object... configurations) {
+		for (Object configuration : configurations) {
+			if (configuration instanceof Registry){
+				this.airavataRegistry=(Registry)configuration;
+			} else if (configuration instanceof MonitorPublisher){
+				this.monitorPublisher=(MonitorPublisher) configuration;
+			} 
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/92838e4a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/util/DataModelUtils.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/util/DataModelUtils.java b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/util/DataModelUtils.java
new file mode 100644
index 0000000..9a0536c
--- /dev/null
+++ b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/util/DataModelUtils.java
@@ -0,0 +1,56 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.airavata.api.server.util;
+
+import java.util.List;
+
+import org.airavata.appcatalog.cpi.AppCatalogException;
+import org.airavata.appcatalog.cpi.ApplicationInterface;
+import org.apache.aiaravata.application.catalog.data.impl.AppCatalogFactory;
+import org.apache.airavata.model.util.ExecutionType;
+import org.apache.airavata.model.workspace.experiment.Experiment;
+import org.apache.airavata.workflow.catalog.WorkflowCatalogException;
+import org.apache.airavata.workflow.catalog.WorkflowCatalogFactory;
+
+public class DataModelUtils {
+
+	public static ExecutionType getExecutionType(Experiment experiment){
+		try {
+			ApplicationInterface applicationInterface = AppCatalogFactory.getAppCatalog().getApplicationInterface();
+			List<String> allApplicationInterfaceIds = applicationInterface.getAllApplicationInterfaceIds();
+			String applicationId = experiment.getApplicationId();
+			if (allApplicationInterfaceIds.contains(applicationId)){
+				return ExecutionType.SINGLE_APP;
+			} else {
+				List<String> allWorkflows = WorkflowCatalogFactory.getWorkflowCatalog().getAllWorkflows();
+				if (allWorkflows.contains(applicationId)){
+					return ExecutionType.WORKFLOW;
+				}
+			}
+		} catch (AppCatalogException e) {
+			e.printStackTrace();
+		} catch (WorkflowCatalogException e) {
+			e.printStackTrace();
+		}
+		return ExecutionType.UNKNOWN;
+	}
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/92838e4a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
index e991b06..1374f9f 100644
--- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
+++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
@@ -47,10 +47,10 @@ import org.apache.thrift.TException;
 
 public class RegisterSampleApplications {
 
-    public static final String THRIFT_SERVER_HOST = "gw111.iu.xsede.org";
-//    public static final String THRIFT_SERVER_HOST = "localhost";
-    public static final int THRIFT_SERVER_PORT = 9930;
-//    public static final int THRIFT_SERVER_PORT = 8930;
+//    public static final String THRIFT_SERVER_HOST = "gw111.iu.xsede.org";
+    public static final String THRIFT_SERVER_HOST = "localhost";
+//    public static final int THRIFT_SERVER_PORT = 9930;
+    public static final int THRIFT_SERVER_PORT = 8930;
     private final static Logger logger = LoggerFactory.getLogger(RegisterSampleApplications.class);
     private static final String DEFAULT_GATEWAY = "default";
     private static Airavata.Client airavataClient;
@@ -110,22 +110,22 @@ public class RegisterSampleApplications {
             System.out.println("API version is " + airavataClient.getAPIVersion());
 
             //Register all compute hosts
-            registerXSEDEHosts();
+//            registerXSEDEHosts();
 
             //Register Gateway Resource Preferences
-            registerGatewayResourceProfile();
+//            registerGatewayResourceProfile();
 
             //Register all application modules
             registerAppModules();
 
             //Register all application deployments
-            registerAppDeployments();
+//            registerAppDeployments();
 
             //Register all application interfaces
             registerAppInterfaces();
 
             //write output into propertiesFile
-            writeIdPropertyFile();
+//            writeIdPropertyFile();
 
         } catch (Exception e) {
             logger.error("Error while connecting with server", e.getMessage());
@@ -237,12 +237,13 @@ public class RegisterSampleApplications {
 
     public static void registerAppInterfaces() {
         System.out.println("\n #### Registering Application Interfaces #### \n");
-
+        registerGromaxWorkflowInterfaces();
+        
         //Registering Echo
-        registerEchoInterface();
+//        registerEchoInterface();
 
         //Registering Amber
-        registerAmberInterface();
+//        registerAmberInterface();
 
         //Registering AutoDock
 //        registerAutoDockInterface();
@@ -263,10 +264,152 @@ public class RegisterSampleApplications {
 //        registerTrinityInterface();
 
         //Registering WRF
-        registerWRFInterface();
+//        registerWRFInterface();
+
+    }
+
+    public static void registerGromaxWorkflowInterfaces() {
+        try {
+            System.out.println("#### Registering Echo Interface #### \n");
+
+            List<String> appModules = new ArrayList<String>();
+            appModules.add(echoModuleId);
+
+
+            List<InputDataObjectType> applicationInputs = new ArrayList<InputDataObjectType>();
+            applicationInputs.add(RegisterSampleApplicationsUtils.createAppInput("s_struct", "",
+                    DataType.URI, null, false, "Starting Structure File", null));
+
+
+            List<OutputDataObjectType> applicationOutputs = new ArrayList<OutputDataObjectType>();
+            applicationOutputs.add(RegisterSampleApplicationsUtils.createAppOutput("ffcomplient_struct",
+                    "", DataType.URI));
+            applicationOutputs.add(RegisterSampleApplicationsUtils.createAppOutput("topology",
+                    "", DataType.URI));
+
+            echoInterfaceId = airavataClient.registerApplicationInterface(
+                    RegisterSampleApplicationsUtils.createApplicationInterfaceDescription("pb2gmx", "pb2gmx",
+                            appModules, applicationInputs, applicationOutputs));
+
+            
+            applicationInputs.clear();
+            applicationInputs = new ArrayList<InputDataObjectType>();
+            applicationInputs.add(RegisterSampleApplicationsUtils.createAppInput("ffcomplient_struct", "",
+                    DataType.URI, null, false, "FFComplient Structure File", null));
+            applicationInputs.add(RegisterSampleApplicationsUtils.createAppInput("topology", "",
+                    DataType.URI, null, false, "Topology File", null));
+            applicationInputs.add(RegisterSampleApplicationsUtils.createAppInput("control_param_emv", "",
+                    DataType.URI, null, false, "Controlled parameters array of EM Vacuum", null));
+
+
+            applicationOutputs.clear();
+            applicationOutputs = new ArrayList<OutputDataObjectType>();
+            applicationOutputs.add(RegisterSampleApplicationsUtils.createAppOutput("energy_min_struct",
+                    "", DataType.URI));
+
+            echoInterfaceId = airavataClient.registerApplicationInterface(
+                    RegisterSampleApplicationsUtils.createApplicationInterfaceDescription("simulation1", "simulation1",
+                            appModules, applicationInputs, applicationOutputs));
 
+            applicationInputs.clear();
+            applicationInputs = new ArrayList<InputDataObjectType>();
+            applicationInputs.add(RegisterSampleApplicationsUtils.createAppInput("energy_min_struct", "",
+                    DataType.URI, null, false, "Energy Minimized Structure File", null));
+
+            applicationOutputs.clear();
+            applicationOutputs = new ArrayList<OutputDataObjectType>();
+            applicationOutputs.add(RegisterSampleApplicationsUtils.createAppOutput("struct_with_pbc",
+                    "", DataType.URI));
+
+            echoInterfaceId = airavataClient.registerApplicationInterface(
+                    RegisterSampleApplicationsUtils.createApplicationInterfaceDescription("editconf", "Edit configuration",
+                            appModules, applicationInputs, applicationOutputs));
+            
+            applicationInputs.clear();
+            applicationInputs = new ArrayList<InputDataObjectType>();
+            applicationInputs.add(RegisterSampleApplicationsUtils.createAppInput("struct_with_pbc", "",
+                    DataType.URI, null, false, "Structure with PBC File", null));
+            applicationInputs.add(RegisterSampleApplicationsUtils.createAppInput("solvent_struct", "",
+                    DataType.URI, null, false, "Solvent Structure File", null));
+            applicationInputs.add(RegisterSampleApplicationsUtils.createAppInput("topology", "",
+                    DataType.URI, null, false, "Topology File", null));
+
+            applicationOutputs.clear();
+            applicationOutputs = new ArrayList<OutputDataObjectType>();
+            applicationOutputs.add(RegisterSampleApplicationsUtils.createAppOutput("struct_with_water",
+                    "", DataType.URI));
+            applicationOutputs.add(RegisterSampleApplicationsUtils.createAppOutput("topology_with_water",
+                    "", DataType.URI));
+                        
+
+            echoInterfaceId = airavataClient.registerApplicationInterface(
+                    RegisterSampleApplicationsUtils.createApplicationInterfaceDescription("genbox", "genbox",
+                            appModules, applicationInputs, applicationOutputs));
+            
+            applicationInputs.clear();
+            applicationInputs = new ArrayList<InputDataObjectType>();
+            applicationInputs.add(RegisterSampleApplicationsUtils.createAppInput("struct_with_water", "",
+                    DataType.URI, null, false, "Structure with water File", null));
+            applicationInputs.add(RegisterSampleApplicationsUtils.createAppInput("topology_with_water", "",
+            		DataType.URI, null, false, "Topology including water File", null));
+            applicationInputs.add(RegisterSampleApplicationsUtils.createAppInput("control_param_emv", "",
+                    DataType.URI, null, false, "Controlled parameters array of EM Vacuum", null));
+
+            applicationOutputs.clear();
+            applicationOutputs = new ArrayList<OutputDataObjectType>();
+            applicationOutputs.add(RegisterSampleApplicationsUtils.createAppOutput("struct_topoogy",
+                    "", DataType.URI));
+                        
+
+            echoInterfaceId = airavataClient.registerApplicationInterface(
+                    RegisterSampleApplicationsUtils.createApplicationInterfaceDescription("grompp", "grompp",
+                            appModules, applicationInputs, applicationOutputs));
+            
+            applicationInputs.clear();
+            applicationInputs = new ArrayList<InputDataObjectType>();
+            applicationInputs.add(RegisterSampleApplicationsUtils.createAppInput("struct_topoogy", "",
+                    DataType.URI, null, false, "Structure and Topology File", null));
+            applicationInputs.add(RegisterSampleApplicationsUtils.createAppInput("topology_with_water", "",
+            		DataType.URI, null, false, "Topology including water File", null));
+
+            applicationOutputs.clear();
+            applicationOutputs = new ArrayList<OutputDataObjectType>();
+            applicationOutputs.add(RegisterSampleApplicationsUtils.createAppOutput("sys_topoogy",
+                    "", DataType.URI));
+                        
+            applicationOutputs.add(RegisterSampleApplicationsUtils.createAppOutput("sys_config",
+                    "", DataType.URI));
+            
+            echoInterfaceId = airavataClient.registerApplicationInterface(
+                    RegisterSampleApplicationsUtils.createApplicationInterfaceDescription("genion", "grompp",
+                            appModules, applicationInputs, applicationOutputs));
+            
+            applicationInputs.clear();
+            applicationInputs = new ArrayList<InputDataObjectType>();
+            applicationInputs.add(RegisterSampleApplicationsUtils.createAppInput("sys_topoogy", "",
+                    DataType.URI, null, false, "Structure and Topology File", null));
+            applicationInputs.add(RegisterSampleApplicationsUtils.createAppInput("sys_config", "",
+            		DataType.URI, null, false, "Topology including water File", null));
+            applicationInputs.add(RegisterSampleApplicationsUtils.createAppInput("control_param_ems", "",
+                    DataType.URI, null, false, "Controlled parameters array of EM Solvent", null));
+
+            applicationOutputs.clear();
+            applicationOutputs = new ArrayList<OutputDataObjectType>();
+            applicationOutputs.add(RegisterSampleApplicationsUtils.createAppOutput("energymin_sys",
+                    "", DataType.URI));
+            
+            echoInterfaceId = airavataClient.registerApplicationInterface(
+                    RegisterSampleApplicationsUtils.createApplicationInterfaceDescription("simulation2", "simulation2",
+                            appModules, applicationInputs, applicationOutputs));
+            
+            System.out.println("Echo Application Interface Id " + echoInterfaceId);
+
+        } catch (TException e) {
+            e.printStackTrace();
+        }
     }
 
+    
     public static void registerEchoInterface() {
         try {
             System.out.println("#### Registering Echo Interface #### \n");
@@ -787,26 +930,26 @@ public class RegisterSampleApplications {
     }
 
     public static void writeIdPropertyFile() {
-
-        try {
-            Properties properties = new Properties();
-            properties.setProperty("stampedeResourceId", stampedeResourceId);
-            properties.setProperty("trestlesResourceId", trestlesResourceId);
-            properties.setProperty("bigredResourceId", bigredResourceId);
-
-            properties.setProperty("echoInterfaceId", echoInterfaceId);
-            properties.setProperty("amberInterfaceId", amberInterfaceId);
-            properties.setProperty("wrfInterfaceId", wrfInterfaceId);
-
-            File file = new File("airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/conf/app-catalog-identifiers.ini");
-            FileOutputStream fileOut = new FileOutputStream(file);
-            properties.store(fileOut, "Apache Airavata Gateway to Airavata Deployment Identifiers");
-            fileOut.close();
-        } catch (FileNotFoundException e) {
-            e.printStackTrace();
-        } catch (IOException e) {
-            e.printStackTrace();
-        }
+//
+//        try {
+//            Properties properties = new Properties();
+//            properties.setProperty("stampedeResourceId", stampedeResourceId);
+//            properties.setProperty("trestlesResourceId", trestlesResourceId);
+//            properties.setProperty("bigredResourceId", bigredResourceId);
+//
+//            properties.setProperty("echoInterfaceId", echoInterfaceId);
+//            properties.setProperty("amberInterfaceId", amberInterfaceId);
+//            properties.setProperty("wrfInterfaceId", wrfInterfaceId);
+//
+//            File file = new File("airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/conf/app-catalog-identifiers.ini");
+//            FileOutputStream fileOut = new FileOutputStream(file);
+//            properties.store(fileOut, "Apache Airavata Gateway to Airavata Deployment Identifiers");
+//            fileOut.close();
+//        } catch (FileNotFoundException e) {
+//            e.printStackTrace();
+//        } catch (IOException e) {
+//            e.printStackTrace();
+//        }
 
     }
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/92838e4a/airavata-api/airavata-model-utils/src/main/java/org/apache/airavata/model/util/ExecutionType.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-model-utils/src/main/java/org/apache/airavata/model/util/ExecutionType.java b/airavata-api/airavata-model-utils/src/main/java/org/apache/airavata/model/util/ExecutionType.java
new file mode 100644
index 0000000..87fcec4
--- /dev/null
+++ b/airavata-api/airavata-model-utils/src/main/java/org/apache/airavata/model/util/ExecutionType.java
@@ -0,0 +1,28 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.airavata.model.util;
+
+public enum ExecutionType {
+	UNKNOWN,
+	SINGLE_APP,
+	WORKFLOW
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/92838e4a/airavata-api/airavata-model-utils/src/main/java/org/apache/airavata/model/util/ExperimentModelUtil.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-model-utils/src/main/java/org/apache/airavata/model/util/ExperimentModelUtil.java b/airavata-api/airavata-model-utils/src/main/java/org/apache/airavata/model/util/ExperimentModelUtil.java
index 1b53d38..7b08bcd 100644
--- a/airavata-api/airavata-model-utils/src/main/java/org/apache/airavata/model/util/ExperimentModelUtil.java
+++ b/airavata-api/airavata-model-utils/src/main/java/org/apache/airavata/model/util/ExperimentModelUtil.java
@@ -22,14 +22,24 @@
 package org.apache.airavata.model.util;
 
 
-import org.apache.airavata.model.workspace.experiment.*;
-
 import java.util.Calendar;
 import java.util.List;
 
+import org.apache.airavata.model.workspace.experiment.AdvancedInputDataHandling;
+import org.apache.airavata.model.workspace.experiment.AdvancedOutputDataHandling;
+import org.apache.airavata.model.workspace.experiment.ComputationalResourceScheduling;
+import org.apache.airavata.model.workspace.experiment.DataObjectType;
+import org.apache.airavata.model.workspace.experiment.Experiment;
+import org.apache.airavata.model.workspace.experiment.QualityOfServiceParams;
+import org.apache.airavata.model.workspace.experiment.TaskDetails;
+import org.apache.airavata.model.workspace.experiment.UserConfigurationData;
+import org.apache.airavata.model.workspace.experiment.WorkflowNodeDetails;
+import org.apache.airavata.model.workspace.experiment.WorkflowNodeState;
+import org.apache.airavata.model.workspace.experiment.WorkflowNodeStatus;
 
-public class ExperimentModelUtil {
 
+public class ExperimentModelUtil {
+	
 	public static WorkflowNodeStatus createWorkflowNodeStatus(WorkflowNodeState state){
 		WorkflowNodeStatus status = new WorkflowNodeStatus();
         status.setWorkflowNodeState(state);

http://git-wip-us.apache.org/repos/asf/airavata/blob/92838e4a/airavata-api/thrift-interface-descriptions/experimentModel.thrift
----------------------------------------------------------------------
diff --git a/airavata-api/thrift-interface-descriptions/experimentModel.thrift b/airavata-api/thrift-interface-descriptions/experimentModel.thrift
index 5338d2b..7943ecd 100644
--- a/airavata-api/thrift-interface-descriptions/experimentModel.thrift
+++ b/airavata-api/thrift-interface-descriptions/experimentModel.thrift
@@ -319,7 +319,8 @@ struct TaskDetails {
 enum ExecutionUnit {
 	INPUT,
 	APPLICATION,
-	OUTPUT
+	OUTPUT,
+	OTHER
 }
 
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/92838e4a/modules/commons/utils/pom.xml
----------------------------------------------------------------------
diff --git a/modules/commons/utils/pom.xml b/modules/commons/utils/pom.xml
index aca8fea..5d92f1a 100644
--- a/modules/commons/utils/pom.xml
+++ b/modules/commons/utils/pom.xml
@@ -65,7 +65,12 @@
             <artifactId>commons-dbcp</artifactId>
             <version>1.4</version>
         </dependency>
-
+        <dependency>
+            <groupId>com.google.guava</groupId>
+            <artifactId>guava</artifactId>
+            <version>12.0</version>
+        </dependency>
+        
         <!-- Logging -->
         <dependency>
             <groupId>org.slf4j</groupId>

http://git-wip-us.apache.org/repos/asf/airavata/blob/92838e4a/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/AbstractActivityListener.java
----------------------------------------------------------------------
diff --git a/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/AbstractActivityListener.java b/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/AbstractActivityListener.java
new file mode 100644
index 0000000..51922a0
--- /dev/null
+++ b/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/AbstractActivityListener.java
@@ -0,0 +1,27 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.airavata.common.utils;
+
+
+public interface AbstractActivityListener {
+	public void setup(Object... configurations);
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/92838e4a/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/MonitorPublisher.java
----------------------------------------------------------------------
diff --git a/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/MonitorPublisher.java b/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/MonitorPublisher.java
new file mode 100644
index 0000000..7f64e86
--- /dev/null
+++ b/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/MonitorPublisher.java
@@ -0,0 +1,47 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.common.utils;
+
+import com.google.common.eventbus.EventBus;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class MonitorPublisher{
+    private final static Logger logger = LoggerFactory.getLogger(MonitorPublisher.class);
+    private EventBus eventBus;
+    
+    public MonitorPublisher(EventBus eventBus) {
+        this.eventBus = eventBus;
+    }
+
+    public void registerListener(Object listener) {
+        eventBus.register(listener);
+    }
+    
+    public void unregisterListener(Object listener) {
+        eventBus.unregister(listener);
+    }
+
+    public void publish(Object o) {
+        eventBus.post(o);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/92838e4a/modules/configuration/server/src/main/resources/airavata-server.properties
----------------------------------------------------------------------
diff --git a/modules/configuration/server/src/main/resources/airavata-server.properties b/modules/configuration/server/src/main/resources/airavata-server.properties
index 6a8367d..166741f 100644
--- a/modules/configuration/server/src/main/resources/airavata-server.properties
+++ b/modules/configuration/server/src/main/resources/airavata-server.properties
@@ -276,7 +276,7 @@ monitors=org.apache.airavata.gfac.monitor.impl.pull.qstat.QstatMonitor,org.apach
 amqp.hosts=info1.dyn.teragrid.org,info2.dyn.teragrid.org
 proxy.file.path=/Users/lahirugunathilake/Downloads/x509up_u503876
 connection.name=xsede
-activity.listeners=org.apache.airavata.gfac.core.monitor.AiravataJobStatusUpdator,org.apache.airavata.gfac.core.monitor.AiravataTaskStatusUpdator,org.apache.airavata.gfac.core.monitor.AiravataWorkflowNodeStatusUpdator,org.apache.airavata.gfac.core.monitor.AiravataExperimentStatusUpdator,org.apache.airavata.gfac.core.monitor.GfacInternalStatusUpdator
+activity.listeners=org.apache.airavata.gfac.core.monitor.AiravataJobStatusUpdator,org.apache.airavata.gfac.core.monitor.AiravataTaskStatusUpdator,org.apache.airavata.gfac.core.monitor.AiravataWorkflowNodeStatusUpdator,org.apache.airavata.api.server.util.AiravataExperimentStatusUpdator,org.apache.airavata.gfac.core.monitor.GfacInternalStatusUpdator,org.apache.airavata.workflow.engine.util.ProxyMonitorPublisher
 
 ###---------------------------Orchestrator module Configurations---------------------------###
 #job.submitter=org.apache.airavata.orchestrator.core.impl.GFACEmbeddedJobSubmitter

http://git-wip-us.apache.org/repos/asf/airavata/blob/92838e4a/modules/distribution/server/pom.xml
----------------------------------------------------------------------
diff --git a/modules/distribution/server/pom.xml b/modules/distribution/server/pom.xml
index e7ccde2..5328ef9 100644
--- a/modules/distribution/server/pom.xml
+++ b/modules/distribution/server/pom.xml
@@ -238,6 +238,11 @@
             <version>2.4</version>
         </dependency>
         <dependency>
+            <groupId>commons-codec</groupId>
+            <artifactId>commons-codec</artifactId>
+            <version>1.6</version>
+        </dependency>
+        <dependency>
             <groupId>org.apache.airavata</groupId>
             <artifactId>airavata-standalone-server</artifactId>
             <version>${project.version}</version>

http://git-wip-us.apache.org/repos/asf/airavata/blob/92838e4a/modules/distribution/server/src/main/assembly/bin-assembly.xml
----------------------------------------------------------------------
diff --git a/modules/distribution/server/src/main/assembly/bin-assembly.xml b/modules/distribution/server/src/main/assembly/bin-assembly.xml
index 39ebbbb..75f941d 100644
--- a/modules/distribution/server/src/main/assembly/bin-assembly.xml
+++ b/modules/distribution/server/src/main/assembly/bin-assembly.xml
@@ -251,6 +251,7 @@
                 <include>org.apache.xmlbeans:xmlbeans</include>
                 <include>org.apache.thrift:libthrift:jar:0.9.1</include>
                 <include>commons-cli:commons-cli</include>
+                <include>commons-codec:commons-codec</include>
                 <include>com.rabbitmq:amqp-client</include>
                 <include>com.fasterxml.jackson.core:jackson-databind</include>
                 <include>com.fasterxml.jackson.core:jackson-core</include>

http://git-wip-us.apache.org/repos/asf/airavata/blob/92838e4a/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java b/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
index ea6fd0e..6f3247c 100644
--- a/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
+++ b/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
@@ -20,17 +20,18 @@
 */
 package org.apache.airavata.gfac.server;
 
-import com.google.common.eventbus.EventBus;
+import java.io.File;
+import java.io.IOException;
+
 import org.apache.airavata.common.exception.AiravataConfigurationException;
 import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.common.utils.AiravataZKUtils;
 import org.apache.airavata.common.utils.Constants;
+import org.apache.airavata.common.utils.MonitorPublisher;
 import org.apache.airavata.common.utils.ServerSettings;
 import org.apache.airavata.gfac.GFacException;
 import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
 import org.apache.airavata.gfac.core.cpi.GFac;
-import org.apache.airavata.gfac.core.cpi.GFacImpl;
-import org.apache.airavata.gfac.core.notification.MonitorPublisher;
 import org.apache.airavata.gfac.cpi.GfacService;
 import org.apache.airavata.gfac.cpi.gfac_cpi_serviceConstants;
 import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory;
@@ -40,16 +41,17 @@ import org.apache.airavata.registry.api.Gateway;
 import org.apache.airavata.registry.api.exception.RegException;
 import org.apache.airavata.registry.cpi.Registry;
 import org.apache.thrift.TException;
-import org.apache.thrift.transport.TTransport;
-import org.apache.thrift.transport.TTransportException;
-import org.apache.zookeeper.*;
+import org.apache.zookeeper.CreateMode;
+import org.apache.zookeeper.KeeperException;
+import org.apache.zookeeper.WatchedEvent;
+import org.apache.zookeeper.Watcher;
+import org.apache.zookeeper.ZooDefs;
+import org.apache.zookeeper.ZooKeeper;
 import org.apache.zookeeper.data.Stat;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.io.File;
-import java.io.IOException;
-import java.util.Random;
+import com.google.common.eventbus.EventBus;
 
 
 public class GfacServerHandler implements GfacService.Iface, Watcher{

http://git-wip-us.apache.org/repos/asf/airavata/blob/92838e4a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
index 62c44ab..30e5c0a 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
@@ -34,7 +34,9 @@ import org.airavata.appcatalog.cpi.AppCatalog;
 import org.apache.aiaravata.application.catalog.data.impl.AppCatalogFactory;
 import org.apache.airavata.client.api.AiravataAPI;
 import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.common.utils.AbstractActivityListener;
 import org.apache.airavata.common.utils.AiravataZKUtils;
+import org.apache.airavata.common.utils.MonitorPublisher;
 import org.apache.airavata.common.utils.ServerSettings;
 import org.apache.airavata.commons.gfac.type.ApplicationDescription;
 import org.apache.airavata.commons.gfac.type.HostDescription;
@@ -51,17 +53,13 @@ import org.apache.airavata.gfac.core.handler.GFacHandlerConfig;
 import org.apache.airavata.gfac.core.handler.GFacHandlerException;
 import org.apache.airavata.gfac.core.handler.GFacRecoverableHandler;
 import org.apache.airavata.gfac.core.handler.ThreadedHandler;
-import org.apache.airavata.gfac.core.monitor.AbstractActivityListener;
-import org.apache.airavata.gfac.core.monitor.ExperimentIdentity;
 import org.apache.airavata.gfac.core.monitor.JobIdentity;
 import org.apache.airavata.gfac.core.monitor.MonitorID;
 import org.apache.airavata.gfac.core.monitor.TaskIdentity;
-import org.apache.airavata.gfac.core.monitor.state.ExperimentStatusChangedEvent;
 import org.apache.airavata.gfac.core.monitor.state.GfacExperimentStateChangeRequest;
 import org.apache.airavata.gfac.core.monitor.state.JobStatusChangeRequest;
 import org.apache.airavata.gfac.core.monitor.state.TaskStatusChangeRequest;
 import org.apache.airavata.gfac.core.monitor.state.TaskStatusChangedEvent;
-import org.apache.airavata.gfac.core.notification.MonitorPublisher;
 import org.apache.airavata.gfac.core.notification.events.ExecutionFailEvent;
 import org.apache.airavata.gfac.core.notification.listeners.LoggingListener;
 import org.apache.airavata.gfac.core.notification.listeners.WorkflowTrackingListener;
@@ -75,18 +73,38 @@ import org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentD
 import org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription;
 import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
 import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
-import org.apache.airavata.model.appcatalog.computeresource.*;
+import org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription;
+import org.apache.airavata.model.appcatalog.computeresource.JobManagerCommand;
+import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionInterface;
+import org.apache.airavata.model.appcatalog.computeresource.LOCALSubmission;
+import org.apache.airavata.model.appcatalog.computeresource.ResourceJobManager;
+import org.apache.airavata.model.appcatalog.computeresource.SSHJobSubmission;
 import org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference;
-import org.apache.airavata.model.workspace.experiment.*;
+import org.apache.airavata.model.workspace.experiment.ComputationalResourceScheduling;
+import org.apache.airavata.model.workspace.experiment.DataObjectType;
+import org.apache.airavata.model.workspace.experiment.Experiment;
+import org.apache.airavata.model.workspace.experiment.JobState;
+import org.apache.airavata.model.workspace.experiment.TaskDetails;
+import org.apache.airavata.model.workspace.experiment.TaskState;
 import org.apache.airavata.registry.api.AiravataRegistry2;
 import org.apache.airavata.registry.cpi.Registry;
 import org.apache.airavata.registry.cpi.RegistryModelType;
-import org.apache.airavata.schemas.gfac.*;
+import org.apache.airavata.schemas.gfac.ApplicationDeploymentDescriptionType;
 import org.apache.airavata.schemas.gfac.DataType;
+import org.apache.airavata.schemas.gfac.GsisshHostType;
+import org.apache.airavata.schemas.gfac.HostDescriptionType;
+import org.apache.airavata.schemas.gfac.HpcApplicationDeploymentType;
+import org.apache.airavata.schemas.gfac.InputParameterType;
+import org.apache.airavata.schemas.gfac.JobTypeType;
+import org.apache.airavata.schemas.gfac.OutputParameterType;
+import org.apache.airavata.schemas.gfac.ParameterType;
+import org.apache.airavata.schemas.gfac.ProjectAccountType;
+import org.apache.airavata.schemas.gfac.QueueType;
+import org.apache.airavata.schemas.gfac.SSHHostType;
+import org.apache.airavata.schemas.gfac.ServiceDescriptionType;
 import org.apache.zookeeper.KeeperException;
 import org.apache.zookeeper.ZKUtil;
 import org.apache.zookeeper.ZooKeeper;
-import org.ogf.schemas.jsdl.hpcpa.HPCProfileApplicationDocument;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.xml.sax.SAXException;

http://git-wip-us.apache.org/repos/asf/airavata/blob/92838e4a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/GFacImpl.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/GFacImpl.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/GFacImpl.java
index 2065cee..83fb43a 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/GFacImpl.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/GFacImpl.java
@@ -28,10 +28,13 @@ import java.util.List;
 import java.util.Map;
 import java.util.Properties;
 
-import com.google.common.eventbus.EventBus;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.xpath.XPathExpressionException;
 
 import org.apache.airavata.client.api.AiravataAPI;
 import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.common.utils.AbstractActivityListener;
+import org.apache.airavata.common.utils.MonitorPublisher;
 import org.apache.airavata.common.utils.ServerSettings;
 import org.apache.airavata.commons.gfac.type.ApplicationDescription;
 import org.apache.airavata.commons.gfac.type.HostDescription;
@@ -43,34 +46,36 @@ import org.apache.airavata.gfac.Scheduler;
 import org.apache.airavata.gfac.core.context.ApplicationContext;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.context.MessageContext;
-import org.apache.airavata.gfac.core.monitor.*;
-import org.apache.airavata.gfac.core.monitor.state.ExperimentStatusChangedEvent;
+import org.apache.airavata.gfac.core.handler.GFacHandler;
+import org.apache.airavata.gfac.core.handler.GFacHandlerConfig;
+import org.apache.airavata.gfac.core.handler.GFacHandlerException;
+import org.apache.airavata.gfac.core.handler.ThreadedHandler;
+import org.apache.airavata.gfac.core.monitor.JobIdentity;
+import org.apache.airavata.gfac.core.monitor.MonitorID;
+import org.apache.airavata.gfac.core.monitor.TaskIdentity;
 import org.apache.airavata.gfac.core.monitor.state.JobStatusChangeRequest;
 import org.apache.airavata.gfac.core.monitor.state.TaskStatusChangeRequest;
-import org.apache.airavata.gfac.core.monitor.state.TaskStatusChangedEvent;
-import org.apache.airavata.gfac.core.notification.MonitorPublisher;
 import org.apache.airavata.gfac.core.notification.events.ExecutionFailEvent;
 import org.apache.airavata.gfac.core.notification.listeners.LoggingListener;
 import org.apache.airavata.gfac.core.notification.listeners.WorkflowTrackingListener;
-import org.apache.airavata.gfac.core.handler.GFacHandler;
 import org.apache.airavata.gfac.core.provider.GFacProvider;
 import org.apache.airavata.gfac.core.scheduler.HostScheduler;
-import org.apache.airavata.gfac.core.handler.GFacHandlerConfig;
-import org.apache.airavata.gfac.core.handler.GFacHandlerException;
-import org.apache.airavata.gfac.core.handler.ThreadedHandler;
-import org.apache.airavata.gfac.core.utils.GFacUtils;
 import org.apache.airavata.gfac.core.states.GfacExperimentState;
-import org.apache.airavata.model.workspace.experiment.*;
+import org.apache.airavata.gfac.core.utils.GFacUtils;
+import org.apache.airavata.model.workspace.experiment.DataObjectType;
+import org.apache.airavata.model.workspace.experiment.Experiment;
+import org.apache.airavata.model.workspace.experiment.JobState;
+import org.apache.airavata.model.workspace.experiment.TaskDetails;
+import org.apache.airavata.model.workspace.experiment.TaskState;
 import org.apache.airavata.registry.api.AiravataRegistry2;
-import org.apache.airavata.registry.cpi.RegistryModelType;
 import org.apache.airavata.registry.cpi.Registry;
+import org.apache.airavata.registry.cpi.RegistryModelType;
 import org.apache.zookeeper.ZooKeeper;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.xml.sax.SAXException;
 
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.xpath.XPathExpressionException;
+import com.google.common.eventbus.EventBus;
 
 /**
  * This is the GFac CPI class for external usage, this simply have a single method to submit a job to

http://git-wip-us.apache.org/repos/asf/airavata/blob/92838e4a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AbstractHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AbstractHandler.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AbstractHandler.java
index 81d2072..b0383c0 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AbstractHandler.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AbstractHandler.java
@@ -20,9 +20,9 @@
 */
 package org.apache.airavata.gfac.core.handler;
 
+import org.apache.airavata.common.utils.MonitorPublisher;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.cpi.GFacImpl;
-import org.apache.airavata.gfac.core.notification.MonitorPublisher;
 import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory;
 import org.apache.airavata.registry.cpi.Registry;
 import org.apache.airavata.registry.cpi.RegistryException;

http://git-wip-us.apache.org/repos/asf/airavata/blob/92838e4a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AbstractRecoverableHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AbstractRecoverableHandler.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AbstractRecoverableHandler.java
index 431c202..423b5d9 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AbstractRecoverableHandler.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AbstractRecoverableHandler.java
@@ -20,9 +20,9 @@
 */
 package org.apache.airavata.gfac.core.handler;
 
+import org.apache.airavata.common.utils.MonitorPublisher;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.cpi.GFacImpl;
-import org.apache.airavata.gfac.core.notification.MonitorPublisher;
 import org.apache.airavata.gfac.core.states.GfacPluginState;
 import org.apache.airavata.gfac.core.utils.GFacUtils;
 import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory;

http://git-wip-us.apache.org/repos/asf/airavata/blob/92838e4a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/AbstractActivityListener.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/AbstractActivityListener.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/AbstractActivityListener.java
index d642154..6eb1067 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/AbstractActivityListener.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/AbstractActivityListener.java
@@ -1,27 +1,27 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-package org.apache.airavata.gfac.core.monitor;
-
-
-public interface AbstractActivityListener {
-	public void setup(Object... configurations);
-}
+///*
+// *
+// * Licensed to the Apache Software Foundation (ASF) under one
+// * or more contributor license agreements.  See the NOTICE file
+// * distributed with this work for additional information
+// * regarding copyright ownership.  The ASF licenses this file
+// * to you under the Apache License, Version 2.0 (the
+// * "License"); you may not use this file except in compliance
+// * with the License.  You may obtain a copy of the License at
+// *
+// *   http://www.apache.org/licenses/LICENSE-2.0
+// *
+// * Unless required by applicable law or agreed to in writing,
+// * software distributed under the License is distributed on an
+// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// * KIND, either express or implied.  See the License for the
+// * specific language governing permissions and limitations
+// * under the License.
+// *
+// */
+//
+//package org.apache.airavata.gfac.core.monitor;
+//
+//
+//public interface AbstractActivityListener {
+//	public void setup(Object... configurations);
+//}

http://git-wip-us.apache.org/repos/asf/airavata/blob/92838e4a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/AiravataExperimentStatusUpdator.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/AiravataExperimentStatusUpdator.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/AiravataExperimentStatusUpdator.java
index 664f237..7feac06 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/AiravataExperimentStatusUpdator.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/AiravataExperimentStatusUpdator.java
@@ -1,123 +1,109 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.gfac.core.monitor;
-
-import com.google.common.eventbus.Subscribe;
-
-import org.apache.airavata.gfac.core.monitor.state.ExperimentStatusChangedEvent;
-import org.apache.airavata.gfac.core.monitor.state.WorkflowNodeStatusChangedEvent;
-import org.apache.airavata.gfac.core.notification.MonitorPublisher;
-import org.apache.airavata.model.workspace.experiment.Experiment;
-import org.apache.airavata.model.workspace.experiment.ExperimentState;
-import org.apache.airavata.registry.cpi.RegistryModelType;
-import org.apache.airavata.registry.cpi.Registry;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.Calendar;
-
-public class AiravataExperimentStatusUpdator implements AbstractActivityListener {
-    private final static Logger logger = LoggerFactory.getLogger(AiravataExperimentStatusUpdator.class);
-
-    private Registry airavataRegistry;
-    private MonitorPublisher monitorPublisher;
-
-    public Registry getAiravataRegistry() {
-        return airavataRegistry;
-    }
-
-    public void setAiravataRegistry(Registry airavataRegistry) {
-        this.airavataRegistry = airavataRegistry;
-    }
-
-    @Subscribe
-    public void updateRegistry(ExperimentStatusChangedEvent experimentStatus) {
-        ExperimentState state = experimentStatus.getState();
-        if (state != null) {
-            try {
-                String experimentID = experimentStatus.getIdentity().getExperimentID();
-                updateExperimentStatus(experimentID, state);
-            } catch (Exception e) {
-                logger.error("Error persisting data" + e.getLocalizedMessage(), e);
-            }
-        }
-    }
-
-    
-    @Subscribe
-    public void setupExperimentStatus(WorkflowNodeStatusChangedEvent nodeStatus) {
-        ExperimentState state = ExperimentState.UNKNOWN;
-        switch (nodeStatus.getState()) {
-            case CANCELED:
-                state = ExperimentState.CANCELED;
-                break;
-            case COMPLETED:
-                state = ExperimentState.COMPLETED;
-                break;
-            case INVOKED:
-                state = ExperimentState.LAUNCHED;
-                break;
-            case FAILED:
-                state = ExperimentState.FAILED;
-                break;
-            case EXECUTING:
-                state = ExperimentState.EXECUTING;
-                break;
-            case CANCELING:
-                state = ExperimentState.CANCELING;
-                break;
-            default:
-                break;
-        }
-		try {
-			updateExperimentStatus(nodeStatus.getIdentity().getExperimentID(), state);
-			logger.debug("Publishing experiment status for "+nodeStatus.getIdentity().getExperimentID()+":"+state.toString());
-			monitorPublisher.publish(new ExperimentStatusChangedEvent(nodeStatus.getIdentity(), state));
-		} catch (Exception e) {
-            logger.error("Error persisting data" + e.getLocalizedMessage(), e);
-		}
-    }
-    
-    public  void updateExperimentStatus(String experimentId, ExperimentState state) throws Exception {
-        logger.info("Updating the experiment status of experiment: " + experimentId + " to " + state.toString());
-    	Experiment details = (Experiment)airavataRegistry.get(RegistryModelType.EXPERIMENT, experimentId);
-        if(details == null) {
-            details = new Experiment();
-            details.setExperimentID(experimentId);
-        }
-        org.apache.airavata.model.workspace.experiment.ExperimentStatus status = new org.apache.airavata.model.workspace.experiment.ExperimentStatus();
-        status.setExperimentState(state);
-        status.setTimeOfStateChange(Calendar.getInstance().getTimeInMillis());
-        details.setExperimentStatus(status);
-        airavataRegistry.update(RegistryModelType.EXPERIMENT_STATUS, status, experimentId);
-
-    }
-
-	public void setup(Object... configurations) {
-		for (Object configuration : configurations) {
-			if (configuration instanceof Registry){
-				this.airavataRegistry=(Registry)configuration;
-			} else if (configuration instanceof MonitorPublisher){
-				this.monitorPublisher=(MonitorPublisher) configuration;
-			} 
-		}
-	}
-}
+///*
+// *
+// * Licensed to the Apache Software Foundation (ASF) under one
+// * or more contributor license agreements.  See the NOTICE file
+// * distributed with this work for additional information
+// * regarding copyright ownership.  The ASF licenses this file
+// * to you under the Apache License, Version 2.0 (the
+// * "License"); you may not use this file except in compliance
+// * with the License.  You may obtain a copy of the License at
+// *
+// *   http://www.apache.org/licenses/LICENSE-2.0
+// *
+// * Unless required by applicable law or agreed to in writing,
+// * software distributed under the License is distributed on an
+// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// * KIND, either express or implied.  See the License for the
+// * specific language governing permissions and limitations
+// * under the License.
+// *
+//*/
+//package org.apache.airavata.gfac.core.monitor;
+//
+//import com.google.common.eventbus.Subscribe;
+//
+//import org.apache.airavata.gfac.core.monitor.state.ExperimentStatusChangedEvent;
+//import org.apache.airavata.gfac.core.monitor.state.WorkflowNodeStatusChangedEvent;
+//import org.apache.airavata.gfac.core.notification.MonitorPublisher;
+//import org.apache.airavata.model.workspace.experiment.Experiment;
+//import org.apache.airavata.model.workspace.experiment.ExperimentState;
+//import org.apache.airavata.registry.cpi.RegistryModelType;
+//import org.apache.airavata.registry.cpi.Registry;
+//import org.slf4j.Logger;
+//import org.slf4j.LoggerFactory;
+//
+//import java.util.Calendar;
+//
+//public class AiravataExperimentStatusUpdator implements AbstractActivityListener {
+//    private final static Logger logger = LoggerFactory.getLogger(AiravataExperimentStatusUpdator.class);
+//
+//    private Registry airavataRegistry;
+//    private MonitorPublisher monitorPublisher;
+//
+//    public Registry getAiravataRegistry() {
+//        return airavataRegistry;
+//    }
+//
+//    public void setAiravataRegistry(Registry airavataRegistry) {
+//        this.airavataRegistry = airavataRegistry;
+//    }
+//    
+//    @Subscribe
+//    public void setupExperimentStatus(WorkflowNodeStatusChangedEvent nodeStatus) {
+//        ExperimentState state = ExperimentState.UNKNOWN;
+//        switch (nodeStatus.getState()) {
+//            case CANCELED:
+//                state = ExperimentState.CANCELED;
+//                break;
+//            case COMPLETED:
+//                state = ExperimentState.COMPLETED;
+//                break;
+//            case INVOKED:
+//                state = ExperimentState.LAUNCHED;
+//                break;
+//            case FAILED:
+//                state = ExperimentState.FAILED;
+//                break;
+//            case EXECUTING:
+//                state = ExperimentState.EXECUTING;
+//                break;
+//            case CANCELING:
+//                state = ExperimentState.CANCELING;
+//                break;
+//            default:
+//                break;
+//        }
+//		try {
+//			updateExperimentStatus(nodeStatus.getIdentity().getExperimentID(), state);
+//			logger.debug("Publishing experiment status for "+nodeStatus.getIdentity().getExperimentID()+":"+state.toString());
+//			monitorPublisher.publish(new ExperimentStatusChangedEvent(nodeStatus.getIdentity(), state));
+//		} catch (Exception e) {
+//            logger.error("Error persisting data" + e.getLocalizedMessage(), e);
+//		}
+//    }
+//    
+//    public  void updateExperimentStatus(String experimentId, ExperimentState state) throws Exception {
+//        logger.info("Updating the experiment status of experiment: " + experimentId + " to " + state.toString());
+//    	Experiment details = (Experiment)airavataRegistry.get(RegistryModelType.EXPERIMENT, experimentId);
+//        if(details == null) {
+//            details = new Experiment();
+//            details.setExperimentID(experimentId);
+//        }
+//        org.apache.airavata.model.workspace.experiment.ExperimentStatus status = new org.apache.airavata.model.workspace.experiment.ExperimentStatus();
+//        status.setExperimentState(state);
+//        status.setTimeOfStateChange(Calendar.getInstance().getTimeInMillis());
+//        details.setExperimentStatus(status);
+//        airavataRegistry.update(RegistryModelType.EXPERIMENT_STATUS, status, experimentId);
+//
+//    }
+//
+//	public void setup(Object... configurations) {
+//		for (Object configuration : configurations) {
+//			if (configuration instanceof Registry){
+//				this.airavataRegistry=(Registry)configuration;
+//			} else if (configuration instanceof MonitorPublisher){
+//				this.monitorPublisher=(MonitorPublisher) configuration;
+//			} 
+//		}
+//	}
+//}

http://git-wip-us.apache.org/repos/asf/airavata/blob/92838e4a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/AiravataJobStatusUpdator.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/AiravataJobStatusUpdator.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/AiravataJobStatusUpdator.java
index 6ad55d2..84541fc 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/AiravataJobStatusUpdator.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/AiravataJobStatusUpdator.java
@@ -22,9 +22,10 @@ package org.apache.airavata.gfac.core.monitor;
 
 import java.util.Calendar;
 
+import org.apache.airavata.common.utils.AbstractActivityListener;
+import org.apache.airavata.common.utils.MonitorPublisher;
 import org.apache.airavata.gfac.core.monitor.state.JobStatusChangeRequest;
 import org.apache.airavata.gfac.core.monitor.state.JobStatusChangedEvent;
-import org.apache.airavata.gfac.core.notification.MonitorPublisher;
 import org.apache.airavata.model.workspace.experiment.JobDetails;
 import org.apache.airavata.model.workspace.experiment.JobState;
 import org.apache.airavata.registry.cpi.CompositeIdentifier;

http://git-wip-us.apache.org/repos/asf/airavata/blob/92838e4a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/AiravataTaskStatusUpdator.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/AiravataTaskStatusUpdator.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/AiravataTaskStatusUpdator.java
index 26d49c0..5d8cc33 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/AiravataTaskStatusUpdator.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/AiravataTaskStatusUpdator.java
@@ -22,10 +22,11 @@ package org.apache.airavata.gfac.core.monitor;
 
 import java.util.Calendar;
 
+import org.apache.airavata.common.utils.AbstractActivityListener;
+import org.apache.airavata.common.utils.MonitorPublisher;
 import org.apache.airavata.gfac.core.monitor.state.JobStatusChangedEvent;
 import org.apache.airavata.gfac.core.monitor.state.TaskStatusChangeRequest;
 import org.apache.airavata.gfac.core.monitor.state.TaskStatusChangedEvent;
-import org.apache.airavata.gfac.core.notification.MonitorPublisher;
 import org.apache.airavata.model.workspace.experiment.TaskDetails;
 import org.apache.airavata.model.workspace.experiment.TaskState;
 import org.apache.airavata.registry.cpi.Registry;

http://git-wip-us.apache.org/repos/asf/airavata/blob/92838e4a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/AiravataWorkflowNodeStatusUpdator.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/AiravataWorkflowNodeStatusUpdator.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/AiravataWorkflowNodeStatusUpdator.java
index 5f6629c..cf88793 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/AiravataWorkflowNodeStatusUpdator.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/AiravataWorkflowNodeStatusUpdator.java
@@ -22,9 +22,10 @@ package org.apache.airavata.gfac.core.monitor;
 
 import java.util.Calendar;
 
+import org.apache.airavata.common.utils.AbstractActivityListener;
+import org.apache.airavata.common.utils.MonitorPublisher;
 import org.apache.airavata.gfac.core.monitor.state.TaskStatusChangedEvent;
 import org.apache.airavata.gfac.core.monitor.state.WorkflowNodeStatusChangedEvent;
-import org.apache.airavata.gfac.core.notification.MonitorPublisher;
 import org.apache.airavata.model.workspace.experiment.WorkflowNodeDetails;
 import org.apache.airavata.model.workspace.experiment.WorkflowNodeState;
 import org.apache.airavata.model.workspace.experiment.WorkflowNodeStatus;

http://git-wip-us.apache.org/repos/asf/airavata/blob/92838e4a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/GfacInternalStatusUpdator.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/GfacInternalStatusUpdator.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/GfacInternalStatusUpdator.java
index 97bb49d..870ba26 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/GfacInternalStatusUpdator.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/GfacInternalStatusUpdator.java
@@ -20,22 +20,29 @@
 */
 package org.apache.airavata.gfac.core.monitor;
 
-import com.google.common.eventbus.Subscribe;
+import java.io.File;
+import java.io.IOException;
+
 import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.common.utils.AbstractActivityListener;
 import org.apache.airavata.common.utils.AiravataZKUtils;
 import org.apache.airavata.common.utils.Constants;
 import org.apache.airavata.common.utils.ServerSettings;
 import org.apache.airavata.gfac.core.monitor.state.GfacExperimentStateChangeRequest;
-import org.apache.zookeeper.*;
+import org.apache.zookeeper.CreateMode;
+import org.apache.zookeeper.KeeperException;
+import org.apache.zookeeper.WatchedEvent;
+import org.apache.zookeeper.Watcher;
+import org.apache.zookeeper.ZooDefs;
+import org.apache.zookeeper.ZooKeeper;
 import org.apache.zookeeper.data.Stat;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.io.File;
-import java.io.IOException;
+import com.google.common.eventbus.Subscribe;
 
 public class GfacInternalStatusUpdator implements AbstractActivityListener, Watcher {
-    private final static Logger logger = LoggerFactory.getLogger(AiravataWorkflowNodeStatusUpdator.class);
+    private final static Logger logger = LoggerFactory.getLogger(GfacInternalStatusUpdator.class);
 
     private ZooKeeper zk;
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/92838e4a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/MonitorPublisher.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/MonitorPublisher.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/MonitorPublisher.java
index e44974b..98fdc19 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/MonitorPublisher.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/notification/MonitorPublisher.java
@@ -1,47 +1,47 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.gfac.core.notification;
-
-import com.google.common.eventbus.EventBus;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class MonitorPublisher{
-    private final static Logger logger = LoggerFactory.getLogger(MonitorPublisher.class);
-    private EventBus eventBus;
-    
-    public MonitorPublisher(EventBus eventBus) {
-        this.eventBus = eventBus;
-    }
-
-    public void registerListener(Object listener) {
-        eventBus.register(listener);
-    }
-    
-    public void unregisterListener(Object listener) {
-        eventBus.unregister(listener);
-    }
-
-    public void publish(Object o) {
-        eventBus.post(o);
-    }
-
-}
+///*
+// *
+// * Licensed to the Apache Software Foundation (ASF) under one
+// * or more contributor license agreements.  See the NOTICE file
+// * distributed with this work for additional information
+// * regarding copyright ownership.  The ASF licenses this file
+// * to you under the Apache License, Version 2.0 (the
+// * "License"); you may not use this file except in compliance
+// * with the License.  You may obtain a copy of the License at
+// *
+// *   http://www.apache.org/licenses/LICENSE-2.0
+// *
+// * Unless required by applicable law or agreed to in writing,
+// * software distributed under the License is distributed on an
+// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// * KIND, either express or implied.  See the License for the
+// * specific language governing permissions and limitations
+// * under the License.
+// *
+//*/
+//package org.apache.airavata.gfac.core.notification;
+//
+//import com.google.common.eventbus.EventBus;
+//import org.slf4j.Logger;
+//import org.slf4j.LoggerFactory;
+//
+//public class MonitorPublisher{
+//    private final static Logger logger = LoggerFactory.getLogger(MonitorPublisher.class);
+//    private EventBus eventBus;
+//    
+//    public MonitorPublisher(EventBus eventBus) {
+//        this.eventBus = eventBus;
+//    }
+//
+//    public void registerListener(Object listener) {
+//        eventBus.register(listener);
+//    }
+//    
+//    public void unregisterListener(Object listener) {
+//        eventBus.unregister(listener);
+//    }
+//
+//    public void publish(Object o) {
+//        eventBus.post(o);
+//    }
+//
+//}

http://git-wip-us.apache.org/repos/asf/airavata/blob/92838e4a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/provider/AbstractProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/provider/AbstractProvider.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/provider/AbstractProvider.java
index 6e3f59e..5dbb9d3 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/provider/AbstractProvider.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/provider/AbstractProvider.java
@@ -21,12 +21,11 @@
 
 package org.apache.airavata.gfac.core.provider;
 
-import com.google.common.eventbus.EventBus;
+import org.apache.airavata.common.utils.MonitorPublisher;
 import org.apache.airavata.gfac.GFacException;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
 import org.apache.airavata.gfac.core.cpi.GFacImpl;
-import org.apache.airavata.gfac.core.notification.MonitorPublisher;
 import org.apache.airavata.model.workspace.experiment.JobDetails;
 import org.apache.airavata.model.workspace.experiment.JobStatus;
 import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory;

http://git-wip-us.apache.org/repos/asf/airavata/blob/92838e4a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/provider/AbstractRecoverableProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/provider/AbstractRecoverableProvider.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/provider/AbstractRecoverableProvider.java
index 4d4a58e..daed08e 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/provider/AbstractRecoverableProvider.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/provider/AbstractRecoverableProvider.java
@@ -20,11 +20,11 @@
 */
 package org.apache.airavata.gfac.core.provider;
 
+import org.apache.airavata.common.utils.MonitorPublisher;
 import org.apache.airavata.gfac.GFacException;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
 import org.apache.airavata.gfac.core.cpi.GFacImpl;
-import org.apache.airavata.gfac.core.notification.MonitorPublisher;
 import org.apache.airavata.model.workspace.experiment.JobDetails;
 import org.apache.airavata.model.workspace.experiment.JobStatus;
 import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory;