You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sc...@apache.org on 2016/08/29 14:12:45 UTC

[1/2] airavata git commit: updating the registry refactoring code

Repository: airavata
Updated Branches:
  refs/heads/supun/develop cc009e3c6 -> 3ce49b9a6


http://git-wip-us.apache.org/repos/asf/airavata/blob/3ce49b9a/modules/registry-refactoring/src/test/java/org/apache/airavata/registry/core/repositories/RepositoryTest.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/test/java/org/apache/airavata/registry/core/repositories/RepositoryTest.java b/modules/registry-refactoring/src/test/java/org/apache/airavata/registry/core/repositories/RepositoryTest.java
index 3561d5a..342b73c 100644
--- a/modules/registry-refactoring/src/test/java/org/apache/airavata/registry/core/repositories/RepositoryTest.java
+++ b/modules/registry-refactoring/src/test/java/org/apache/airavata/registry/core/repositories/RepositoryTest.java
@@ -20,13 +20,23 @@
 */
 package org.apache.airavata.registry.core.repositories;
 
+import org.apache.airavata.model.experiment.ExperimentModel;
+import org.apache.airavata.model.experiment.UserConfigurationDataModel;
+import org.apache.airavata.model.user.UserProfile;
 import org.apache.airavata.model.workspace.Gateway;
 import org.apache.airavata.model.workspace.GatewayApprovalStatus;
 import org.apache.airavata.model.workspace.Notification;
+import org.apache.airavata.model.workspace.Project;
+import org.apache.airavata.registry.core.entities.expcatalog.ExperimentEntity;
 import org.apache.airavata.registry.core.entities.workspacecatalog.GatewayEntity;
 import org.apache.airavata.registry.core.entities.workspacecatalog.NotificationEntity;
+import org.apache.airavata.registry.core.entities.workspacecatalog.ProjectEntity;
+import org.apache.airavata.registry.core.entities.workspacecatalog.UserProfileEntity;
+import org.apache.airavata.registry.core.repositories.expcatalog.ExperimentRepository;
 import org.apache.airavata.registry.core.repositories.workspacecatalog.GatewayRepository;
 import org.apache.airavata.registry.core.repositories.workspacecatalog.NotificationRepository;
+import org.apache.airavata.registry.core.repositories.workspacecatalog.ProjectRepository;
+import org.apache.airavata.registry.core.repositories.workspacecatalog.UserProfileRepository;
 import org.junit.Assert;
 import org.junit.Test;
 import org.slf4j.Logger;
@@ -56,5 +66,35 @@ public class RepositoryTest {
         notificationRepository.create(notification);
 
         notificationRepository.get(notification.getNotificationId());
+
+        UserProfile userProfile = new UserProfile();
+        userProfile.setAiravataInternalUserId(UUID.randomUUID().toString());
+        userProfile.setGatewayId(gateway.getGatewayId());
+        UserProfileRepository userProfileRepository = new UserProfileRepository(UserProfile.class, UserProfileEntity.class);
+        userProfileRepository.create(userProfile);
+
+
+        Project project = new Project();
+        project.setProjectID(UUID.randomUUID().toString());
+        project.setOwner(userProfile.getAiravataInternalUserId());
+        project.setGatewayId(gateway.getGatewayId());
+        project.setName("Project Name");
+
+        ProjectRepository projectRepository = new ProjectRepository(Project.class, ProjectEntity.class);
+        projectRepository.create(project);
+
+        ExperimentModel experiment = new ExperimentModel();
+        experiment.setExperimentId(UUID.randomUUID().toString());
+        experiment.setUserName(userProfile.getAiravataInternalUserId());
+        experiment.setProjectId(project.getProjectID());
+        experiment.setGatewayId(gateway.getGatewayId());
+        experiment.setExperimentName("Dummy Experiment");
+
+        UserConfigurationDataModel userConfigurationData = new UserConfigurationDataModel();
+        userConfigurationData.setExperimentDataDir("some/path");
+        experiment.setUserConfigurationData(userConfigurationData);
+
+        ExperimentRepository experimentRepository = new ExperimentRepository(ExperimentModel.class, ExperimentEntity.class);
+        experimentRepository.create(experiment);
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/3ce49b9a/thrift-interface-descriptions/data-models/user-group-models/user_profile_model.thrift
----------------------------------------------------------------------
diff --git a/thrift-interface-descriptions/data-models/user-group-models/user_profile_model.thrift b/thrift-interface-descriptions/data-models/user-group-models/user_profile_model.thrift
index e0c939d..e6b17ba 100644
--- a/thrift-interface-descriptions/data-models/user-group-models/user_profile_model.thrift
+++ b/thrift-interface-descriptions/data-models/user-group-models/user_profile_model.thrift
@@ -164,21 +164,22 @@ struct UserProfile {
     1: required string userModelVersion = USER_PROFILE_VERSION,
     2: required string airavataInternalUserId = airavata_commons.DEFAULT_ID,
     3: required string userId,
-    4: required list<string> emails,
-    5: optional string userName,
-    6: optional string orcidId,
-    7: optional list<string> phones,
-    8: optional string country,
-    9: optional list<string> nationality,
-    10: optional string homeOrganization,
-    11: optional string orginationAffiliation,
-    12: required string creationTime,
-    13: required string lastAccessTime,
-    14: required string validUntil,
-    15: required Status State,
-    16: optional string comments,
-    17: optional list<string> labeledURI,
-    18: optional string gpgKey,
-    19: optional string timeZone,
-    20: optional NSFDemographics nsfDemographics
+    4: required string gatewayId,
+    5: required list<string> emails,
+    6: optional string userName,
+    7: optional string orcidId,
+    8: optional list<string> phones,
+    9: optional string country,
+    10: optional list<string> nationality,
+    11: optional string homeOrganization,
+    12: optional string orginationAffiliation,
+    13: required string creationTime,
+    14: required string lastAccessTime,
+    15: required string validUntil,
+    16: required Status State,
+    17: optional string comments,
+    18: optional list<string> labeledURI,
+    19: optional string gpgKey,
+    20: optional string timeZone,
+    21: optional NSFDemographics nsfDemographics
 }
\ No newline at end of file


[2/2] airavata git commit: updating the registry refactoring code

Posted by sc...@apache.org.
updating the registry refactoring code


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

Branch: refs/heads/supun/develop
Commit: 3ce49b9a6530bbe0f1c2249668473b67b1bb29ae
Parents: cc009e3
Author: scnakandala <su...@gmail.com>
Authored: Mon Aug 29 10:12:34 2016 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Mon Aug 29 10:12:34 2016 -0400

----------------------------------------------------------------------
 .../lib/airavata/user_profile_model_types.cpp   |  89 +++++++++-----
 .../lib/airavata/user_profile_model_types.h     |   7 +-
 .../resources/lib/Airavata/Model/User/Types.php | 121 +++++++++++--------
 .../lib/apache/airavata/model/user/ttypes.py    | 117 ++++++++++--------
 modules/registry-refactoring/pom.xml            |   2 +-
 .../entities/expcatalog/ExperimentEntity.java   |  20 ++-
 .../expcatalog/ExperimentErrorEntity.java       |   2 +
 .../entities/expcatalog/ExperimentErrorPK.java  |  75 ++++++++++++
 .../expcatalog/ExperimentInputEntity.java       |   5 +-
 .../entities/expcatalog/ExperimentInputPK.java  |  74 ++++++++++++
 .../expcatalog/ExperimentOutputEntity.java      |  22 +++-
 .../entities/expcatalog/ExperimentOutputPK.java |  74 ++++++++++++
 .../expcatalog/ExperimentStatusEntity.java      |  83 +++++++++++++
 .../entities/expcatalog/ExperimentStatusPK.java |  74 ++++++++++++
 .../expcatalog/UserConfigurationEntity.java     |   2 +-
 .../expcatalog/ExperimentRepository.java        |  72 +++++++++++
 .../expcatalog/ExperimentRespository.java       |  43 -------
 .../src/main/resources/META-INF/persistence.xml |   6 +
 .../src/main/resources/experiment_catalog.sql   |  69 ++++++-----
 .../src/main/resources/workspace_catalog.sql    |   4 +-
 .../core/repositories/RepositoryTest.java       |  40 ++++++
 .../user-group-models/user_profile_model.thrift |  35 +++---
 22 files changed, 797 insertions(+), 239 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/3ce49b9a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/user_profile_model_types.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/user_profile_model_types.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/user_profile_model_types.cpp
index f89e46f..8dbb408 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/user_profile_model_types.cpp
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/user_profile_model_types.cpp
@@ -377,6 +377,10 @@ void UserProfile::__set_userId(const std::string& val) {
   this->userId = val;
 }
 
+void UserProfile::__set_gatewayId(const std::string& val) {
+  this->gatewayId = val;
+}
+
 void UserProfile::__set_emails(const std::vector<std::string> & val) {
   this->emails = val;
 }
@@ -472,6 +476,7 @@ uint32_t UserProfile::read(::apache::thrift::protocol::TProtocol* iprot) {
   bool isset_userModelVersion = false;
   bool isset_airavataInternalUserId = false;
   bool isset_userId = false;
+  bool isset_gatewayId = false;
   bool isset_emails = false;
   bool isset_creationTime = false;
   bool isset_lastAccessTime = false;
@@ -511,6 +516,14 @@ uint32_t UserProfile::read(::apache::thrift::protocol::TProtocol* iprot) {
         }
         break;
       case 4:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->gatewayId);
+          isset_gatewayId = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 5:
         if (ftype == ::apache::thrift::protocol::T_LIST) {
           {
             this->emails.clear();
@@ -530,7 +543,7 @@ uint32_t UserProfile::read(::apache::thrift::protocol::TProtocol* iprot) {
           xfer += iprot->skip(ftype);
         }
         break;
-      case 5:
+      case 6:
         if (ftype == ::apache::thrift::protocol::T_STRING) {
           xfer += iprot->readString(this->userName);
           this->__isset.userName = true;
@@ -538,7 +551,7 @@ uint32_t UserProfile::read(::apache::thrift::protocol::TProtocol* iprot) {
           xfer += iprot->skip(ftype);
         }
         break;
-      case 6:
+      case 7:
         if (ftype == ::apache::thrift::protocol::T_STRING) {
           xfer += iprot->readString(this->orcidId);
           this->__isset.orcidId = true;
@@ -546,7 +559,7 @@ uint32_t UserProfile::read(::apache::thrift::protocol::TProtocol* iprot) {
           xfer += iprot->skip(ftype);
         }
         break;
-      case 7:
+      case 8:
         if (ftype == ::apache::thrift::protocol::T_LIST) {
           {
             this->phones.clear();
@@ -566,7 +579,7 @@ uint32_t UserProfile::read(::apache::thrift::protocol::TProtocol* iprot) {
           xfer += iprot->skip(ftype);
         }
         break;
-      case 8:
+      case 9:
         if (ftype == ::apache::thrift::protocol::T_STRING) {
           xfer += iprot->readString(this->country);
           this->__isset.country = true;
@@ -574,7 +587,7 @@ uint32_t UserProfile::read(::apache::thrift::protocol::TProtocol* iprot) {
           xfer += iprot->skip(ftype);
         }
         break;
-      case 9:
+      case 10:
         if (ftype == ::apache::thrift::protocol::T_LIST) {
           {
             this->nationality.clear();
@@ -594,7 +607,7 @@ uint32_t UserProfile::read(::apache::thrift::protocol::TProtocol* iprot) {
           xfer += iprot->skip(ftype);
         }
         break;
-      case 10:
+      case 11:
         if (ftype == ::apache::thrift::protocol::T_STRING) {
           xfer += iprot->readString(this->homeOrganization);
           this->__isset.homeOrganization = true;
@@ -602,7 +615,7 @@ uint32_t UserProfile::read(::apache::thrift::protocol::TProtocol* iprot) {
           xfer += iprot->skip(ftype);
         }
         break;
-      case 11:
+      case 12:
         if (ftype == ::apache::thrift::protocol::T_STRING) {
           xfer += iprot->readString(this->orginationAffiliation);
           this->__isset.orginationAffiliation = true;
@@ -610,7 +623,7 @@ uint32_t UserProfile::read(::apache::thrift::protocol::TProtocol* iprot) {
           xfer += iprot->skip(ftype);
         }
         break;
-      case 12:
+      case 13:
         if (ftype == ::apache::thrift::protocol::T_STRING) {
           xfer += iprot->readString(this->creationTime);
           isset_creationTime = true;
@@ -618,7 +631,7 @@ uint32_t UserProfile::read(::apache::thrift::protocol::TProtocol* iprot) {
           xfer += iprot->skip(ftype);
         }
         break;
-      case 13:
+      case 14:
         if (ftype == ::apache::thrift::protocol::T_STRING) {
           xfer += iprot->readString(this->lastAccessTime);
           isset_lastAccessTime = true;
@@ -626,7 +639,7 @@ uint32_t UserProfile::read(::apache::thrift::protocol::TProtocol* iprot) {
           xfer += iprot->skip(ftype);
         }
         break;
-      case 14:
+      case 15:
         if (ftype == ::apache::thrift::protocol::T_STRING) {
           xfer += iprot->readString(this->validUntil);
           isset_validUntil = true;
@@ -634,7 +647,7 @@ uint32_t UserProfile::read(::apache::thrift::protocol::TProtocol* iprot) {
           xfer += iprot->skip(ftype);
         }
         break;
-      case 15:
+      case 16:
         if (ftype == ::apache::thrift::protocol::T_I32) {
           int32_t ecast39;
           xfer += iprot->readI32(ecast39);
@@ -644,7 +657,7 @@ uint32_t UserProfile::read(::apache::thrift::protocol::TProtocol* iprot) {
           xfer += iprot->skip(ftype);
         }
         break;
-      case 16:
+      case 17:
         if (ftype == ::apache::thrift::protocol::T_STRING) {
           xfer += iprot->readString(this->comments);
           this->__isset.comments = true;
@@ -652,7 +665,7 @@ uint32_t UserProfile::read(::apache::thrift::protocol::TProtocol* iprot) {
           xfer += iprot->skip(ftype);
         }
         break;
-      case 17:
+      case 18:
         if (ftype == ::apache::thrift::protocol::T_LIST) {
           {
             this->labeledURI.clear();
@@ -672,7 +685,7 @@ uint32_t UserProfile::read(::apache::thrift::protocol::TProtocol* iprot) {
           xfer += iprot->skip(ftype);
         }
         break;
-      case 18:
+      case 19:
         if (ftype == ::apache::thrift::protocol::T_STRING) {
           xfer += iprot->readString(this->gpgKey);
           this->__isset.gpgKey = true;
@@ -680,7 +693,7 @@ uint32_t UserProfile::read(::apache::thrift::protocol::TProtocol* iprot) {
           xfer += iprot->skip(ftype);
         }
         break;
-      case 19:
+      case 20:
         if (ftype == ::apache::thrift::protocol::T_STRING) {
           xfer += iprot->readString(this->timeZone);
           this->__isset.timeZone = true;
@@ -688,7 +701,7 @@ uint32_t UserProfile::read(::apache::thrift::protocol::TProtocol* iprot) {
           xfer += iprot->skip(ftype);
         }
         break;
-      case 20:
+      case 21:
         if (ftype == ::apache::thrift::protocol::T_STRUCT) {
           xfer += this->nsfDemographics.read(iprot);
           this->__isset.nsfDemographics = true;
@@ -711,6 +724,8 @@ uint32_t UserProfile::read(::apache::thrift::protocol::TProtocol* iprot) {
     throw TProtocolException(TProtocolException::INVALID_DATA);
   if (!isset_userId)
     throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_gatewayId)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
   if (!isset_emails)
     throw TProtocolException(TProtocolException::INVALID_DATA);
   if (!isset_creationTime)
@@ -741,7 +756,11 @@ uint32_t UserProfile::write(::apache::thrift::protocol::TProtocol* oprot) const
   xfer += oprot->writeString(this->userId);
   xfer += oprot->writeFieldEnd();
 
-  xfer += oprot->writeFieldBegin("emails", ::apache::thrift::protocol::T_LIST, 4);
+  xfer += oprot->writeFieldBegin("gatewayId", ::apache::thrift::protocol::T_STRING, 4);
+  xfer += oprot->writeString(this->gatewayId);
+  xfer += oprot->writeFieldEnd();
+
+  xfer += oprot->writeFieldBegin("emails", ::apache::thrift::protocol::T_LIST, 5);
   {
     xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->emails.size()));
     std::vector<std::string> ::const_iterator _iter45;
@@ -754,17 +773,17 @@ uint32_t UserProfile::write(::apache::thrift::protocol::TProtocol* oprot) const
   xfer += oprot->writeFieldEnd();
 
   if (this->__isset.userName) {
-    xfer += oprot->writeFieldBegin("userName", ::apache::thrift::protocol::T_STRING, 5);
+    xfer += oprot->writeFieldBegin("userName", ::apache::thrift::protocol::T_STRING, 6);
     xfer += oprot->writeString(this->userName);
     xfer += oprot->writeFieldEnd();
   }
   if (this->__isset.orcidId) {
-    xfer += oprot->writeFieldBegin("orcidId", ::apache::thrift::protocol::T_STRING, 6);
+    xfer += oprot->writeFieldBegin("orcidId", ::apache::thrift::protocol::T_STRING, 7);
     xfer += oprot->writeString(this->orcidId);
     xfer += oprot->writeFieldEnd();
   }
   if (this->__isset.phones) {
-    xfer += oprot->writeFieldBegin("phones", ::apache::thrift::protocol::T_LIST, 7);
+    xfer += oprot->writeFieldBegin("phones", ::apache::thrift::protocol::T_LIST, 8);
     {
       xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->phones.size()));
       std::vector<std::string> ::const_iterator _iter46;
@@ -777,12 +796,12 @@ uint32_t UserProfile::write(::apache::thrift::protocol::TProtocol* oprot) const
     xfer += oprot->writeFieldEnd();
   }
   if (this->__isset.country) {
-    xfer += oprot->writeFieldBegin("country", ::apache::thrift::protocol::T_STRING, 8);
+    xfer += oprot->writeFieldBegin("country", ::apache::thrift::protocol::T_STRING, 9);
     xfer += oprot->writeString(this->country);
     xfer += oprot->writeFieldEnd();
   }
   if (this->__isset.nationality) {
-    xfer += oprot->writeFieldBegin("nationality", ::apache::thrift::protocol::T_LIST, 9);
+    xfer += oprot->writeFieldBegin("nationality", ::apache::thrift::protocol::T_LIST, 10);
     {
       xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->nationality.size()));
       std::vector<std::string> ::const_iterator _iter47;
@@ -795,38 +814,38 @@ uint32_t UserProfile::write(::apache::thrift::protocol::TProtocol* oprot) const
     xfer += oprot->writeFieldEnd();
   }
   if (this->__isset.homeOrganization) {
-    xfer += oprot->writeFieldBegin("homeOrganization", ::apache::thrift::protocol::T_STRING, 10);
+    xfer += oprot->writeFieldBegin("homeOrganization", ::apache::thrift::protocol::T_STRING, 11);
     xfer += oprot->writeString(this->homeOrganization);
     xfer += oprot->writeFieldEnd();
   }
   if (this->__isset.orginationAffiliation) {
-    xfer += oprot->writeFieldBegin("orginationAffiliation", ::apache::thrift::protocol::T_STRING, 11);
+    xfer += oprot->writeFieldBegin("orginationAffiliation", ::apache::thrift::protocol::T_STRING, 12);
     xfer += oprot->writeString(this->orginationAffiliation);
     xfer += oprot->writeFieldEnd();
   }
-  xfer += oprot->writeFieldBegin("creationTime", ::apache::thrift::protocol::T_STRING, 12);
+  xfer += oprot->writeFieldBegin("creationTime", ::apache::thrift::protocol::T_STRING, 13);
   xfer += oprot->writeString(this->creationTime);
   xfer += oprot->writeFieldEnd();
 
-  xfer += oprot->writeFieldBegin("lastAccessTime", ::apache::thrift::protocol::T_STRING, 13);
+  xfer += oprot->writeFieldBegin("lastAccessTime", ::apache::thrift::protocol::T_STRING, 14);
   xfer += oprot->writeString(this->lastAccessTime);
   xfer += oprot->writeFieldEnd();
 
-  xfer += oprot->writeFieldBegin("validUntil", ::apache::thrift::protocol::T_STRING, 14);
+  xfer += oprot->writeFieldBegin("validUntil", ::apache::thrift::protocol::T_STRING, 15);
   xfer += oprot->writeString(this->validUntil);
   xfer += oprot->writeFieldEnd();
 
-  xfer += oprot->writeFieldBegin("State", ::apache::thrift::protocol::T_I32, 15);
+  xfer += oprot->writeFieldBegin("State", ::apache::thrift::protocol::T_I32, 16);
   xfer += oprot->writeI32((int32_t)this->State);
   xfer += oprot->writeFieldEnd();
 
   if (this->__isset.comments) {
-    xfer += oprot->writeFieldBegin("comments", ::apache::thrift::protocol::T_STRING, 16);
+    xfer += oprot->writeFieldBegin("comments", ::apache::thrift::protocol::T_STRING, 17);
     xfer += oprot->writeString(this->comments);
     xfer += oprot->writeFieldEnd();
   }
   if (this->__isset.labeledURI) {
-    xfer += oprot->writeFieldBegin("labeledURI", ::apache::thrift::protocol::T_LIST, 17);
+    xfer += oprot->writeFieldBegin("labeledURI", ::apache::thrift::protocol::T_LIST, 18);
     {
       xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->labeledURI.size()));
       std::vector<std::string> ::const_iterator _iter48;
@@ -839,17 +858,17 @@ uint32_t UserProfile::write(::apache::thrift::protocol::TProtocol* oprot) const
     xfer += oprot->writeFieldEnd();
   }
   if (this->__isset.gpgKey) {
-    xfer += oprot->writeFieldBegin("gpgKey", ::apache::thrift::protocol::T_STRING, 18);
+    xfer += oprot->writeFieldBegin("gpgKey", ::apache::thrift::protocol::T_STRING, 19);
     xfer += oprot->writeString(this->gpgKey);
     xfer += oprot->writeFieldEnd();
   }
   if (this->__isset.timeZone) {
-    xfer += oprot->writeFieldBegin("timeZone", ::apache::thrift::protocol::T_STRING, 19);
+    xfer += oprot->writeFieldBegin("timeZone", ::apache::thrift::protocol::T_STRING, 20);
     xfer += oprot->writeString(this->timeZone);
     xfer += oprot->writeFieldEnd();
   }
   if (this->__isset.nsfDemographics) {
-    xfer += oprot->writeFieldBegin("nsfDemographics", ::apache::thrift::protocol::T_STRUCT, 20);
+    xfer += oprot->writeFieldBegin("nsfDemographics", ::apache::thrift::protocol::T_STRUCT, 21);
     xfer += this->nsfDemographics.write(oprot);
     xfer += oprot->writeFieldEnd();
   }
@@ -863,6 +882,7 @@ void swap(UserProfile &a, UserProfile &b) {
   swap(a.userModelVersion, b.userModelVersion);
   swap(a.airavataInternalUserId, b.airavataInternalUserId);
   swap(a.userId, b.userId);
+  swap(a.gatewayId, b.gatewayId);
   swap(a.emails, b.emails);
   swap(a.userName, b.userName);
   swap(a.orcidId, b.orcidId);
@@ -887,6 +907,7 @@ UserProfile::UserProfile(const UserProfile& other49) {
   userModelVersion = other49.userModelVersion;
   airavataInternalUserId = other49.airavataInternalUserId;
   userId = other49.userId;
+  gatewayId = other49.gatewayId;
   emails = other49.emails;
   userName = other49.userName;
   orcidId = other49.orcidId;
@@ -910,6 +931,7 @@ UserProfile& UserProfile::operator=(const UserProfile& other50) {
   userModelVersion = other50.userModelVersion;
   airavataInternalUserId = other50.airavataInternalUserId;
   userId = other50.userId;
+  gatewayId = other50.gatewayId;
   emails = other50.emails;
   userName = other50.userName;
   orcidId = other50.orcidId;
@@ -936,6 +958,7 @@ void UserProfile::printTo(std::ostream& out) const {
   out << "userModelVersion=" << to_string(userModelVersion);
   out << ", " << "airavataInternalUserId=" << to_string(airavataInternalUserId);
   out << ", " << "userId=" << to_string(userId);
+  out << ", " << "gatewayId=" << to_string(gatewayId);
   out << ", " << "emails=" << to_string(emails);
   out << ", " << "userName="; (__isset.userName ? (out << to_string(userName)) : (out << "<null>"));
   out << ", " << "orcidId="; (__isset.orcidId ? (out << to_string(orcidId)) : (out << "<null>"));

http://git-wip-us.apache.org/repos/asf/airavata/blob/3ce49b9a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/user_profile_model_types.h
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/user_profile_model_types.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/user_profile_model_types.h
index 4ae9bad..69fa0a0 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/user_profile_model_types.h
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/user_profile_model_types.h
@@ -205,13 +205,14 @@ class UserProfile {
 
   UserProfile(const UserProfile&);
   UserProfile& operator=(const UserProfile&);
-  UserProfile() : userModelVersion("1.0"), airavataInternalUserId("DO_NOT_SET_AT_CLIENTS"), userId(), userName(), orcidId(), country(), homeOrganization(), orginationAffiliation(), creationTime(), lastAccessTime(), validUntil(), State((Status::type)0), comments(), gpgKey(), timeZone() {
+  UserProfile() : userModelVersion("1.0"), airavataInternalUserId("DO_NOT_SET_AT_CLIENTS"), userId(), gatewayId(), userName(), orcidId(), country(), homeOrganization(), orginationAffiliation(), creationTime(), lastAccessTime(), validUntil(), State((Status::type)0), comments(), gpgKey(), timeZone() {
   }
 
   virtual ~UserProfile() throw();
   std::string userModelVersion;
   std::string airavataInternalUserId;
   std::string userId;
+  std::string gatewayId;
   std::vector<std::string>  emails;
   std::string userName;
   std::string orcidId;
@@ -238,6 +239,8 @@ class UserProfile {
 
   void __set_userId(const std::string& val);
 
+  void __set_gatewayId(const std::string& val);
+
   void __set_emails(const std::vector<std::string> & val);
 
   void __set_userName(const std::string& val);
@@ -280,6 +283,8 @@ class UserProfile {
       return false;
     if (!(userId == rhs.userId))
       return false;
+    if (!(gatewayId == rhs.gatewayId))
+      return false;
     if (!(emails == rhs.emails))
       return false;
     if (__isset.userName != rhs.__isset.userName)

http://git-wip-us.apache.org/repos/asf/airavata/blob/3ce49b9a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/User/Types.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/User/Types.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/User/Types.php
index 250ef09..c9aa616 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/User/Types.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/User/Types.php
@@ -440,6 +440,10 @@ class UserProfile {
    */
   public $userId = null;
   /**
+   * @var string
+   */
+  public $gatewayId = null;
+  /**
    * @var string[]
    */
   public $emails = null;
@@ -524,6 +528,10 @@ class UserProfile {
           'type' => TType::STRING,
           ),
         4 => array(
+          'var' => 'gatewayId',
+          'type' => TType::STRING,
+          ),
+        5 => array(
           'var' => 'emails',
           'type' => TType::LST,
           'etype' => TType::STRING,
@@ -531,15 +539,15 @@ class UserProfile {
             'type' => TType::STRING,
             ),
           ),
-        5 => array(
+        6 => array(
           'var' => 'userName',
           'type' => TType::STRING,
           ),
-        6 => array(
+        7 => array(
           'var' => 'orcidId',
           'type' => TType::STRING,
           ),
-        7 => array(
+        8 => array(
           'var' => 'phones',
           'type' => TType::LST,
           'etype' => TType::STRING,
@@ -547,11 +555,11 @@ class UserProfile {
             'type' => TType::STRING,
             ),
           ),
-        8 => array(
+        9 => array(
           'var' => 'country',
           'type' => TType::STRING,
           ),
-        9 => array(
+        10 => array(
           'var' => 'nationality',
           'type' => TType::LST,
           'etype' => TType::STRING,
@@ -559,35 +567,35 @@ class UserProfile {
             'type' => TType::STRING,
             ),
           ),
-        10 => array(
+        11 => array(
           'var' => 'homeOrganization',
           'type' => TType::STRING,
           ),
-        11 => array(
+        12 => array(
           'var' => 'orginationAffiliation',
           'type' => TType::STRING,
           ),
-        12 => array(
+        13 => array(
           'var' => 'creationTime',
           'type' => TType::STRING,
           ),
-        13 => array(
+        14 => array(
           'var' => 'lastAccessTime',
           'type' => TType::STRING,
           ),
-        14 => array(
+        15 => array(
           'var' => 'validUntil',
           'type' => TType::STRING,
           ),
-        15 => array(
+        16 => array(
           'var' => 'State',
           'type' => TType::I32,
           ),
-        16 => array(
+        17 => array(
           'var' => 'comments',
           'type' => TType::STRING,
           ),
-        17 => array(
+        18 => array(
           'var' => 'labeledURI',
           'type' => TType::LST,
           'etype' => TType::STRING,
@@ -595,15 +603,15 @@ class UserProfile {
             'type' => TType::STRING,
             ),
           ),
-        18 => array(
+        19 => array(
           'var' => 'gpgKey',
           'type' => TType::STRING,
           ),
-        19 => array(
+        20 => array(
           'var' => 'timeZone',
           'type' => TType::STRING,
           ),
-        20 => array(
+        21 => array(
           'var' => 'nsfDemographics',
           'type' => TType::STRUCT,
           'class' => '\Airavata\Model\User\NSFDemographics',
@@ -620,6 +628,9 @@ class UserProfile {
       if (isset($vals['userId'])) {
         $this->userId = $vals['userId'];
       }
+      if (isset($vals['gatewayId'])) {
+        $this->gatewayId = $vals['gatewayId'];
+      }
       if (isset($vals['emails'])) {
         $this->emails = $vals['emails'];
       }
@@ -715,6 +726,13 @@ class UserProfile {
           }
           break;
         case 4:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->gatewayId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 5:
           if ($ftype == TType::LST) {
             $this->emails = array();
             $_size21 = 0;
@@ -731,21 +749,21 @@ class UserProfile {
             $xfer += $input->skip($ftype);
           }
           break;
-        case 5:
+        case 6:
           if ($ftype == TType::STRING) {
             $xfer += $input->readString($this->userName);
           } else {
             $xfer += $input->skip($ftype);
           }
           break;
-        case 6:
+        case 7:
           if ($ftype == TType::STRING) {
             $xfer += $input->readString($this->orcidId);
           } else {
             $xfer += $input->skip($ftype);
           }
           break;
-        case 7:
+        case 8:
           if ($ftype == TType::LST) {
             $this->phones = array();
             $_size27 = 0;
@@ -762,14 +780,14 @@ class UserProfile {
             $xfer += $input->skip($ftype);
           }
           break;
-        case 8:
+        case 9:
           if ($ftype == TType::STRING) {
             $xfer += $input->readString($this->country);
           } else {
             $xfer += $input->skip($ftype);
           }
           break;
-        case 9:
+        case 10:
           if ($ftype == TType::LST) {
             $this->nationality = array();
             $_size33 = 0;
@@ -786,56 +804,56 @@ class UserProfile {
             $xfer += $input->skip($ftype);
           }
           break;
-        case 10:
+        case 11:
           if ($ftype == TType::STRING) {
             $xfer += $input->readString($this->homeOrganization);
           } else {
             $xfer += $input->skip($ftype);
           }
           break;
-        case 11:
+        case 12:
           if ($ftype == TType::STRING) {
             $xfer += $input->readString($this->orginationAffiliation);
           } else {
             $xfer += $input->skip($ftype);
           }
           break;
-        case 12:
+        case 13:
           if ($ftype == TType::STRING) {
             $xfer += $input->readString($this->creationTime);
           } else {
             $xfer += $input->skip($ftype);
           }
           break;
-        case 13:
+        case 14:
           if ($ftype == TType::STRING) {
             $xfer += $input->readString($this->lastAccessTime);
           } else {
             $xfer += $input->skip($ftype);
           }
           break;
-        case 14:
+        case 15:
           if ($ftype == TType::STRING) {
             $xfer += $input->readString($this->validUntil);
           } else {
             $xfer += $input->skip($ftype);
           }
           break;
-        case 15:
+        case 16:
           if ($ftype == TType::I32) {
             $xfer += $input->readI32($this->State);
           } else {
             $xfer += $input->skip($ftype);
           }
           break;
-        case 16:
+        case 17:
           if ($ftype == TType::STRING) {
             $xfer += $input->readString($this->comments);
           } else {
             $xfer += $input->skip($ftype);
           }
           break;
-        case 17:
+        case 18:
           if ($ftype == TType::LST) {
             $this->labeledURI = array();
             $_size39 = 0;
@@ -852,21 +870,21 @@ class UserProfile {
             $xfer += $input->skip($ftype);
           }
           break;
-        case 18:
+        case 19:
           if ($ftype == TType::STRING) {
             $xfer += $input->readString($this->gpgKey);
           } else {
             $xfer += $input->skip($ftype);
           }
           break;
-        case 19:
+        case 20:
           if ($ftype == TType::STRING) {
             $xfer += $input->readString($this->timeZone);
           } else {
             $xfer += $input->skip($ftype);
           }
           break;
-        case 20:
+        case 21:
           if ($ftype == TType::STRUCT) {
             $this->nsfDemographics = new \Airavata\Model\User\NSFDemographics();
             $xfer += $this->nsfDemographics->read($input);
@@ -902,11 +920,16 @@ class UserProfile {
       $xfer += $output->writeString($this->userId);
       $xfer += $output->writeFieldEnd();
     }
+    if ($this->gatewayId !== null) {
+      $xfer += $output->writeFieldBegin('gatewayId', TType::STRING, 4);
+      $xfer += $output->writeString($this->gatewayId);
+      $xfer += $output->writeFieldEnd();
+    }
     if ($this->emails !== null) {
       if (!is_array($this->emails)) {
         throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
       }
-      $xfer += $output->writeFieldBegin('emails', TType::LST, 4);
+      $xfer += $output->writeFieldBegin('emails', TType::LST, 5);
       {
         $output->writeListBegin(TType::STRING, count($this->emails));
         {
@@ -920,12 +943,12 @@ class UserProfile {
       $xfer += $output->writeFieldEnd();
     }
     if ($this->userName !== null) {
-      $xfer += $output->writeFieldBegin('userName', TType::STRING, 5);
+      $xfer += $output->writeFieldBegin('userName', TType::STRING, 6);
       $xfer += $output->writeString($this->userName);
       $xfer += $output->writeFieldEnd();
     }
     if ($this->orcidId !== null) {
-      $xfer += $output->writeFieldBegin('orcidId', TType::STRING, 6);
+      $xfer += $output->writeFieldBegin('orcidId', TType::STRING, 7);
       $xfer += $output->writeString($this->orcidId);
       $xfer += $output->writeFieldEnd();
     }
@@ -933,7 +956,7 @@ class UserProfile {
       if (!is_array($this->phones)) {
         throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
       }
-      $xfer += $output->writeFieldBegin('phones', TType::LST, 7);
+      $xfer += $output->writeFieldBegin('phones', TType::LST, 8);
       {
         $output->writeListBegin(TType::STRING, count($this->phones));
         {
@@ -947,7 +970,7 @@ class UserProfile {
       $xfer += $output->writeFieldEnd();
     }
     if ($this->country !== null) {
-      $xfer += $output->writeFieldBegin('country', TType::STRING, 8);
+      $xfer += $output->writeFieldBegin('country', TType::STRING, 9);
       $xfer += $output->writeString($this->country);
       $xfer += $output->writeFieldEnd();
     }
@@ -955,7 +978,7 @@ class UserProfile {
       if (!is_array($this->nationality)) {
         throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
       }
-      $xfer += $output->writeFieldBegin('nationality', TType::LST, 9);
+      $xfer += $output->writeFieldBegin('nationality', TType::LST, 10);
       {
         $output->writeListBegin(TType::STRING, count($this->nationality));
         {
@@ -969,37 +992,37 @@ class UserProfile {
       $xfer += $output->writeFieldEnd();
     }
     if ($this->homeOrganization !== null) {
-      $xfer += $output->writeFieldBegin('homeOrganization', TType::STRING, 10);
+      $xfer += $output->writeFieldBegin('homeOrganization', TType::STRING, 11);
       $xfer += $output->writeString($this->homeOrganization);
       $xfer += $output->writeFieldEnd();
     }
     if ($this->orginationAffiliation !== null) {
-      $xfer += $output->writeFieldBegin('orginationAffiliation', TType::STRING, 11);
+      $xfer += $output->writeFieldBegin('orginationAffiliation', TType::STRING, 12);
       $xfer += $output->writeString($this->orginationAffiliation);
       $xfer += $output->writeFieldEnd();
     }
     if ($this->creationTime !== null) {
-      $xfer += $output->writeFieldBegin('creationTime', TType::STRING, 12);
+      $xfer += $output->writeFieldBegin('creationTime', TType::STRING, 13);
       $xfer += $output->writeString($this->creationTime);
       $xfer += $output->writeFieldEnd();
     }
     if ($this->lastAccessTime !== null) {
-      $xfer += $output->writeFieldBegin('lastAccessTime', TType::STRING, 13);
+      $xfer += $output->writeFieldBegin('lastAccessTime', TType::STRING, 14);
       $xfer += $output->writeString($this->lastAccessTime);
       $xfer += $output->writeFieldEnd();
     }
     if ($this->validUntil !== null) {
-      $xfer += $output->writeFieldBegin('validUntil', TType::STRING, 14);
+      $xfer += $output->writeFieldBegin('validUntil', TType::STRING, 15);
       $xfer += $output->writeString($this->validUntil);
       $xfer += $output->writeFieldEnd();
     }
     if ($this->State !== null) {
-      $xfer += $output->writeFieldBegin('State', TType::I32, 15);
+      $xfer += $output->writeFieldBegin('State', TType::I32, 16);
       $xfer += $output->writeI32($this->State);
       $xfer += $output->writeFieldEnd();
     }
     if ($this->comments !== null) {
-      $xfer += $output->writeFieldBegin('comments', TType::STRING, 16);
+      $xfer += $output->writeFieldBegin('comments', TType::STRING, 17);
       $xfer += $output->writeString($this->comments);
       $xfer += $output->writeFieldEnd();
     }
@@ -1007,7 +1030,7 @@ class UserProfile {
       if (!is_array($this->labeledURI)) {
         throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
       }
-      $xfer += $output->writeFieldBegin('labeledURI', TType::LST, 17);
+      $xfer += $output->writeFieldBegin('labeledURI', TType::LST, 18);
       {
         $output->writeListBegin(TType::STRING, count($this->labeledURI));
         {
@@ -1021,12 +1044,12 @@ class UserProfile {
       $xfer += $output->writeFieldEnd();
     }
     if ($this->gpgKey !== null) {
-      $xfer += $output->writeFieldBegin('gpgKey', TType::STRING, 18);
+      $xfer += $output->writeFieldBegin('gpgKey', TType::STRING, 19);
       $xfer += $output->writeString($this->gpgKey);
       $xfer += $output->writeFieldEnd();
     }
     if ($this->timeZone !== null) {
-      $xfer += $output->writeFieldBegin('timeZone', TType::STRING, 19);
+      $xfer += $output->writeFieldBegin('timeZone', TType::STRING, 20);
       $xfer += $output->writeString($this->timeZone);
       $xfer += $output->writeFieldEnd();
     }
@@ -1034,7 +1057,7 @@ class UserProfile {
       if (!is_object($this->nsfDemographics)) {
         throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
       }
-      $xfer += $output->writeFieldBegin('nsfDemographics', TType::STRUCT, 20);
+      $xfer += $output->writeFieldBegin('nsfDemographics', TType::STRUCT, 21);
       $xfer += $this->nsfDemographics->write($output);
       $xfer += $output->writeFieldEnd();
     }

http://git-wip-us.apache.org/repos/asf/airavata/blob/3ce49b9a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/user/ttypes.py
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/user/ttypes.py b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/user/ttypes.py
index fd7d4b8..7e960e7 100644
--- a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/user/ttypes.py
+++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/user/ttypes.py
@@ -369,6 +369,7 @@ class UserProfile:
    - userModelVersion
    - airavataInternalUserId
    - userId
+   - gatewayId
    - emails
    - userName
    - orcidId
@@ -393,29 +394,31 @@ class UserProfile:
     (1, TType.STRING, 'userModelVersion', None, "1.0", ), # 1
     (2, TType.STRING, 'airavataInternalUserId', None, "DO_NOT_SET_AT_CLIENTS", ), # 2
     (3, TType.STRING, 'userId', None, None, ), # 3
-    (4, TType.LIST, 'emails', (TType.STRING,None), None, ), # 4
-    (5, TType.STRING, 'userName', None, None, ), # 5
-    (6, TType.STRING, 'orcidId', None, None, ), # 6
-    (7, TType.LIST, 'phones', (TType.STRING,None), None, ), # 7
-    (8, TType.STRING, 'country', None, None, ), # 8
-    (9, TType.LIST, 'nationality', (TType.STRING,None), None, ), # 9
-    (10, TType.STRING, 'homeOrganization', None, None, ), # 10
-    (11, TType.STRING, 'orginationAffiliation', None, None, ), # 11
-    (12, TType.STRING, 'creationTime', None, None, ), # 12
-    (13, TType.STRING, 'lastAccessTime', None, None, ), # 13
-    (14, TType.STRING, 'validUntil', None, None, ), # 14
-    (15, TType.I32, 'State', None, None, ), # 15
-    (16, TType.STRING, 'comments', None, None, ), # 16
-    (17, TType.LIST, 'labeledURI', (TType.STRING,None), None, ), # 17
-    (18, TType.STRING, 'gpgKey', None, None, ), # 18
-    (19, TType.STRING, 'timeZone', None, None, ), # 19
-    (20, TType.STRUCT, 'nsfDemographics', (NSFDemographics, NSFDemographics.thrift_spec), None, ), # 20
+    (4, TType.STRING, 'gatewayId', None, None, ), # 4
+    (5, TType.LIST, 'emails', (TType.STRING,None), None, ), # 5
+    (6, TType.STRING, 'userName', None, None, ), # 6
+    (7, TType.STRING, 'orcidId', None, None, ), # 7
+    (8, TType.LIST, 'phones', (TType.STRING,None), None, ), # 8
+    (9, TType.STRING, 'country', None, None, ), # 9
+    (10, TType.LIST, 'nationality', (TType.STRING,None), None, ), # 10
+    (11, TType.STRING, 'homeOrganization', None, None, ), # 11
+    (12, TType.STRING, 'orginationAffiliation', None, None, ), # 12
+    (13, TType.STRING, 'creationTime', None, None, ), # 13
+    (14, TType.STRING, 'lastAccessTime', None, None, ), # 14
+    (15, TType.STRING, 'validUntil', None, None, ), # 15
+    (16, TType.I32, 'State', None, None, ), # 16
+    (17, TType.STRING, 'comments', None, None, ), # 17
+    (18, TType.LIST, 'labeledURI', (TType.STRING,None), None, ), # 18
+    (19, TType.STRING, 'gpgKey', None, None, ), # 19
+    (20, TType.STRING, 'timeZone', None, None, ), # 20
+    (21, TType.STRUCT, 'nsfDemographics', (NSFDemographics, NSFDemographics.thrift_spec), None, ), # 21
   )
 
-  def __init__(self, userModelVersion=thrift_spec[1][4], airavataInternalUserId=thrift_spec[2][4], userId=None, emails=None, userName=None, orcidId=None, phones=None, country=None, nationality=None, homeOrganization=None, orginationAffiliation=None, creationTime=None, lastAccessTime=None, validUntil=None, State=None, comments=None, labeledURI=None, gpgKey=None, timeZone=None, nsfDemographics=None,):
+  def __init__(self, userModelVersion=thrift_spec[1][4], airavataInternalUserId=thrift_spec[2][4], userId=None, gatewayId=None, emails=None, userName=None, orcidId=None, phones=None, country=None, nationality=None, homeOrganization=None, orginationAffiliation=None, creationTime=None, lastAccessTime=None, validUntil=None, State=None, comments=None, labeledURI=None, gpgKey=None, timeZone=None, nsfDemographics=None,):
     self.userModelVersion = userModelVersion
     self.airavataInternalUserId = airavataInternalUserId
     self.userId = userId
+    self.gatewayId = gatewayId
     self.emails = emails
     self.userName = userName
     self.orcidId = orcidId
@@ -459,6 +462,11 @@ class UserProfile:
         else:
           iprot.skip(ftype)
       elif fid == 4:
+        if ftype == TType.STRING:
+          self.gatewayId = iprot.readString()
+        else:
+          iprot.skip(ftype)
+      elif fid == 5:
         if ftype == TType.LIST:
           self.emails = []
           (_etype24, _size21) = iprot.readListBegin()
@@ -468,17 +476,17 @@ class UserProfile:
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
-      elif fid == 5:
+      elif fid == 6:
         if ftype == TType.STRING:
           self.userName = iprot.readString()
         else:
           iprot.skip(ftype)
-      elif fid == 6:
+      elif fid == 7:
         if ftype == TType.STRING:
           self.orcidId = iprot.readString()
         else:
           iprot.skip(ftype)
-      elif fid == 7:
+      elif fid == 8:
         if ftype == TType.LIST:
           self.phones = []
           (_etype30, _size27) = iprot.readListBegin()
@@ -488,12 +496,12 @@ class UserProfile:
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
-      elif fid == 8:
+      elif fid == 9:
         if ftype == TType.STRING:
           self.country = iprot.readString()
         else:
           iprot.skip(ftype)
-      elif fid == 9:
+      elif fid == 10:
         if ftype == TType.LIST:
           self.nationality = []
           (_etype36, _size33) = iprot.readListBegin()
@@ -503,42 +511,42 @@ class UserProfile:
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
-      elif fid == 10:
+      elif fid == 11:
         if ftype == TType.STRING:
           self.homeOrganization = iprot.readString()
         else:
           iprot.skip(ftype)
-      elif fid == 11:
+      elif fid == 12:
         if ftype == TType.STRING:
           self.orginationAffiliation = iprot.readString()
         else:
           iprot.skip(ftype)
-      elif fid == 12:
+      elif fid == 13:
         if ftype == TType.STRING:
           self.creationTime = iprot.readString()
         else:
           iprot.skip(ftype)
-      elif fid == 13:
+      elif fid == 14:
         if ftype == TType.STRING:
           self.lastAccessTime = iprot.readString()
         else:
           iprot.skip(ftype)
-      elif fid == 14:
+      elif fid == 15:
         if ftype == TType.STRING:
           self.validUntil = iprot.readString()
         else:
           iprot.skip(ftype)
-      elif fid == 15:
+      elif fid == 16:
         if ftype == TType.I32:
           self.State = iprot.readI32()
         else:
           iprot.skip(ftype)
-      elif fid == 16:
+      elif fid == 17:
         if ftype == TType.STRING:
           self.comments = iprot.readString()
         else:
           iprot.skip(ftype)
-      elif fid == 17:
+      elif fid == 18:
         if ftype == TType.LIST:
           self.labeledURI = []
           (_etype42, _size39) = iprot.readListBegin()
@@ -548,17 +556,17 @@ class UserProfile:
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
-      elif fid == 18:
+      elif fid == 19:
         if ftype == TType.STRING:
           self.gpgKey = iprot.readString()
         else:
           iprot.skip(ftype)
-      elif fid == 19:
+      elif fid == 20:
         if ftype == TType.STRING:
           self.timeZone = iprot.readString()
         else:
           iprot.skip(ftype)
-      elif fid == 20:
+      elif fid == 21:
         if ftype == TType.STRUCT:
           self.nsfDemographics = NSFDemographics()
           self.nsfDemographics.read(iprot)
@@ -586,84 +594,88 @@ class UserProfile:
       oprot.writeFieldBegin('userId', TType.STRING, 3)
       oprot.writeString(self.userId)
       oprot.writeFieldEnd()
+    if self.gatewayId is not None:
+      oprot.writeFieldBegin('gatewayId', TType.STRING, 4)
+      oprot.writeString(self.gatewayId)
+      oprot.writeFieldEnd()
     if self.emails is not None:
-      oprot.writeFieldBegin('emails', TType.LIST, 4)
+      oprot.writeFieldBegin('emails', TType.LIST, 5)
       oprot.writeListBegin(TType.STRING, len(self.emails))
       for iter45 in self.emails:
         oprot.writeString(iter45)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.userName is not None:
-      oprot.writeFieldBegin('userName', TType.STRING, 5)
+      oprot.writeFieldBegin('userName', TType.STRING, 6)
       oprot.writeString(self.userName)
       oprot.writeFieldEnd()
     if self.orcidId is not None:
-      oprot.writeFieldBegin('orcidId', TType.STRING, 6)
+      oprot.writeFieldBegin('orcidId', TType.STRING, 7)
       oprot.writeString(self.orcidId)
       oprot.writeFieldEnd()
     if self.phones is not None:
-      oprot.writeFieldBegin('phones', TType.LIST, 7)
+      oprot.writeFieldBegin('phones', TType.LIST, 8)
       oprot.writeListBegin(TType.STRING, len(self.phones))
       for iter46 in self.phones:
         oprot.writeString(iter46)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.country is not None:
-      oprot.writeFieldBegin('country', TType.STRING, 8)
+      oprot.writeFieldBegin('country', TType.STRING, 9)
       oprot.writeString(self.country)
       oprot.writeFieldEnd()
     if self.nationality is not None:
-      oprot.writeFieldBegin('nationality', TType.LIST, 9)
+      oprot.writeFieldBegin('nationality', TType.LIST, 10)
       oprot.writeListBegin(TType.STRING, len(self.nationality))
       for iter47 in self.nationality:
         oprot.writeString(iter47)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.homeOrganization is not None:
-      oprot.writeFieldBegin('homeOrganization', TType.STRING, 10)
+      oprot.writeFieldBegin('homeOrganization', TType.STRING, 11)
       oprot.writeString(self.homeOrganization)
       oprot.writeFieldEnd()
     if self.orginationAffiliation is not None:
-      oprot.writeFieldBegin('orginationAffiliation', TType.STRING, 11)
+      oprot.writeFieldBegin('orginationAffiliation', TType.STRING, 12)
       oprot.writeString(self.orginationAffiliation)
       oprot.writeFieldEnd()
     if self.creationTime is not None:
-      oprot.writeFieldBegin('creationTime', TType.STRING, 12)
+      oprot.writeFieldBegin('creationTime', TType.STRING, 13)
       oprot.writeString(self.creationTime)
       oprot.writeFieldEnd()
     if self.lastAccessTime is not None:
-      oprot.writeFieldBegin('lastAccessTime', TType.STRING, 13)
+      oprot.writeFieldBegin('lastAccessTime', TType.STRING, 14)
       oprot.writeString(self.lastAccessTime)
       oprot.writeFieldEnd()
     if self.validUntil is not None:
-      oprot.writeFieldBegin('validUntil', TType.STRING, 14)
+      oprot.writeFieldBegin('validUntil', TType.STRING, 15)
       oprot.writeString(self.validUntil)
       oprot.writeFieldEnd()
     if self.State is not None:
-      oprot.writeFieldBegin('State', TType.I32, 15)
+      oprot.writeFieldBegin('State', TType.I32, 16)
       oprot.writeI32(self.State)
       oprot.writeFieldEnd()
     if self.comments is not None:
-      oprot.writeFieldBegin('comments', TType.STRING, 16)
+      oprot.writeFieldBegin('comments', TType.STRING, 17)
       oprot.writeString(self.comments)
       oprot.writeFieldEnd()
     if self.labeledURI is not None:
-      oprot.writeFieldBegin('labeledURI', TType.LIST, 17)
+      oprot.writeFieldBegin('labeledURI', TType.LIST, 18)
       oprot.writeListBegin(TType.STRING, len(self.labeledURI))
       for iter48 in self.labeledURI:
         oprot.writeString(iter48)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.gpgKey is not None:
-      oprot.writeFieldBegin('gpgKey', TType.STRING, 18)
+      oprot.writeFieldBegin('gpgKey', TType.STRING, 19)
       oprot.writeString(self.gpgKey)
       oprot.writeFieldEnd()
     if self.timeZone is not None:
-      oprot.writeFieldBegin('timeZone', TType.STRING, 19)
+      oprot.writeFieldBegin('timeZone', TType.STRING, 20)
       oprot.writeString(self.timeZone)
       oprot.writeFieldEnd()
     if self.nsfDemographics is not None:
-      oprot.writeFieldBegin('nsfDemographics', TType.STRUCT, 20)
+      oprot.writeFieldBegin('nsfDemographics', TType.STRUCT, 21)
       self.nsfDemographics.write(oprot)
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
@@ -676,6 +688,8 @@ class UserProfile:
       raise TProtocol.TProtocolException(message='Required field airavataInternalUserId is unset!')
     if self.userId is None:
       raise TProtocol.TProtocolException(message='Required field userId is unset!')
+    if self.gatewayId is None:
+      raise TProtocol.TProtocolException(message='Required field gatewayId is unset!')
     if self.emails is None:
       raise TProtocol.TProtocolException(message='Required field emails is unset!')
     if self.creationTime is None:
@@ -694,6 +708,7 @@ class UserProfile:
     value = (value * 31) ^ hash(self.userModelVersion)
     value = (value * 31) ^ hash(self.airavataInternalUserId)
     value = (value * 31) ^ hash(self.userId)
+    value = (value * 31) ^ hash(self.gatewayId)
     value = (value * 31) ^ hash(self.emails)
     value = (value * 31) ^ hash(self.userName)
     value = (value * 31) ^ hash(self.orcidId)

http://git-wip-us.apache.org/repos/asf/airavata/blob/3ce49b9a/modules/registry-refactoring/pom.xml
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/pom.xml b/modules/registry-refactoring/pom.xml
index b794349..52db507 100644
--- a/modules/registry-refactoring/pom.xml
+++ b/modules/registry-refactoring/pom.xml
@@ -117,7 +117,7 @@
                 <configuration>
                     <failIfNoTests>false</failIfNoTests>
                     <!--<skipTests>${skipTests}</skipTests>-->
-                    <skipTests>true</skipTests>
+                    <skipTests>false</skipTests>
                     <workingDirectory>${project.build.testOutputDirectory}</workingDirectory>
                 </configuration>
             </plugin>

http://git-wip-us.apache.org/repos/asf/airavata/blob/3ce49b9a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentEntity.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentEntity.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentEntity.java
index 5b9d15a..796253f 100644
--- a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentEntity.java
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentEntity.java
@@ -43,8 +43,9 @@ public class ExperimentEntity {
     private List<ExperimentInputEntity> experimentInputs;
     private List<ExperimentOutputEntity> experimentOutputs;
     private List<ExperimentErrorEntity> experimentErrors;
+    private List<ExperimentStatusEntity> experimentStatuses;
 
-    private UserConfigurationEntity userConfiguration;
+    private UserConfigurationEntity userConfigurationData;
 
     @Id
     @Column(name = "EXPERIMENT_ID")
@@ -166,12 +167,12 @@ public class ExperimentEntity {
     }
 
     @OneToOne(targetEntity = UserConfigurationEntity.class, cascade = CascadeType.ALL, mappedBy = "experiment")
-    public UserConfigurationEntity getUserConfiguration() {
-        return userConfiguration;
+    public UserConfigurationEntity getUserConfigurationData() {
+        return userConfigurationData;
     }
 
-    public void setUserConfiguration(UserConfigurationEntity userConfiguration) {
-        this.userConfiguration = userConfiguration;
+    public void setUserConfigurationData(UserConfigurationEntity userConfiguration) {
+        this.userConfigurationData = userConfiguration;
     }
 
     @OneToMany(targetEntity = ExperimentInputEntity.class, cascade = CascadeType.ALL, mappedBy = "experiment")
@@ -200,4 +201,13 @@ public class ExperimentEntity {
     public void setExperimentErrors(List<ExperimentErrorEntity> experimentErrors) {
         this.experimentErrors = experimentErrors;
     }
+
+    @OneToMany(targetEntity = ExperimentStatusEntity.class, cascade = CascadeType.ALL, mappedBy = "experiment")
+    public List<ExperimentStatusEntity> getExperimentStatuses() {
+        return experimentStatuses;
+    }
+
+    public void setExperimentStatuses(List<ExperimentStatusEntity> experimentStatuses) {
+        this.experimentStatuses = experimentStatuses;
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/3ce49b9a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentErrorEntity.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentErrorEntity.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentErrorEntity.java
index 45c47ad..374a156 100644
--- a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentErrorEntity.java
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentErrorEntity.java
@@ -25,6 +25,7 @@ import java.util.List;
 
 @Entity
 @Table(name = "EXPERIMENT_ERROR")
+@IdClass(ExperimentErrorPK.class)
 public class ExperimentErrorEntity {
     private String errorId;
     private String experimentId;
@@ -46,6 +47,7 @@ public class ExperimentErrorEntity {
         this.errorId = errorId;
     }
 
+    @Id
     @Column(name = "EXPERIMENT_ID")
     public String getExperimentId() {
         return experimentId;

http://git-wip-us.apache.org/repos/asf/airavata/blob/3ce49b9a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentErrorPK.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentErrorPK.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentErrorPK.java
new file mode 100644
index 0000000..add5616
--- /dev/null
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentErrorPK.java
@@ -0,0 +1,75 @@
+/*
+ *
+ * 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.registry.core.entities.expcatalog;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.Column;
+import javax.persistence.Id;
+import java.io.Serializable;
+
+public class ExperimentErrorPK implements Serializable {
+    private final static Logger logger = LoggerFactory.getLogger(ExperimentErrorPK.class);
+    private String errorId;
+    private String experimentId;
+
+    @Column(name = "ERROR_ID")
+    @Id
+    public String getErrorId() {
+        return errorId;
+    }
+
+    public void setErrorId(String errorId) {
+        this.errorId = errorId;
+    }
+
+    @Column(name = "EXPERIMENT_ID")
+    @Id
+    public String getExperimentId() {
+        return experimentId;
+    }
+
+    public void setExperimentId(String experimentId) {
+        this.experimentId = experimentId;
+    }
+
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+
+        ExperimentErrorPK that = (ExperimentErrorPK) o;
+
+        if (getErrorId() != null ? !getErrorId().equals(that.getErrorId()) : that.getErrorId() != null) return false;
+        if (getExperimentId() != null ? !getExperimentId().equals(that.getExperimentId()) : that.getExperimentId() != null) return false;
+
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        int result = getErrorId() != null ? getErrorId().hashCode() : 0;
+        result = 31 * result + (getExperimentId() != null ? getExperimentId().hashCode() : 0);
+        return result;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/3ce49b9a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentInputEntity.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentInputEntity.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentInputEntity.java
index eeca021..7850c17 100644
--- a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentInputEntity.java
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentInputEntity.java
@@ -24,6 +24,7 @@ import javax.persistence.*;
 
 @Entity
 @Table(name = "EXPERIMENT_INPUT")
+@IdClass(ExperimentInputPK.class)
 public class ExperimentInputEntity {
     private String experimentId;
     public String name;
@@ -51,6 +52,7 @@ public class ExperimentInputEntity {
         this.experimentId = experimentId;
     }
 
+    @Id
     @Column(name = "INPUT_NAME")
     public String getName() {
         return name;
@@ -105,6 +107,7 @@ public class ExperimentInputEntity {
         this.userFriendlyDescription = userFriendlyDescription;
     }
 
+    @Lob
     @Column(name = "METADATA")
     public String getMetaData() {
         return metaData;
@@ -128,7 +131,7 @@ public class ExperimentInputEntity {
         return isRequired;
     }
 
-    public void setIsRequired(boolean isRequired) {
+    public void setRequired(boolean isRequired) {
         this.isRequired = isRequired;
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/3ce49b9a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentInputPK.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentInputPK.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentInputPK.java
new file mode 100644
index 0000000..3479878
--- /dev/null
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentInputPK.java
@@ -0,0 +1,74 @@
+/*
+ *
+ * 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.registry.core.entities.expcatalog;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.Column;
+import javax.persistence.Id;
+import java.io.Serializable;
+
+public class ExperimentInputPK implements Serializable {
+    private final static Logger logger = LoggerFactory.getLogger(ExperimentInputPK.class);
+    private String experimentId;
+    private String name;
+
+    @Id
+    @Column(name = "EXPERIMENT_ID")
+    public String getExperimentId() {
+        return experimentId;
+    }
+
+    public void setExperimentId(String experimentId) {
+        this.experimentId = experimentId;
+    }
+
+    @Id
+    @Column(name = "INPUT_NAME")
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+
+        ExperimentInputPK that = (ExperimentInputPK) o;
+
+        if (getExperimentId() != null ? !getExperimentId().equals(that.getExperimentId()) : that.getExperimentId() != null) return false;
+        if (getName() != null ? !getName().equals(that.getName()) : that.getName() != null) return false;
+
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        int result = getExperimentId() != null ? getExperimentId().hashCode() : 0;
+        result = 31 * result + (getName() != null ? getName().hashCode() : 0);
+        return result;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/3ce49b9a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentOutputEntity.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentOutputEntity.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentOutputEntity.java
index 9cb2702..891cf79 100644
--- a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentOutputEntity.java
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentOutputEntity.java
@@ -20,13 +20,11 @@
 */
 package org.apache.airavata.registry.core.entities.expcatalog;
 
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.Table;
+import javax.persistence.*;
 
 @Entity
 @Table(name = "EXPERIMENT_OUTPUT")
+@IdClass(ExperimentOutputPK.class)
 public class ExperimentOutputEntity {
     private String experimentId;
     public String name;
@@ -41,6 +39,9 @@ public class ExperimentOutputEntity {
     public boolean outputStreaming;
     public String storageResourceId;
 
+    private ExperimentEntity experiment;
+
+
     @Id
     @Column(name = "EXPERIMENT_ID")
     public String getExperimentId() {
@@ -51,6 +52,7 @@ public class ExperimentOutputEntity {
         this.experimentId = experimentId;
     }
 
+    @Id
     @Column(name = "OUTPUT_NAME")
     public String getName() {
         return name;
@@ -92,7 +94,7 @@ public class ExperimentOutputEntity {
         return isRequired;
     }
 
-    public void setIsRequired(boolean isRequired) {
+    public void setRequired(boolean isRequired) {
         this.isRequired = isRequired;
     }
 
@@ -150,4 +152,14 @@ public class ExperimentOutputEntity {
     public void setStorageResourceId(String storageResourceId) {
         this.storageResourceId = storageResourceId;
     }
+
+    @ManyToOne(targetEntity = ExperimentEntity.class, cascade = CascadeType.ALL, fetch = FetchType.LAZY)
+    @JoinColumn(name = "EXPERIMENT_ID", referencedColumnName = "EXPERIMENT_ID")
+    public ExperimentEntity getExperiment() {
+        return experiment;
+    }
+
+    public void setExperiment(ExperimentEntity experiment) {
+        this.experiment = experiment;
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/3ce49b9a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentOutputPK.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentOutputPK.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentOutputPK.java
new file mode 100644
index 0000000..da2864c
--- /dev/null
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentOutputPK.java
@@ -0,0 +1,74 @@
+/*
+ *
+ * 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.registry.core.entities.expcatalog;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.Column;
+import javax.persistence.Id;
+import java.io.Serializable;
+
+public class ExperimentOutputPK implements Serializable {
+    private final static Logger logger = LoggerFactory.getLogger(ExperimentOutputPK.class);
+    private String experimentId;
+    private String name;
+
+    @Id
+    @Column(name = "EXPERIMENT_ID")
+    public String getExperimentId() {
+        return experimentId;
+    }
+
+    public void setExperimentId(String experimentId) {
+        this.experimentId = experimentId;
+    }
+
+    @Id
+    @Column(name = "OUTPUT_NAME")
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+
+        ExperimentOutputPK that = (ExperimentOutputPK) o;
+
+        if (getExperimentId() != null ? !getExperimentId().equals(that.getExperimentId()) : that.getExperimentId() != null) return false;
+        if (getName() != null ? !getName().equals(that.getName()) : that.getName() != null) return false;
+
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        int result = getExperimentId() != null ? getExperimentId().hashCode() : 0;
+        result = 31 * result + (getName() != null ? getName().hashCode() : 0);
+        return result;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/3ce49b9a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentStatusEntity.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentStatusEntity.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentStatusEntity.java
new file mode 100644
index 0000000..48b822f
--- /dev/null
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentStatusEntity.java
@@ -0,0 +1,83 @@
+/*
+ *
+ * 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.registry.core.entities.expcatalog;
+
+import javax.persistence.*;
+
+@Entity
+@Table(name = "EXPERIMENT_STATUS")
+@IdClass(ExperimentStatusPK.class)
+public class ExperimentStatusEntity {
+    private String experimentId;
+    private String state;
+    private long timeOfStateChange;
+    private String reason;
+
+    private ExperimentEntity experiment;
+
+    @Id
+    @Column(name = "EXPERIMENT_ID")
+    public String getExperimentId() {
+        return experimentId;
+    }
+
+    public void setExperimentId(String experimentId) {
+        this.experimentId = experimentId;
+    }
+
+    @Id
+    @Column(name = "STATE")
+    public String getState() {
+        return state;
+    }
+
+    public void setState(String state) {
+        this.state = state;
+    }
+
+    @Column(name = "TIME_OF_STATE_CHANGE")
+    public long getTimeOfStateChange() {
+        return timeOfStateChange;
+    }
+
+    public void setTimeOfStateChange(long timeOfStateChange) {
+        this.timeOfStateChange = timeOfStateChange;
+    }
+
+    @Column(name = "REASON")
+    public String getReason() {
+        return reason;
+    }
+
+    public void setReason(String reason) {
+        this.reason = reason;
+    }
+
+    @ManyToOne(targetEntity = ExperimentEntity.class, cascade = CascadeType.ALL, fetch = FetchType.LAZY)
+    @JoinColumn(name = "EXPERIMENT_ID", referencedColumnName = "EXPERIMENT_ID")
+    public ExperimentEntity getExperiment() {
+        return experiment;
+    }
+
+    public void setExperiment(ExperimentEntity experiment) {
+        this.experiment = experiment;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/3ce49b9a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentStatusPK.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentStatusPK.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentStatusPK.java
new file mode 100644
index 0000000..4c52ec6
--- /dev/null
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentStatusPK.java
@@ -0,0 +1,74 @@
+/*
+ *
+ * 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.registry.core.entities.expcatalog;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.Column;
+import javax.persistence.Id;
+import java.io.Serializable;
+
+public class ExperimentStatusPK implements Serializable {
+    private final static Logger logger = LoggerFactory.getLogger(ExperimentStatusPK.class);
+    private String state;
+    private String experimentId;
+
+    @Id
+    @Column(name = "STATUS_ID")
+    public String getState() {
+        return state;
+    }
+
+    public void setState(String state) {
+        this.state = state;
+    }
+
+    @Id
+    @Column(name = "EXPERIMENT_ID")
+    public String getExperimentId() {
+        return experimentId;
+    }
+
+    public void setExperimentId(String experimentId) {
+        this.experimentId = experimentId;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+
+        ExperimentStatusPK that = (ExperimentStatusPK) o;
+
+        if (getState() != null ? !getState().equals(that.getState()) : that.getState() != null) return false;
+        if (getExperimentId() != null ? !getExperimentId().equals(that.getExperimentId()) : that.getExperimentId() != null) return false;
+
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        int result = getState() != null ? getState().hashCode() : 0;
+        result = 31 * result + (getExperimentId() != null ? getExperimentId().hashCode() : 0);
+        return result;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/3ce49b9a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/UserConfigurationEntity.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/UserConfigurationEntity.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/UserConfigurationEntity.java
index 06e3b37..7d27251 100644
--- a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/UserConfigurationEntity.java
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/UserConfigurationEntity.java
@@ -23,7 +23,7 @@ package org.apache.airavata.registry.core.entities.expcatalog;
 import javax.persistence.*;
 
 @Entity
-@Table(name = "USER_CONFIGURATION_ENTITY")
+@Table(name = "USER_CONFIGURATION")
 public class UserConfigurationEntity {
     private String experimentId;
     private boolean airavataAutoSchedule;

http://git-wip-us.apache.org/repos/asf/airavata/blob/3ce49b9a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/repositories/expcatalog/ExperimentRepository.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/repositories/expcatalog/ExperimentRepository.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/repositories/expcatalog/ExperimentRepository.java
new file mode 100644
index 0000000..b20650d
--- /dev/null
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/repositories/expcatalog/ExperimentRepository.java
@@ -0,0 +1,72 @@
+/*
+ *
+ * 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.registry.core.repositories.expcatalog;
+
+import org.apache.airavata.model.experiment.ExperimentModel;
+import org.apache.airavata.registry.core.entities.expcatalog.ExperimentEntity;
+import org.apache.airavata.registry.core.repositories.AbstractRepository;
+import org.apache.airavata.registry.core.utils.JPAUtils;
+import org.apache.airavata.registry.core.utils.ObjectMapperSingleton;
+import org.dozer.Mapper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.List;
+
+public class ExperimentRepository extends AbstractRepository<ExperimentModel, ExperimentEntity, String> {
+    private final static Logger logger = LoggerFactory.getLogger(ExperimentRepository.class);
+
+    public ExperimentRepository(Class<ExperimentModel> thriftGenericClass, Class<ExperimentEntity> dbEntityGenericClass) {
+        super(thriftGenericClass, dbEntityGenericClass);
+    }
+
+    @Override
+    public ExperimentModel create(ExperimentModel experiment){
+        return update(experiment);
+    }
+
+    @Override
+    public ExperimentModel update(ExperimentModel experiment){
+        String experimentId = experiment.getExperimentId();
+        Mapper mapper = ObjectMapperSingleton.getInstance();
+        ExperimentEntity entity = mapper.map(experiment, ExperimentEntity.class);
+
+        if(entity.getUserConfigurationData() != null)
+            entity.getUserConfigurationData().setExperimentId(experimentId);
+        if(entity.getExperimentInputs() != null)
+            entity.getExperimentInputs().forEach(expIn->expIn.setExperimentId(experimentId));
+        if(entity.getExperimentOutputs() != null)
+            entity.getExperimentOutputs().forEach(expOut->expOut.setExperimentId(experimentId));
+        if(entity.getExperimentErrors() != null)
+            entity.getExperimentErrors().forEach(expErr->expErr.setExperimentId(experimentId));
+        if(entity.getExperimentStatuses() != null)
+            entity.getExperimentStatuses().forEach(expStatus->expStatus.setExperimentId(experimentId));
+
+        ExperimentEntity persistedCopy = JPAUtils.execute(entityManager -> entityManager.merge(entity));
+        return mapper.map(persistedCopy, ExperimentModel.class);
+    }
+
+    @Override
+    public List<ExperimentModel> select(String criteria, int offset, int limit){
+        throw new UnsupportedOperationException("Due to performance overheads this method is not supported. Instead use" +
+                " ExperimentSummaryRepository");
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/3ce49b9a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/repositories/expcatalog/ExperimentRespository.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/repositories/expcatalog/ExperimentRespository.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/repositories/expcatalog/ExperimentRespository.java
deleted file mode 100644
index 62d0976..0000000
--- a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/repositories/expcatalog/ExperimentRespository.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- *
- * 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.registry.core.repositories.expcatalog;
-
-import org.apache.airavata.model.experiment.ExperimentModel;
-import org.apache.airavata.registry.core.entities.expcatalog.ExperimentEntity;
-import org.apache.airavata.registry.core.repositories.AbstractRepository;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.List;
-
-public class ExperimentRespository extends AbstractRepository<ExperimentModel, ExperimentEntity, String> {
-    private final static Logger logger = LoggerFactory.getLogger(ExperimentRespository.class);
-
-    public ExperimentRespository(Class<ExperimentModel> thriftGenericClass, Class<ExperimentEntity> dbEntityGenericClass) {
-        super(thriftGenericClass, dbEntityGenericClass);
-    }
-
-    @Override
-    public List<ExperimentModel> select(String criteria, int offset, int limit){
-        throw new UnsupportedOperationException("Due to performance overheads this method is not supported. Instead use" +
-                " ExperimentSummaryRepository");
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/3ce49b9a/modules/registry-refactoring/src/main/resources/META-INF/persistence.xml
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/resources/META-INF/persistence.xml b/modules/registry-refactoring/src/main/resources/META-INF/persistence.xml
index 8c6bddb..f7d72f3 100644
--- a/modules/registry-refactoring/src/main/resources/META-INF/persistence.xml
+++ b/modules/registry-refactoring/src/main/resources/META-INF/persistence.xml
@@ -27,7 +27,13 @@
         <class>org.apache.airavata.registry.core.entities.workspacecatalog.NSFDemographicsEntity</class>
         <class>org.apache.airavata.registry.core.entities.workspacecatalog.NotificationEntity</class>
         <class>org.apache.airavata.registry.core.entities.workspacecatalog.ProjectEntity</class>
+        <class>org.apache.airavata.registry.core.entities.expcatalog.ComputeResourceSchedulingEntity</class>
         <class>org.apache.airavata.registry.core.entities.expcatalog.ExperimentEntity</class>
+        <class>org.apache.airavata.registry.core.entities.expcatalog.ExperimentErrorEntity</class>
+        <class>org.apache.airavata.registry.core.entities.expcatalog.ExperimentInputEntity</class>
+        <class>org.apache.airavata.registry.core.entities.expcatalog.ExperimentOutputEntity</class>
+        <class>org.apache.airavata.registry.core.entities.expcatalog.ExperimentStatusEntity</class>
+        <class>org.apache.airavata.registry.core.entities.expcatalog.UserConfigurationEntity</class>
         <exclude-unlisted-classes>true</exclude-unlisted-classes>
     </persistence-unit>
 </persistence>

http://git-wip-us.apache.org/repos/asf/airavata/blob/3ce49b9a/modules/registry-refactoring/src/main/resources/experiment_catalog.sql
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/resources/experiment_catalog.sql b/modules/registry-refactoring/src/main/resources/experiment_catalog.sql
index 95b7c54..4d401a3 100644
--- a/modules/registry-refactoring/src/main/resources/experiment_catalog.sql
+++ b/modules/registry-refactoring/src/main/resources/experiment_catalog.sql
@@ -11,12 +11,12 @@ CREATE TABLE IF NOT EXISTS EXPERIMENT(
     EXECUTION_ID VARCHAR (255),
     GATEWAY_EXECUTION_ID VARCHAR (255),
     GATEWAY_INSTANCE_ID VARCHAR (255),
-    ENABLE_EMAIL_NOTIFICATION TINYINT,
+    ENABLE_EMAIL_NOTIFICATION TINYINT(1),
     PRIMARY KEY (EXPERIMENT_ID),
-    FOREIGN KEY (PROJECT_ID) REFERENCES PROJECT(PROJECT_ID),
-    FOREIGN KEY (GATEWAY_ID) REFERENCES GATEWAY(GATEWAY_ID),
-    FOREIGN KEY (USER_ID) REFERENCES USER_PROFILE(USER_ID)
-)
+    FOREIGN KEY (PROJECT_ID) REFERENCES PROJECT(PROJECT_ID) ON DELETE CASCADE,
+    FOREIGN KEY (GATEWAY_ID) REFERENCES GATEWAY(GATEWAY_ID) ON DELETE CASCADE,
+    FOREIGN KEY (USER_ID) REFERENCES USER_PROFILE(AIRAVATA_INTERNAL_USER_ID) ON DELETE CASCADE
+);
 
 CREATE TABLE IF NOT EXISTS EXPERIMENT_EMAIL (
     EXPERIMENT_ID VARCHAR (255),
@@ -27,16 +27,16 @@ CREATE TABLE IF NOT EXISTS EXPERIMENT_EMAIL (
 
 CREATE TABLE IF NOT EXISTS USER_CONFIGURATION(
     EXPERIMENT_ID VARCHAR (255),
-    AIRAVATA_AUTO_SCHEDULE TINYINT,
-    OVERRIDE_MANUAL_SCHEDULED_PARAMS TINYINT,
-    THROTTLE_RESOURCE TINYINT,
+    AIRAVATA_AUTO_SCHEDULE TINYINT(1),
+    OVERRIDE_MANUAL_SCHEDULED_PARAMS TINYINT(1),
+    THROTTLE_RESOURCE TINYINT(1),
     USER_DN VARCHAR (255),
-    GENERATE_CERT TINYINT,
+    GENERATE_CERT TINYINT(1),
     STORAGE_ID VARCHAR (255),
     EXPERIMENT_DATA_DIR VARCHAR (255),
     PRIMARY KEY (EXPERIMENT_ID),
     FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE
-)
+);
 
 CREATE TABLE IF NOT EXISTS COMPUTE_RESOURCE_SCHEDULING(
     EXPERIMENT_ID VARCHAR (255),
@@ -53,8 +53,8 @@ CREATE TABLE IF NOT EXISTS COMPUTE_RESOURCE_SCHEDULING(
     OVERRIDE_SCRATCH_LOCATION VARCHAR (255),
     OVERRIDE_ALLOCATION_PROJECT_NUMBER VARCHAR (255),
     PRIMARY KEY (EXPERIMENT_ID),
-    FOREIGN KEY (EXPERIMENT_ID) REFERENCES USER_CONFIGURATION(EXPERIMENT_ID)
-)
+    FOREIGN KEY (EXPERIMENT_ID) REFERENCES USER_CONFIGURATION(EXPERIMENT_ID) ON DELETE CASCADE
+);
 
 CREATE TABLE IF NOT EXISTS EXPERIMENT_INPUT(
     EXPERIMENT_ID VARCHAR (255),
@@ -62,34 +62,34 @@ CREATE TABLE IF NOT EXISTS EXPERIMENT_INPUT(
     INPUT_VALUE VARCHAR (255),
     INPUT_TYPE VARCHAR (255),
     APPLICATION_ARGUMENT VARCHAR (255),
-    STANDARD_INPUT TINYINT,
+    STANDARD_INPUT TINYINT(1),
     USER_FRIENDLY_DESCRIPTION VARCHAR (255),
     METADATA VARCHAR (4096),
     INPUT_ORDER INT,
-    REQUIRED TINYINT,
-    REQUIRED_TO_ADDED_TO_COMMANDLINE TINYINT,
-    DATA_STAGED TINYINT,
+    REQUIRED TINYINT(1),
+    REQUIRED_TO_ADDED_TO_COMMANDLINE TINYINT(1),
+    DATA_STAGED TINYINT(1),
     STORAGE_RESOURCE_ID VARCHAR (255),
     PRIMARY KEY (EXPERIMENT_ID,INPUT_NAME),
-    FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID)
-)
+    FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE
+);
 
 CREATE TABLE IF NOT EXISTS EXPERIMENT_OUTPUT(
     EXPERIMENT_ID VARCHAR (255),
     OUTPUT_NAME VARCHAR (255),
     OUTPUT_VALUE VARCHAR (255),
     OUTPUT_TYPE VARCHAR (255),
-    APPLICATION_ARGUMENT (255),
-    REQUIRED TINYINT,
-    REQUIRED_TO_ADDED_TO_COMMANDLINE TINYINT,
-    DATA_MOVEMENT TINYINT,
+    APPLICATION_ARGUMENT VARCHAR (255),
+    REQUIRED TINYINT(1),
+    REQUIRED_TO_ADDED_TO_COMMANDLINE TINYINT(1),
+    DATA_MOVEMENT TINYINT(1),
     LOCATION VARCHAR (255),
     SEARCH_QUERY VARCHAR (255),
-    OUTPUT_STREAMING TINYINT,
+    OUTPUT_STREAMING TINYINT(1),
     STORAGE_RESOURCE_ID VARCHAR (255),
     PRIMARY KEY (EXPERIMENT_ID,OUTPUT_NAME),
-    FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID)
-)
+    FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE
+);
 
 CREATE TABLE IF NOT EXISTS EXPERIMENT_ERROR(
     ERROR_ID VARCHAR (255),
@@ -98,13 +98,22 @@ CREATE TABLE IF NOT EXISTS EXPERIMENT_ERROR(
     ACTUAL_ERROR_MESSAGE VARCHAR (255),
     USER_FRIENDLY_MESSAGE VARCHAR (255),
     TRANSIENT_OR_PERSISTENT TINYINT,
-    PRIMARY KEY (ERROR_ID),
-    FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID)
-)
+    PRIMARY KEY (ERROR_ID, EXPERIMENT_ID),
+    FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE
+);
 
 CREATE TABLE IF NOT EXISTS EXPERIMENT_ERROR_ROOT_CAUSE_ERROR_ID(
     ERROR_ID VARCHAR (255),
     ROOT_CAUSE_ERROR_ID VARCHAR (255),
     PRIMARY KEY (ERROR_ID, ROOT_CAUSE_ERROR_ID),
-    FOREIGN KEY(ERROR_ID) REFERENCES EXPERIMENT_ERROR(ERROR_ID)
-)
\ No newline at end of file
+    FOREIGN KEY(ERROR_ID) REFERENCES EXPERIMENT_ERROR(ERROR_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE IF NOT EXISTS EXPERIMENT_STATUS(
+    EXPERIMENT_ID VARCHAR (255),
+    STATE VARCHAR (255),
+    TIME_OF_STATE_CHANGE BIGINT,
+    REASON VARCHAR (255),
+    PRIMARY KEY (EXPERIMENT_ID, STATE),
+    FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE
+);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/3ce49b9a/modules/registry-refactoring/src/main/resources/workspace_catalog.sql
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/resources/workspace_catalog.sql b/modules/registry-refactoring/src/main/resources/workspace_catalog.sql
index 4ea7cd2..8b87bc2 100644
--- a/modules/registry-refactoring/src/main/resources/workspace_catalog.sql
+++ b/modules/registry-refactoring/src/main/resources/workspace_catalog.sql
@@ -53,7 +53,7 @@ CREATE TABLE IF NOT EXISTS USER_PROFILE (
     GPG_KEY VARCHAR (8192),
     TIME_ZONE VARCHAR (255),
     PRIMARY KEY (AIRAVATA_INTERNAL_USER_ID),
-    FOREIGN KEY (GATEWAY_ID) REFERENCES GATEWAY(GATEWAY_ID)
+    FOREIGN KEY (GATEWAY_ID) REFERENCES GATEWAY(GATEWAY_ID) ON DELETE CASCADE
 );
 
 CREATE TABLE IF NOT EXISTS USER_PROFILE_EMAIL (
@@ -121,5 +121,5 @@ CREATE TABLE IF NOT EXISTS PROJECT(
     CREATION_TIME BIGINT,
     PRIMARY KEY (PROJECT_ID),
     FOREIGN KEY(OWNER) REFERENCES USER_PROFILE(AIRAVATA_INTERNAL_USER_ID),
-    FOREIGN KEY(GATEWAY_ID) REFERENCES GATEWAY(GATEWAY_ID)
+    FOREIGN KEY(GATEWAY_ID) REFERENCES GATEWAY(GATEWAY_ID) ON DELETE CASCADE
 );
\ No newline at end of file