You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ch...@apache.org on 2014/12/24 21:17:00 UTC

[3/3] airavata git commit: adding prejobcommands and postjobcommands

adding prejobcommands and postjobcommands


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

Branch: refs/heads/master
Commit: 99fdd58af85dd5421dcd5002692ee3bd341012a0
Parents: 61d0c73
Author: Chathuri Wimalasena <ka...@gmail.com>
Authored: Wed Dec 24 15:16:51 2014 -0500
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Wed Dec 24 15:16:51 2014 -0500

----------------------------------------------------------------------
 .../applicationDeploymentModel_types.cpp        |  96 ++++-
 .../airavata/applicationDeploymentModel_types.h |  28 +-
 .../applicationInterfaceModel_types.cpp         |  18 +-
 .../airavata/applicationInterfaceModel_types.h  |  13 +-
 .../Model/AppCatalog/AppDeployment/Types.php    | 108 ++++-
 .../Model/AppCatalog/AppInterface/Types.php     |  17 +-
 .../tools/RegisterSampleApplications.java       |  32 +-
 .../ApplicationDeploymentDescription.java       | 394 ++++++++++++++++---
 .../appinterface/CommandLineType.java           |   8 +-
 .../applicationDeploymentModel.thrift           |   2 +
 .../applicationInterfaceModel.thrift            |  10 +-
 .../data/impl/ApplicationDeploymentImpl.java    |  60 +++
 .../catalog/data/impl/ComputeResourceImpl.java  |  28 +-
 .../data/model/GSISSHPostJobCommand.java        |  73 ----
 .../data/model/GSISSHPostJobCommandPK.java      |  64 ---
 .../catalog/data/model/GSISSHPreJobCommand.java |  73 ----
 .../data/model/GSISSHPreJobCommandPK.java       |  64 ---
 .../catalog/data/model/PostJobCommand.java      |  73 ++++
 .../catalog/data/model/PostJobCommandPK.java    |  64 +++
 .../catalog/data/model/PreJobCommand.java       |  73 ++++
 .../catalog/data/model/PreJobCommandPK.java     |  64 +++
 .../data/resources/AbstractResource.java        |  12 +-
 .../resources/GSISSHPostJobCommandResource.java | 332 ----------------
 .../resources/GSISSHPreJobCommandResource.java  | 331 ----------------
 .../data/resources/PostJobCommandResource.java  | 331 ++++++++++++++++
 .../data/resources/PreJobCommandResource.java   | 331 ++++++++++++++++
 .../catalog/data/util/AppCatalogJPAUtils.java   |  28 +-
 .../data/util/AppCatalogResourceType.java       |   4 +-
 .../data/util/AppCatalogThriftConversion.java   |  16 +
 .../src/main/resources/META-INF/persistence.xml |   4 +-
 .../src/main/resources/appcatalog-derby.sql     |  30 +-
 .../src/main/resources/appcatalog-mysql.sql     |  16 +
 .../src/test/resources/appcatalog-derby.sql     |  33 +-
 .../gfac/gsissh/util/GFACGSISSHUtils.java       |   4 +-
 .../globus/GridFTPFileTransferClient.java       |  46 +--
 .../xbaya/globus/GridFTPFileTransferClient.java |  44 +--
 36 files changed, 1736 insertions(+), 1188 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/99fdd58a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/applicationDeploymentModel_types.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/applicationDeploymentModel_types.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/applicationDeploymentModel_types.cpp
index a0afa36..baea6c6 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/applicationDeploymentModel_types.cpp
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/applicationDeploymentModel_types.cpp
@@ -230,8 +230,8 @@ void swap(ApplicationModule &a, ApplicationModule &b) {
   swap(a.__isset, b.__isset);
 }
 
-const char* ApplicationDeploymentDescription::ascii_fingerprint = "179A145BD54BBE10649DEF31C71143C9";
-const uint8_t ApplicationDeploymentDescription::binary_fingerprint[16] = {0x17,0x9A,0x14,0x5B,0xD5,0x4B,0xBE,0x10,0x64,0x9D,0xEF,0x31,0xC7,0x11,0x43,0xC9};
+const char* ApplicationDeploymentDescription::ascii_fingerprint = "3B2F93AE9F0E6A621AF867419ADD9E5A";
+const uint8_t ApplicationDeploymentDescription::binary_fingerprint[16] = {0x3B,0x2F,0x93,0xAE,0x9F,0x0E,0x6A,0x62,0x1A,0xF8,0x67,0x41,0x9A,0xDD,0x9E,0x5A};
 
 uint32_t ApplicationDeploymentDescription::read(::apache::thrift::protocol::TProtocol* iprot) {
 
@@ -388,6 +388,46 @@ uint32_t ApplicationDeploymentDescription::read(::apache::thrift::protocol::TPro
           xfer += iprot->skip(ftype);
         }
         break;
+      case 11:
+        if (ftype == ::apache::thrift::protocol::T_LIST) {
+          {
+            this->preJobCommands.clear();
+            uint32_t _size21;
+            ::apache::thrift::protocol::TType _etype24;
+            xfer += iprot->readListBegin(_etype24, _size21);
+            this->preJobCommands.resize(_size21);
+            uint32_t _i25;
+            for (_i25 = 0; _i25 < _size21; ++_i25)
+            {
+              xfer += iprot->readString(this->preJobCommands[_i25]);
+            }
+            xfer += iprot->readListEnd();
+          }
+          this->__isset.preJobCommands = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 12:
+        if (ftype == ::apache::thrift::protocol::T_LIST) {
+          {
+            this->postJobCommands.clear();
+            uint32_t _size26;
+            ::apache::thrift::protocol::TType _etype29;
+            xfer += iprot->readListBegin(_etype29, _size26);
+            this->postJobCommands.resize(_size26);
+            uint32_t _i30;
+            for (_i30 = 0; _i30 < _size26; ++_i30)
+            {
+              xfer += iprot->readString(this->postJobCommands[_i30]);
+            }
+            xfer += iprot->readListEnd();
+          }
+          this->__isset.postJobCommands = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
       default:
         xfer += iprot->skip(ftype);
         break;
@@ -443,10 +483,10 @@ uint32_t ApplicationDeploymentDescription::write(::apache::thrift::protocol::TPr
     xfer += oprot->writeFieldBegin("moduleLoadCmds", ::apache::thrift::protocol::T_LIST, 7);
     {
       xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->moduleLoadCmds.size()));
-      std::vector<std::string> ::const_iterator _iter21;
-      for (_iter21 = this->moduleLoadCmds.begin(); _iter21 != this->moduleLoadCmds.end(); ++_iter21)
+      std::vector<std::string> ::const_iterator _iter31;
+      for (_iter31 = this->moduleLoadCmds.begin(); _iter31 != this->moduleLoadCmds.end(); ++_iter31)
       {
-        xfer += oprot->writeString((*_iter21));
+        xfer += oprot->writeString((*_iter31));
       }
       xfer += oprot->writeListEnd();
     }
@@ -456,10 +496,10 @@ uint32_t ApplicationDeploymentDescription::write(::apache::thrift::protocol::TPr
     xfer += oprot->writeFieldBegin("libPrependPaths", ::apache::thrift::protocol::T_LIST, 8);
     {
       xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->libPrependPaths.size()));
-      std::vector<SetEnvPaths> ::const_iterator _iter22;
-      for (_iter22 = this->libPrependPaths.begin(); _iter22 != this->libPrependPaths.end(); ++_iter22)
+      std::vector<SetEnvPaths> ::const_iterator _iter32;
+      for (_iter32 = this->libPrependPaths.begin(); _iter32 != this->libPrependPaths.end(); ++_iter32)
       {
-        xfer += (*_iter22).write(oprot);
+        xfer += (*_iter32).write(oprot);
       }
       xfer += oprot->writeListEnd();
     }
@@ -469,10 +509,10 @@ uint32_t ApplicationDeploymentDescription::write(::apache::thrift::protocol::TPr
     xfer += oprot->writeFieldBegin("libAppendPaths", ::apache::thrift::protocol::T_LIST, 9);
     {
       xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->libAppendPaths.size()));
-      std::vector<SetEnvPaths> ::const_iterator _iter23;
-      for (_iter23 = this->libAppendPaths.begin(); _iter23 != this->libAppendPaths.end(); ++_iter23)
+      std::vector<SetEnvPaths> ::const_iterator _iter33;
+      for (_iter33 = this->libAppendPaths.begin(); _iter33 != this->libAppendPaths.end(); ++_iter33)
       {
-        xfer += (*_iter23).write(oprot);
+        xfer += (*_iter33).write(oprot);
       }
       xfer += oprot->writeListEnd();
     }
@@ -482,10 +522,36 @@ uint32_t ApplicationDeploymentDescription::write(::apache::thrift::protocol::TPr
     xfer += oprot->writeFieldBegin("setEnvironment", ::apache::thrift::protocol::T_LIST, 10);
     {
       xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->setEnvironment.size()));
-      std::vector<SetEnvPaths> ::const_iterator _iter24;
-      for (_iter24 = this->setEnvironment.begin(); _iter24 != this->setEnvironment.end(); ++_iter24)
+      std::vector<SetEnvPaths> ::const_iterator _iter34;
+      for (_iter34 = this->setEnvironment.begin(); _iter34 != this->setEnvironment.end(); ++_iter34)
+      {
+        xfer += (*_iter34).write(oprot);
+      }
+      xfer += oprot->writeListEnd();
+    }
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.preJobCommands) {
+    xfer += oprot->writeFieldBegin("preJobCommands", ::apache::thrift::protocol::T_LIST, 11);
+    {
+      xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->preJobCommands.size()));
+      std::vector<std::string> ::const_iterator _iter35;
+      for (_iter35 = this->preJobCommands.begin(); _iter35 != this->preJobCommands.end(); ++_iter35)
+      {
+        xfer += oprot->writeString((*_iter35));
+      }
+      xfer += oprot->writeListEnd();
+    }
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.postJobCommands) {
+    xfer += oprot->writeFieldBegin("postJobCommands", ::apache::thrift::protocol::T_LIST, 12);
+    {
+      xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->postJobCommands.size()));
+      std::vector<std::string> ::const_iterator _iter36;
+      for (_iter36 = this->postJobCommands.begin(); _iter36 != this->postJobCommands.end(); ++_iter36)
       {
-        xfer += (*_iter24).write(oprot);
+        xfer += oprot->writeString((*_iter36));
       }
       xfer += oprot->writeListEnd();
     }
@@ -508,6 +574,8 @@ void swap(ApplicationDeploymentDescription &a, ApplicationDeploymentDescription
   swap(a.libPrependPaths, b.libPrependPaths);
   swap(a.libAppendPaths, b.libAppendPaths);
   swap(a.setEnvironment, b.setEnvironment);
+  swap(a.preJobCommands, b.preJobCommands);
+  swap(a.postJobCommands, b.postJobCommands);
   swap(a.__isset, b.__isset);
 }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/99fdd58a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/applicationDeploymentModel_types.h
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/applicationDeploymentModel_types.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/applicationDeploymentModel_types.h
index 2148019..9692d59 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/applicationDeploymentModel_types.h
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/applicationDeploymentModel_types.h
@@ -161,19 +161,21 @@ class ApplicationModule {
 void swap(ApplicationModule &a, ApplicationModule &b);
 
 typedef struct _ApplicationDeploymentDescription__isset {
-  _ApplicationDeploymentDescription__isset() : appDeploymentDescription(false), moduleLoadCmds(false), libPrependPaths(false), libAppendPaths(false), setEnvironment(false) {}
+  _ApplicationDeploymentDescription__isset() : appDeploymentDescription(false), moduleLoadCmds(false), libPrependPaths(false), libAppendPaths(false), setEnvironment(false), preJobCommands(false), postJobCommands(false) {}
   bool appDeploymentDescription;
   bool moduleLoadCmds;
   bool libPrependPaths;
   bool libAppendPaths;
   bool setEnvironment;
+  bool preJobCommands;
+  bool postJobCommands;
 } _ApplicationDeploymentDescription__isset;
 
 class ApplicationDeploymentDescription {
  public:
 
-  static const char* ascii_fingerprint; // = "179A145BD54BBE10649DEF31C71143C9";
-  static const uint8_t binary_fingerprint[16]; // = {0x17,0x9A,0x14,0x5B,0xD5,0x4B,0xBE,0x10,0x64,0x9D,0xEF,0x31,0xC7,0x11,0x43,0xC9};
+  static const char* ascii_fingerprint; // = "3B2F93AE9F0E6A621AF867419ADD9E5A";
+  static const uint8_t binary_fingerprint[16]; // = {0x3B,0x2F,0x93,0xAE,0x9F,0x0E,0x6A,0x62,0x1A,0xF8,0x67,0x41,0x9A,0xDD,0x9E,0x5A};
 
   ApplicationDeploymentDescription() : appDeploymentId("DO_NOT_SET_AT_CLIENTS"), appModuleId(), computeHostId(), executablePath(), parallelism((ApplicationParallelismType::type)0), appDeploymentDescription() {
     parallelism = (ApplicationParallelismType::type)0;
@@ -192,6 +194,8 @@ class ApplicationDeploymentDescription {
   std::vector<SetEnvPaths>  libPrependPaths;
   std::vector<SetEnvPaths>  libAppendPaths;
   std::vector<SetEnvPaths>  setEnvironment;
+  std::vector<std::string>  preJobCommands;
+  std::vector<std::string>  postJobCommands;
 
   _ApplicationDeploymentDescription__isset __isset;
 
@@ -240,6 +244,16 @@ class ApplicationDeploymentDescription {
     __isset.setEnvironment = true;
   }
 
+  void __set_preJobCommands(const std::vector<std::string> & val) {
+    preJobCommands = val;
+    __isset.preJobCommands = true;
+  }
+
+  void __set_postJobCommands(const std::vector<std::string> & val) {
+    postJobCommands = val;
+    __isset.postJobCommands = true;
+  }
+
   bool operator == (const ApplicationDeploymentDescription & rhs) const
   {
     if (!(appDeploymentId == rhs.appDeploymentId))
@@ -272,6 +286,14 @@ class ApplicationDeploymentDescription {
       return false;
     else if (__isset.setEnvironment && !(setEnvironment == rhs.setEnvironment))
       return false;
+    if (__isset.preJobCommands != rhs.__isset.preJobCommands)
+      return false;
+    else if (__isset.preJobCommands && !(preJobCommands == rhs.preJobCommands))
+      return false;
+    if (__isset.postJobCommands != rhs.__isset.postJobCommands)
+      return false;
+    else if (__isset.postJobCommands && !(postJobCommands == rhs.postJobCommands))
+      return false;
     return true;
   }
   bool operator != (const ApplicationDeploymentDescription &rhs) const {

http://git-wip-us.apache.org/repos/asf/airavata/blob/99fdd58a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/applicationInterfaceModel_types.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/applicationInterfaceModel_types.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/applicationInterfaceModel_types.cpp
index 50f18a5..49a9a2e 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/applicationInterfaceModel_types.cpp
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/applicationInterfaceModel_types.cpp
@@ -56,25 +56,15 @@ const char* _kValidityTypeNames[] = {
 const std::map<int, const char*> _ValidityType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(2, _kValidityTypeValues, _kValidityTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
 
 int _kCommandLineTypeValues[] = {
-  CommandLineType::INCLUSIVE,
-  CommandLineType::EXCLUSIVE
+  CommandLineType::IMPLICIT,
+  CommandLineType::EXPLICIT
 };
 const char* _kCommandLineTypeNames[] = {
-  "INCLUSIVE",
-  "EXCLUSIVE"
+  "IMPLICIT",
+  "EXPLICIT"
 };
 const std::map<int, const char*> _CommandLineType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(2, _kCommandLineTypeValues, _kCommandLineTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
 
-int _kInputMetadataTypeValues[] = {
-  InputMetadataType::MEMORY,
-  InputMetadataType::CPU
-};
-const char* _kInputMetadataTypeNames[] = {
-  "MEMORY",
-  "CPU"
-};
-const std::map<int, const char*> _InputMetadataType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(2, _kInputMetadataTypeValues, _kInputMetadataTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
-
 const char* InputDataObjectType::ascii_fingerprint = "95DCCA621F7BE3FA34349CC6A45329DA";
 const uint8_t InputDataObjectType::binary_fingerprint[16] = {0x95,0xDC,0xCA,0x62,0x1F,0x7B,0xE3,0xFA,0x34,0x34,0x9C,0xC6,0xA4,0x53,0x29,0xDA};
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/99fdd58a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/applicationInterfaceModel_types.h
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/applicationInterfaceModel_types.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/applicationInterfaceModel_types.h
index 38a6f32..39af4a9 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/applicationInterfaceModel_types.h
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/applicationInterfaceModel_types.h
@@ -58,22 +58,13 @@ extern const std::map<int, const char*> _ValidityType_VALUES_TO_NAMES;
 
 struct CommandLineType {
   enum type {
-    INCLUSIVE = 0,
-    EXCLUSIVE = 1
+    IMPLICIT = 0,
+    EXPLICIT = 1
   };
 };
 
 extern const std::map<int, const char*> _CommandLineType_VALUES_TO_NAMES;
 
-struct InputMetadataType {
-  enum type {
-    MEMORY = 0,
-    CPU = 1
-  };
-};
-
-extern const std::map<int, const char*> _InputMetadataType_VALUES_TO_NAMES;
-
 typedef struct _InputDataObjectType__isset {
   _InputDataObjectType__isset() : value(false), type(false), applicationArgument(false), standardInput(true), userFriendlyDescription(false), metaData(false), inputOrder(false), inputValid(false), addedToCommandLine(false), dataStaged(true) {}
   bool value;

http://git-wip-us.apache.org/repos/asf/airavata/blob/99fdd58a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/AppDeployment/Types.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/AppDeployment/Types.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/AppDeployment/Types.php
index 9d7e452..f4bde8f 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/AppDeployment/Types.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/AppDeployment/Types.php
@@ -267,6 +267,8 @@ class ApplicationDeploymentDescription {
   public $libPrependPaths = null;
   public $libAppendPaths = null;
   public $setEnvironment = null;
+  public $preJobCommands = null;
+  public $postJobCommands = null;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
@@ -330,6 +332,22 @@ class ApplicationDeploymentDescription {
             'class' => '\Airavata\Model\AppCatalog\AppDeployment\SetEnvPaths',
             ),
           ),
+        11 => array(
+          'var' => 'preJobCommands',
+          'type' => TType::LST,
+          'etype' => TType::STRING,
+          'elem' => array(
+            'type' => TType::STRING,
+            ),
+          ),
+        12 => array(
+          'var' => 'postJobCommands',
+          'type' => TType::LST,
+          'etype' => TType::STRING,
+          'elem' => array(
+            'type' => TType::STRING,
+            ),
+          ),
         );
     }
     if (is_array($vals)) {
@@ -363,6 +381,12 @@ class ApplicationDeploymentDescription {
       if (isset($vals['setEnvironment'])) {
         $this->setEnvironment = $vals['setEnvironment'];
       }
+      if (isset($vals['preJobCommands'])) {
+        $this->preJobCommands = $vals['preJobCommands'];
+      }
+      if (isset($vals['postJobCommands'])) {
+        $this->postJobCommands = $vals['postJobCommands'];
+      }
     }
   }
 
@@ -498,6 +522,40 @@ class ApplicationDeploymentDescription {
             $xfer += $input->skip($ftype);
           }
           break;
+        case 11:
+          if ($ftype == TType::LST) {
+            $this->preJobCommands = array();
+            $_size24 = 0;
+            $_etype27 = 0;
+            $xfer += $input->readListBegin($_etype27, $_size24);
+            for ($_i28 = 0; $_i28 < $_size24; ++$_i28)
+            {
+              $elem29 = null;
+              $xfer += $input->readString($elem29);
+              $this->preJobCommands []= $elem29;
+            }
+            $xfer += $input->readListEnd();
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 12:
+          if ($ftype == TType::LST) {
+            $this->postJobCommands = array();
+            $_size30 = 0;
+            $_etype33 = 0;
+            $xfer += $input->readListBegin($_etype33, $_size30);
+            for ($_i34 = 0; $_i34 < $_size30; ++$_i34)
+            {
+              $elem35 = null;
+              $xfer += $input->readString($elem35);
+              $this->postJobCommands []= $elem35;
+            }
+            $xfer += $input->readListEnd();
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
         default:
           $xfer += $input->skip($ftype);
           break;
@@ -549,9 +607,9 @@ class ApplicationDeploymentDescription {
       {
         $output->writeListBegin(TType::STRING, count($this->moduleLoadCmds));
         {
-          foreach ($this->moduleLoadCmds as $iter24)
+          foreach ($this->moduleLoadCmds as $iter36)
           {
-            $xfer += $output->writeString($iter24);
+            $xfer += $output->writeString($iter36);
           }
         }
         $output->writeListEnd();
@@ -566,9 +624,9 @@ class ApplicationDeploymentDescription {
       {
         $output->writeListBegin(TType::STRUCT, count($this->libPrependPaths));
         {
-          foreach ($this->libPrependPaths as $iter25)
+          foreach ($this->libPrependPaths as $iter37)
           {
-            $xfer += $iter25->write($output);
+            $xfer += $iter37->write($output);
           }
         }
         $output->writeListEnd();
@@ -583,9 +641,9 @@ class ApplicationDeploymentDescription {
       {
         $output->writeListBegin(TType::STRUCT, count($this->libAppendPaths));
         {
-          foreach ($this->libAppendPaths as $iter26)
+          foreach ($this->libAppendPaths as $iter38)
           {
-            $xfer += $iter26->write($output);
+            $xfer += $iter38->write($output);
           }
         }
         $output->writeListEnd();
@@ -600,9 +658,43 @@ class ApplicationDeploymentDescription {
       {
         $output->writeListBegin(TType::STRUCT, count($this->setEnvironment));
         {
-          foreach ($this->setEnvironment as $iter27)
+          foreach ($this->setEnvironment as $iter39)
+          {
+            $xfer += $iter39->write($output);
+          }
+        }
+        $output->writeListEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->preJobCommands !== null) {
+      if (!is_array($this->preJobCommands)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('preJobCommands', TType::LST, 11);
+      {
+        $output->writeListBegin(TType::STRING, count($this->preJobCommands));
+        {
+          foreach ($this->preJobCommands as $iter40)
+          {
+            $xfer += $output->writeString($iter40);
+          }
+        }
+        $output->writeListEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->postJobCommands !== null) {
+      if (!is_array($this->postJobCommands)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('postJobCommands', TType::LST, 12);
+      {
+        $output->writeListBegin(TType::STRING, count($this->postJobCommands));
+        {
+          foreach ($this->postJobCommands as $iter41)
           {
-            $xfer += $iter27->write($output);
+            $xfer += $output->writeString($iter41);
           }
         }
         $output->writeListEnd();

http://git-wip-us.apache.org/repos/asf/airavata/blob/99fdd58a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/AppInterface/Types.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/AppInterface/Types.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/AppInterface/Types.php
index 026550d..fa0abce 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/AppInterface/Types.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/AppInterface/Types.php
@@ -44,20 +44,11 @@ final class ValidityType {
 }
 
 final class CommandLineType {
-  const INCLUSIVE = 0;
-  const EXCLUSIVE = 1;
+  const IMPLICIT = 0;
+  const EXPLICIT = 1;
   static public $__names = array(
-    0 => 'INCLUSIVE',
-    1 => 'EXCLUSIVE',
-  );
-}
-
-final class InputMetadataType {
-  const MEMORY = 0;
-  const CPU = 1;
-  static public $__names = array(
-    0 => 'MEMORY',
-    1 => 'CPU',
+    0 => 'IMPLICIT',
+    1 => 'EXPLICIT',
   );
 }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/99fdd58a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
index 7a829fc..9dec7d2 100644
--- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
+++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
@@ -398,21 +398,21 @@ public class RegisterSampleApplications {
 
             List<InputDataObjectType> applicationInputs = new ArrayList<InputDataObjectType>();
             applicationInputs.add(RegisterSampleApplicationsUtils.createAppInput("gams_input", "",
-                    DataType.URI, null, 1, ValidityType.REQUIRED, CommandLineType.INCLUSIVE, false, "Gamess Input file", null));
+                    DataType.URI, null, 1, ValidityType.REQUIRED, CommandLineType.IMPLICIT, false, "Gamess Input file", null));
 //            applicationInputs.add(RegisterSampleApplicationsUtils.createAppInput("EXT_FILE", "",
 //                    DataType.URI, null, 2, ValidityType.OPTIONAL, CommandLineType.EXCLUSIVE, false, "Gamess EXT file", null));
 
             List<OutputDataObjectType> applicationOutputs = new ArrayList<OutputDataObjectType>();
             applicationOutputs.add(RegisterSampleApplicationsUtils.createAppOutput("gams_output",
-                    "", DataType.URI, ValidityType.REQUIRED, CommandLineType.INCLUSIVE));
+                    "", DataType.URI, ValidityType.REQUIRED, CommandLineType.IMPLICIT));
             applicationOutputs.add(RegisterSampleApplicationsUtils.createAppOutput("dat_file",
-                    "", DataType.URI, ValidityType.REQUIRED, CommandLineType.EXCLUSIVE));
+                    "", DataType.URI, ValidityType.REQUIRED, CommandLineType.EXPLICIT));
             applicationOutputs.add(RegisterSampleApplicationsUtils.createAppOutput("trj_file",
-                    "", DataType.URI, ValidityType.OPTIONAL, CommandLineType.EXCLUSIVE));
+                    "", DataType.URI, ValidityType.OPTIONAL, CommandLineType.EXPLICIT));
             applicationOutputs.add(RegisterSampleApplicationsUtils.createAppOutput("rst_file",
-                    "", DataType.URI, ValidityType.OPTIONAL, CommandLineType.EXCLUSIVE));
+                    "", DataType.URI, ValidityType.OPTIONAL, CommandLineType.EXPLICIT));
             applicationOutputs.add(RegisterSampleApplicationsUtils.createAppOutput("f10_file",
-                    "", DataType.URI, ValidityType.OPTIONAL, CommandLineType.EXCLUSIVE));
+                    "", DataType.URI, ValidityType.OPTIONAL, CommandLineType.EXPLICIT));
 
 
             gamessInterfaceId = airavataClient.registerApplicationInterface(
@@ -710,13 +710,13 @@ public class RegisterSampleApplications {
             appModules.add(nwChemModuleId);
 
             InputDataObjectType input1 = RegisterSampleApplicationsUtils.createAppInput("Water_Molecule_Input", null,
-                    DataType.URI, null, 1,ValidityType.REQUIRED , CommandLineType.INCLUSIVE, false, "Water Molecule Input File - water.nw", null);
+                    DataType.URI, null, 1,ValidityType.REQUIRED , CommandLineType.IMPLICIT, false, "Water Molecule Input File - water.nw", null);
 
             List<InputDataObjectType> applicationInputs = new ArrayList<InputDataObjectType>();
             applicationInputs.add(input1);
 
             OutputDataObjectType output1 = RegisterSampleApplicationsUtils.createAppOutput("NWChem_Execution_Log",
-                    null, DataType.URI, ValidityType.REQUIRED, CommandLineType.INCLUSIVE);
+                    null, DataType.URI, ValidityType.REQUIRED, CommandLineType.IMPLICIT);
 
             List<OutputDataObjectType> applicationOutputs = new ArrayList<OutputDataObjectType>();
             applicationOutputs.add(output1);
@@ -869,7 +869,7 @@ public class RegisterSampleApplications {
             appModules.add(gaussianModuleId);
 
             InputDataObjectType input1 = RegisterSampleApplicationsUtils.createAppInput("MainInputFile", null,
-                    DataType.URI, null, 1, ValidityType.REQUIRED, CommandLineType.INCLUSIVE,  false, "Gaussian main input file", null);
+                    DataType.URI, null, 1, ValidityType.REQUIRED, CommandLineType.IMPLICIT,  false, "Gaussian main input file", null);
 
             List<InputDataObjectType> applicationInputs = new ArrayList<InputDataObjectType>();
             applicationInputs.add(input1);
@@ -898,19 +898,19 @@ public class RegisterSampleApplications {
             appModules.add(monteXModuleId);
 
             InputDataObjectType input1 = RegisterSampleApplicationsUtils.createAppInput("xyzf", "O16.xyz",
-                    DataType.URI, null, 1, ValidityType.REQUIRED, CommandLineType.INCLUSIVE, false, "Tinker monte input_1", null);
+                    DataType.URI, null, 1, ValidityType.REQUIRED, CommandLineType.IMPLICIT, false, "Tinker monte input_1", null);
             InputDataObjectType input2 = RegisterSampleApplicationsUtils.createAppInput("keyf", "O16.key",
-                    DataType.URI, "-k", 2, ValidityType.REQUIRED, CommandLineType.INCLUSIVE, false, "Tinker monte input_2", null);
+                    DataType.URI, "-k", 2, ValidityType.REQUIRED, CommandLineType.IMPLICIT, false, "Tinker monte input_2", null);
             InputDataObjectType input3 = RegisterSampleApplicationsUtils.createAppInput("stps", "20000",
-                    DataType.STRING, null, 3, ValidityType.REQUIRED, CommandLineType.INCLUSIVE, false, "Tinker monte input_3", null);
+                    DataType.STRING, null, 3, ValidityType.REQUIRED, CommandLineType.IMPLICIT, false, "Tinker monte input_3", null);
             InputDataObjectType input4 = RegisterSampleApplicationsUtils.createAppInput("Ctc", "C",
-                    DataType.STRING, null, 4, ValidityType.REQUIRED, CommandLineType.INCLUSIVE, false, "Tinker monte input_4", null);
+                    DataType.STRING, null, 4, ValidityType.REQUIRED, CommandLineType.IMPLICIT, false, "Tinker monte input_4", null);
             InputDataObjectType input5 = RegisterSampleApplicationsUtils.createAppInput("stpsZ", "3.0",
-                    DataType.STRING, null, 5, ValidityType.REQUIRED, CommandLineType.INCLUSIVE, false, "Tinker monte input_5", null);
+                    DataType.STRING, null, 5, ValidityType.REQUIRED, CommandLineType.IMPLICIT, false, "Tinker monte input_5", null);
             InputDataObjectType input6 = RegisterSampleApplicationsUtils.createAppInput("temp", "298",
-                    DataType.STRING, null, 6, ValidityType.REQUIRED, CommandLineType.INCLUSIVE, false, "Tinker monte input_6", null);
+                    DataType.STRING, null, 6, ValidityType.REQUIRED, CommandLineType.IMPLICIT, false, "Tinker monte input_6", null);
             InputDataObjectType input7 = RegisterSampleApplicationsUtils.createAppInput("Rconv", "0.01",
-                    DataType.STRING, null, 7, ValidityType.REQUIRED, CommandLineType.INCLUSIVE,  false, "Tinker monte input_7", null);
+                    DataType.STRING, null, 7, ValidityType.REQUIRED, CommandLineType.IMPLICIT,  false, "Tinker monte input_7", null);
 
             List<InputDataObjectType> applicationInputs = new ArrayList<InputDataObjectType>();
             applicationInputs.add(input1);

http://git-wip-us.apache.org/repos/asf/airavata/blob/99fdd58a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appdeployment/ApplicationDeploymentDescription.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appdeployment/ApplicationDeploymentDescription.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appdeployment/ApplicationDeploymentDescription.java
index 132ed77..06b6240 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appdeployment/ApplicationDeploymentDescription.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appdeployment/ApplicationDeploymentDescription.java
@@ -88,6 +88,8 @@ import org.slf4j.LoggerFactory;
   private static final org.apache.thrift.protocol.TField LIB_PREPEND_PATHS_FIELD_DESC = new org.apache.thrift.protocol.TField("libPrependPaths", org.apache.thrift.protocol.TType.LIST, (short)8);
   private static final org.apache.thrift.protocol.TField LIB_APPEND_PATHS_FIELD_DESC = new org.apache.thrift.protocol.TField("libAppendPaths", org.apache.thrift.protocol.TType.LIST, (short)9);
   private static final org.apache.thrift.protocol.TField SET_ENVIRONMENT_FIELD_DESC = new org.apache.thrift.protocol.TField("setEnvironment", org.apache.thrift.protocol.TType.LIST, (short)10);
+  private static final org.apache.thrift.protocol.TField PRE_JOB_COMMANDS_FIELD_DESC = new org.apache.thrift.protocol.TField("preJobCommands", org.apache.thrift.protocol.TType.LIST, (short)11);
+  private static final org.apache.thrift.protocol.TField POST_JOB_COMMANDS_FIELD_DESC = new org.apache.thrift.protocol.TField("postJobCommands", org.apache.thrift.protocol.TType.LIST, (short)12);
 
   private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
@@ -105,6 +107,8 @@ import org.slf4j.LoggerFactory;
   private List<SetEnvPaths> libPrependPaths; // optional
   private List<SetEnvPaths> libAppendPaths; // optional
   private List<SetEnvPaths> setEnvironment; // optional
+  private List<String> preJobCommands; // optional
+  private List<String> postJobCommands; // optional
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -121,7 +125,9 @@ import org.slf4j.LoggerFactory;
     MODULE_LOAD_CMDS((short)7, "moduleLoadCmds"),
     LIB_PREPEND_PATHS((short)8, "libPrependPaths"),
     LIB_APPEND_PATHS((short)9, "libAppendPaths"),
-    SET_ENVIRONMENT((short)10, "setEnvironment");
+    SET_ENVIRONMENT((short)10, "setEnvironment"),
+    PRE_JOB_COMMANDS((short)11, "preJobCommands"),
+    POST_JOB_COMMANDS((short)12, "postJobCommands");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -156,6 +162,10 @@ import org.slf4j.LoggerFactory;
           return LIB_APPEND_PATHS;
         case 10: // SET_ENVIRONMENT
           return SET_ENVIRONMENT;
+        case 11: // PRE_JOB_COMMANDS
+          return PRE_JOB_COMMANDS;
+        case 12: // POST_JOB_COMMANDS
+          return POST_JOB_COMMANDS;
         default:
           return null;
       }
@@ -196,7 +206,7 @@ import org.slf4j.LoggerFactory;
   }
 
   // isset id assignments
-  private _Fields optionals[] = {_Fields.APP_DEPLOYMENT_DESCRIPTION,_Fields.MODULE_LOAD_CMDS,_Fields.LIB_PREPEND_PATHS,_Fields.LIB_APPEND_PATHS,_Fields.SET_ENVIRONMENT};
+  private _Fields optionals[] = {_Fields.APP_DEPLOYMENT_DESCRIPTION,_Fields.MODULE_LOAD_CMDS,_Fields.LIB_PREPEND_PATHS,_Fields.LIB_APPEND_PATHS,_Fields.SET_ENVIRONMENT,_Fields.PRE_JOB_COMMANDS,_Fields.POST_JOB_COMMANDS};
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
   static {
     Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -224,6 +234,12 @@ import org.slf4j.LoggerFactory;
     tmpMap.put(_Fields.SET_ENVIRONMENT, new org.apache.thrift.meta_data.FieldMetaData("setEnvironment", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
             new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SetEnvPaths.class))));
+    tmpMap.put(_Fields.PRE_JOB_COMMANDS, new org.apache.thrift.meta_data.FieldMetaData("preJobCommands", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
+            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
+    tmpMap.put(_Fields.POST_JOB_COMMANDS, new org.apache.thrift.meta_data.FieldMetaData("postJobCommands", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
+            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
     org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ApplicationDeploymentDescription.class, metaDataMap);
   }
@@ -297,6 +313,14 @@ import org.slf4j.LoggerFactory;
       }
       this.setEnvironment = __this__setEnvironment;
     }
+    if (other.isSetPreJobCommands()) {
+      List<String> __this__preJobCommands = new ArrayList<String>(other.preJobCommands);
+      this.preJobCommands = __this__preJobCommands;
+    }
+    if (other.isSetPostJobCommands()) {
+      List<String> __this__postJobCommands = new ArrayList<String>(other.postJobCommands);
+      this.postJobCommands = __this__postJobCommands;
+    }
   }
 
   public ApplicationDeploymentDescription deepCopy() {
@@ -317,6 +341,8 @@ import org.slf4j.LoggerFactory;
     this.libPrependPaths = null;
     this.libAppendPaths = null;
     this.setEnvironment = null;
+    this.preJobCommands = null;
+    this.postJobCommands = null;
   }
 
   public String getAppDeploymentId() {
@@ -617,6 +643,82 @@ import org.slf4j.LoggerFactory;
     }
   }
 
+  public int getPreJobCommandsSize() {
+    return (this.preJobCommands == null) ? 0 : this.preJobCommands.size();
+  }
+
+  public java.util.Iterator<String> getPreJobCommandsIterator() {
+    return (this.preJobCommands == null) ? null : this.preJobCommands.iterator();
+  }
+
+  public void addToPreJobCommands(String elem) {
+    if (this.preJobCommands == null) {
+      this.preJobCommands = new ArrayList<String>();
+    }
+    this.preJobCommands.add(elem);
+  }
+
+  public List<String> getPreJobCommands() {
+    return this.preJobCommands;
+  }
+
+  public void setPreJobCommands(List<String> preJobCommands) {
+    this.preJobCommands = preJobCommands;
+  }
+
+  public void unsetPreJobCommands() {
+    this.preJobCommands = null;
+  }
+
+  /** Returns true if field preJobCommands is set (has been assigned a value) and false otherwise */
+  public boolean isSetPreJobCommands() {
+    return this.preJobCommands != null;
+  }
+
+  public void setPreJobCommandsIsSet(boolean value) {
+    if (!value) {
+      this.preJobCommands = null;
+    }
+  }
+
+  public int getPostJobCommandsSize() {
+    return (this.postJobCommands == null) ? 0 : this.postJobCommands.size();
+  }
+
+  public java.util.Iterator<String> getPostJobCommandsIterator() {
+    return (this.postJobCommands == null) ? null : this.postJobCommands.iterator();
+  }
+
+  public void addToPostJobCommands(String elem) {
+    if (this.postJobCommands == null) {
+      this.postJobCommands = new ArrayList<String>();
+    }
+    this.postJobCommands.add(elem);
+  }
+
+  public List<String> getPostJobCommands() {
+    return this.postJobCommands;
+  }
+
+  public void setPostJobCommands(List<String> postJobCommands) {
+    this.postJobCommands = postJobCommands;
+  }
+
+  public void unsetPostJobCommands() {
+    this.postJobCommands = null;
+  }
+
+  /** Returns true if field postJobCommands is set (has been assigned a value) and false otherwise */
+  public boolean isSetPostJobCommands() {
+    return this.postJobCommands != null;
+  }
+
+  public void setPostJobCommandsIsSet(boolean value) {
+    if (!value) {
+      this.postJobCommands = null;
+    }
+  }
+
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
     case APP_DEPLOYMENT_ID:
@@ -699,6 +801,22 @@ import org.slf4j.LoggerFactory;
       }
       break;
 
+    case PRE_JOB_COMMANDS:
+      if (value == null) {
+        unsetPreJobCommands();
+      } else {
+        setPreJobCommands((List<String>)value);
+      }
+      break;
+
+    case POST_JOB_COMMANDS:
+      if (value == null) {
+        unsetPostJobCommands();
+      } else {
+        setPostJobCommands((List<String>)value);
+      }
+      break;
+
     }
   }
 
@@ -734,6 +852,12 @@ import org.slf4j.LoggerFactory;
     case SET_ENVIRONMENT:
       return getSetEnvironment();
 
+    case PRE_JOB_COMMANDS:
+      return getPreJobCommands();
+
+    case POST_JOB_COMMANDS:
+      return getPostJobCommands();
+
     }
     throw new IllegalStateException();
   }
@@ -765,6 +889,10 @@ import org.slf4j.LoggerFactory;
       return isSetLibAppendPaths();
     case SET_ENVIRONMENT:
       return isSetSetEnvironment();
+    case PRE_JOB_COMMANDS:
+      return isSetPreJobCommands();
+    case POST_JOB_COMMANDS:
+      return isSetPostJobCommands();
     }
     throw new IllegalStateException();
   }
@@ -872,6 +1000,24 @@ import org.slf4j.LoggerFactory;
         return false;
     }
 
+    boolean this_present_preJobCommands = true && this.isSetPreJobCommands();
+    boolean that_present_preJobCommands = true && that.isSetPreJobCommands();
+    if (this_present_preJobCommands || that_present_preJobCommands) {
+      if (!(this_present_preJobCommands && that_present_preJobCommands))
+        return false;
+      if (!this.preJobCommands.equals(that.preJobCommands))
+        return false;
+    }
+
+    boolean this_present_postJobCommands = true && this.isSetPostJobCommands();
+    boolean that_present_postJobCommands = true && that.isSetPostJobCommands();
+    if (this_present_postJobCommands || that_present_postJobCommands) {
+      if (!(this_present_postJobCommands && that_present_postJobCommands))
+        return false;
+      if (!this.postJobCommands.equals(that.postJobCommands))
+        return false;
+    }
+
     return true;
   }
 
@@ -988,6 +1134,26 @@ import org.slf4j.LoggerFactory;
         return lastComparison;
       }
     }
+    lastComparison = Boolean.valueOf(isSetPreJobCommands()).compareTo(other.isSetPreJobCommands());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetPreJobCommands()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.preJobCommands, other.preJobCommands);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetPostJobCommands()).compareTo(other.isSetPostJobCommands());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetPostJobCommands()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.postJobCommands, other.postJobCommands);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
     return 0;
   }
 
@@ -1097,6 +1263,26 @@ import org.slf4j.LoggerFactory;
       }
       first = false;
     }
+    if (isSetPreJobCommands()) {
+      if (!first) sb.append(", ");
+      sb.append("preJobCommands:");
+      if (this.preJobCommands == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.preJobCommands);
+      }
+      first = false;
+    }
+    if (isSetPostJobCommands()) {
+      if (!first) sb.append(", ");
+      sb.append("postJobCommands:");
+      if (this.postJobCommands == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.postJobCommands);
+      }
+      first = false;
+    }
     sb.append(")");
     return sb.toString();
   }
@@ -1283,6 +1469,42 @@ import org.slf4j.LoggerFactory;
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
+          case 11: // PRE_JOB_COMMANDS
+            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+              {
+                org.apache.thrift.protocol.TList _list12 = iprot.readListBegin();
+                struct.preJobCommands = new ArrayList<String>(_list12.size);
+                for (int _i13 = 0; _i13 < _list12.size; ++_i13)
+                {
+                  String _elem14;
+                  _elem14 = iprot.readString();
+                  struct.preJobCommands.add(_elem14);
+                }
+                iprot.readListEnd();
+              }
+              struct.setPreJobCommandsIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 12: // POST_JOB_COMMANDS
+            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+              {
+                org.apache.thrift.protocol.TList _list15 = iprot.readListBegin();
+                struct.postJobCommands = new ArrayList<String>(_list15.size);
+                for (int _i16 = 0; _i16 < _list15.size; ++_i16)
+                {
+                  String _elem17;
+                  _elem17 = iprot.readString();
+                  struct.postJobCommands.add(_elem17);
+                }
+                iprot.readListEnd();
+              }
+              struct.setPostJobCommandsIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
           default:
             org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
@@ -1333,9 +1555,9 @@ import org.slf4j.LoggerFactory;
           oprot.writeFieldBegin(MODULE_LOAD_CMDS_FIELD_DESC);
           {
             oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.moduleLoadCmds.size()));
-            for (String _iter12 : struct.moduleLoadCmds)
+            for (String _iter18 : struct.moduleLoadCmds)
             {
-              oprot.writeString(_iter12);
+              oprot.writeString(_iter18);
             }
             oprot.writeListEnd();
           }
@@ -1347,9 +1569,9 @@ import org.slf4j.LoggerFactory;
           oprot.writeFieldBegin(LIB_PREPEND_PATHS_FIELD_DESC);
           {
             oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.libPrependPaths.size()));
-            for (SetEnvPaths _iter13 : struct.libPrependPaths)
+            for (SetEnvPaths _iter19 : struct.libPrependPaths)
             {
-              _iter13.write(oprot);
+              _iter19.write(oprot);
             }
             oprot.writeListEnd();
           }
@@ -1361,9 +1583,9 @@ import org.slf4j.LoggerFactory;
           oprot.writeFieldBegin(LIB_APPEND_PATHS_FIELD_DESC);
           {
             oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.libAppendPaths.size()));
-            for (SetEnvPaths _iter14 : struct.libAppendPaths)
+            for (SetEnvPaths _iter20 : struct.libAppendPaths)
             {
-              _iter14.write(oprot);
+              _iter20.write(oprot);
             }
             oprot.writeListEnd();
           }
@@ -1375,9 +1597,37 @@ import org.slf4j.LoggerFactory;
           oprot.writeFieldBegin(SET_ENVIRONMENT_FIELD_DESC);
           {
             oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.setEnvironment.size()));
-            for (SetEnvPaths _iter15 : struct.setEnvironment)
+            for (SetEnvPaths _iter21 : struct.setEnvironment)
+            {
+              _iter21.write(oprot);
+            }
+            oprot.writeListEnd();
+          }
+          oprot.writeFieldEnd();
+        }
+      }
+      if (struct.preJobCommands != null) {
+        if (struct.isSetPreJobCommands()) {
+          oprot.writeFieldBegin(PRE_JOB_COMMANDS_FIELD_DESC);
+          {
+            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.preJobCommands.size()));
+            for (String _iter22 : struct.preJobCommands)
             {
-              _iter15.write(oprot);
+              oprot.writeString(_iter22);
+            }
+            oprot.writeListEnd();
+          }
+          oprot.writeFieldEnd();
+        }
+      }
+      if (struct.postJobCommands != null) {
+        if (struct.isSetPostJobCommands()) {
+          oprot.writeFieldBegin(POST_JOB_COMMANDS_FIELD_DESC);
+          {
+            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.postJobCommands.size()));
+            for (String _iter23 : struct.postJobCommands)
+            {
+              oprot.writeString(_iter23);
             }
             oprot.writeListEnd();
           }
@@ -1422,43 +1672,67 @@ import org.slf4j.LoggerFactory;
       if (struct.isSetSetEnvironment()) {
         optionals.set(4);
       }
-      oprot.writeBitSet(optionals, 5);
+      if (struct.isSetPreJobCommands()) {
+        optionals.set(5);
+      }
+      if (struct.isSetPostJobCommands()) {
+        optionals.set(6);
+      }
+      oprot.writeBitSet(optionals, 7);
       if (struct.isSetAppDeploymentDescription()) {
         oprot.writeString(struct.appDeploymentDescription);
       }
       if (struct.isSetModuleLoadCmds()) {
         {
           oprot.writeI32(struct.moduleLoadCmds.size());
-          for (String _iter16 : struct.moduleLoadCmds)
+          for (String _iter24 : struct.moduleLoadCmds)
           {
-            oprot.writeString(_iter16);
+            oprot.writeString(_iter24);
           }
         }
       }
       if (struct.isSetLibPrependPaths()) {
         {
           oprot.writeI32(struct.libPrependPaths.size());
-          for (SetEnvPaths _iter17 : struct.libPrependPaths)
+          for (SetEnvPaths _iter25 : struct.libPrependPaths)
           {
-            _iter17.write(oprot);
+            _iter25.write(oprot);
           }
         }
       }
       if (struct.isSetLibAppendPaths()) {
         {
           oprot.writeI32(struct.libAppendPaths.size());
-          for (SetEnvPaths _iter18 : struct.libAppendPaths)
+          for (SetEnvPaths _iter26 : struct.libAppendPaths)
           {
-            _iter18.write(oprot);
+            _iter26.write(oprot);
           }
         }
       }
       if (struct.isSetSetEnvironment()) {
         {
           oprot.writeI32(struct.setEnvironment.size());
-          for (SetEnvPaths _iter19 : struct.setEnvironment)
+          for (SetEnvPaths _iter27 : struct.setEnvironment)
           {
-            _iter19.write(oprot);
+            _iter27.write(oprot);
+          }
+        }
+      }
+      if (struct.isSetPreJobCommands()) {
+        {
+          oprot.writeI32(struct.preJobCommands.size());
+          for (String _iter28 : struct.preJobCommands)
+          {
+            oprot.writeString(_iter28);
+          }
+        }
+      }
+      if (struct.isSetPostJobCommands()) {
+        {
+          oprot.writeI32(struct.postJobCommands.size());
+          for (String _iter29 : struct.postJobCommands)
+          {
+            oprot.writeString(_iter29);
           }
         }
       }
@@ -1477,66 +1751,92 @@ import org.slf4j.LoggerFactory;
       struct.setExecutablePathIsSet(true);
       struct.parallelism = ApplicationParallelismType.findByValue(iprot.readI32());
       struct.setParallelismIsSet(true);
-      BitSet incoming = iprot.readBitSet(5);
+      BitSet incoming = iprot.readBitSet(7);
       if (incoming.get(0)) {
         struct.appDeploymentDescription = iprot.readString();
         struct.setAppDeploymentDescriptionIsSet(true);
       }
       if (incoming.get(1)) {
         {
-          org.apache.thrift.protocol.TList _list20 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-          struct.moduleLoadCmds = new ArrayList<String>(_list20.size);
-          for (int _i21 = 0; _i21 < _list20.size; ++_i21)
+          org.apache.thrift.protocol.TList _list30 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+          struct.moduleLoadCmds = new ArrayList<String>(_list30.size);
+          for (int _i31 = 0; _i31 < _list30.size; ++_i31)
           {
-            String _elem22;
-            _elem22 = iprot.readString();
-            struct.moduleLoadCmds.add(_elem22);
+            String _elem32;
+            _elem32 = iprot.readString();
+            struct.moduleLoadCmds.add(_elem32);
           }
         }
         struct.setModuleLoadCmdsIsSet(true);
       }
       if (incoming.get(2)) {
         {
-          org.apache.thrift.protocol.TList _list23 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-          struct.libPrependPaths = new ArrayList<SetEnvPaths>(_list23.size);
-          for (int _i24 = 0; _i24 < _list23.size; ++_i24)
+          org.apache.thrift.protocol.TList _list33 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+          struct.libPrependPaths = new ArrayList<SetEnvPaths>(_list33.size);
+          for (int _i34 = 0; _i34 < _list33.size; ++_i34)
           {
-            SetEnvPaths _elem25;
-            _elem25 = new SetEnvPaths();
-            _elem25.read(iprot);
-            struct.libPrependPaths.add(_elem25);
+            SetEnvPaths _elem35;
+            _elem35 = new SetEnvPaths();
+            _elem35.read(iprot);
+            struct.libPrependPaths.add(_elem35);
           }
         }
         struct.setLibPrependPathsIsSet(true);
       }
       if (incoming.get(3)) {
         {
-          org.apache.thrift.protocol.TList _list26 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-          struct.libAppendPaths = new ArrayList<SetEnvPaths>(_list26.size);
-          for (int _i27 = 0; _i27 < _list26.size; ++_i27)
+          org.apache.thrift.protocol.TList _list36 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+          struct.libAppendPaths = new ArrayList<SetEnvPaths>(_list36.size);
+          for (int _i37 = 0; _i37 < _list36.size; ++_i37)
           {
-            SetEnvPaths _elem28;
-            _elem28 = new SetEnvPaths();
-            _elem28.read(iprot);
-            struct.libAppendPaths.add(_elem28);
+            SetEnvPaths _elem38;
+            _elem38 = new SetEnvPaths();
+            _elem38.read(iprot);
+            struct.libAppendPaths.add(_elem38);
           }
         }
         struct.setLibAppendPathsIsSet(true);
       }
       if (incoming.get(4)) {
         {
-          org.apache.thrift.protocol.TList _list29 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-          struct.setEnvironment = new ArrayList<SetEnvPaths>(_list29.size);
-          for (int _i30 = 0; _i30 < _list29.size; ++_i30)
+          org.apache.thrift.protocol.TList _list39 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+          struct.setEnvironment = new ArrayList<SetEnvPaths>(_list39.size);
+          for (int _i40 = 0; _i40 < _list39.size; ++_i40)
           {
-            SetEnvPaths _elem31;
-            _elem31 = new SetEnvPaths();
-            _elem31.read(iprot);
-            struct.setEnvironment.add(_elem31);
+            SetEnvPaths _elem41;
+            _elem41 = new SetEnvPaths();
+            _elem41.read(iprot);
+            struct.setEnvironment.add(_elem41);
           }
         }
         struct.setSetEnvironmentIsSet(true);
       }
+      if (incoming.get(5)) {
+        {
+          org.apache.thrift.protocol.TList _list42 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+          struct.preJobCommands = new ArrayList<String>(_list42.size);
+          for (int _i43 = 0; _i43 < _list42.size; ++_i43)
+          {
+            String _elem44;
+            _elem44 = iprot.readString();
+            struct.preJobCommands.add(_elem44);
+          }
+        }
+        struct.setPreJobCommandsIsSet(true);
+      }
+      if (incoming.get(6)) {
+        {
+          org.apache.thrift.protocol.TList _list45 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+          struct.postJobCommands = new ArrayList<String>(_list45.size);
+          for (int _i46 = 0; _i46 < _list45.size; ++_i46)
+          {
+            String _elem47;
+            _elem47 = iprot.readString();
+            struct.postJobCommands.add(_elem47);
+          }
+        }
+        struct.setPostJobCommandsIsSet(true);
+      }
     }
   }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/99fdd58a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appinterface/CommandLineType.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appinterface/CommandLineType.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appinterface/CommandLineType.java
index 9d1dcb7..a24a524 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appinterface/CommandLineType.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appinterface/CommandLineType.java
@@ -29,8 +29,8 @@ import java.util.HashMap;
 import org.apache.thrift.TEnum;
 
 @SuppressWarnings("all") public enum CommandLineType implements org.apache.thrift.TEnum {
-  INCLUSIVE(0),
-  EXCLUSIVE(1);
+  IMPLICIT(0),
+  EXPLICIT(1);
 
   private final int value;
 
@@ -52,9 +52,9 @@ import org.apache.thrift.TEnum;
   public static CommandLineType findByValue(int value) { 
     switch (value) {
       case 0:
-        return INCLUSIVE;
+        return IMPLICIT;
       case 1:
-        return EXCLUSIVE;
+        return EXPLICIT;
       default:
         return null;
     }

http://git-wip-us.apache.org/repos/asf/airavata/blob/99fdd58a/airavata-api/thrift-interface-descriptions/applicationDeploymentModel.thrift
----------------------------------------------------------------------
diff --git a/airavata-api/thrift-interface-descriptions/applicationDeploymentModel.thrift b/airavata-api/thrift-interface-descriptions/applicationDeploymentModel.thrift
index 9df1df3..d2171b5 100644
--- a/airavata-api/thrift-interface-descriptions/applicationDeploymentModel.thrift
+++ b/airavata-api/thrift-interface-descriptions/applicationDeploymentModel.thrift
@@ -126,4 +126,6 @@ struct ApplicationDeploymentDescription {
 	8: optional list<SetEnvPaths> libPrependPaths,
 	9: optional list<SetEnvPaths> libAppendPaths,
 	10: optional list<SetEnvPaths> setEnvironment,
+	11: optional list<string> preJobCommands,
+	12: optional list<string> postJobCommands,
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/99fdd58a/airavata-api/thrift-interface-descriptions/applicationInterfaceModel.thrift
----------------------------------------------------------------------
diff --git a/airavata-api/thrift-interface-descriptions/applicationInterfaceModel.thrift b/airavata-api/thrift-interface-descriptions/applicationInterfaceModel.thrift
index f287e22..d724b5b 100644
--- a/airavata-api/thrift-interface-descriptions/applicationInterfaceModel.thrift
+++ b/airavata-api/thrift-interface-descriptions/applicationInterfaceModel.thrift
@@ -49,16 +49,10 @@ enum ValidityType{
 }
 
 enum CommandLineType{
-	INCLUSIVE,
-	EXCLUSIVE
+	IMPLICIT,
+	EXPLICIT
 }
 
-enum InputMetadataType {
-    MEMORY,
-    CPU
-}
-
-
 /**
  * Application Inputs. The paramters describe how inputs are passed to the application.
  *

http://git-wip-us.apache.org/repos/asf/airavata/blob/99fdd58a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ApplicationDeploymentImpl.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ApplicationDeploymentImpl.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ApplicationDeploymentImpl.java
index f1f9ccf..c82ba6a 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ApplicationDeploymentImpl.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ApplicationDeploymentImpl.java
@@ -79,6 +79,26 @@ public class ApplicationDeploymentImpl implements ApplicationDeployment {
                 }
             }
 
+            List<String> preJobCommands = deploymentDescription.getPreJobCommands();
+            if (preJobCommands != null && !preJobCommands.isEmpty()){
+                for (String cmd : preJobCommands){
+                    PreJobCommandResource cmdResource = new PreJobCommandResource();
+                    cmdResource.setAppDeploymentId(deploymentDescription.getAppDeploymentId());
+                    cmdResource.setCommand(cmd);
+                    cmdResource.save();
+                }
+            }
+
+            List<String> postJobCommands = deploymentDescription.getPostJobCommands();
+            if (postJobCommands != null && !postJobCommands.isEmpty()){
+                for (String cmd : postJobCommands){
+                    PreJobCommandResource cmdResource = new PreJobCommandResource();
+                    cmdResource.setAppDeploymentId(deploymentDescription.getAppDeploymentId());
+                    cmdResource.setCommand(cmd);
+                    cmdResource.save();
+                }
+            }
+
             List<SetEnvPaths> libPrependPaths = deploymentDescription.getLibPrependPaths();
             if (libPrependPaths != null && !libPrependPaths.isEmpty()){
                 for (SetEnvPaths path : libPrependPaths){
@@ -169,6 +189,46 @@ public class ApplicationDeploymentImpl implements ApplicationDeployment {
                 }
             }
 
+            PreJobCommandResource preJobCommandResource = new PreJobCommandResource();
+            ids = new HashMap<String, String>();
+            ids.put(AbstractResource.PreJobCommandConstants.DEPLOYMENT_ID, deploymentId);
+            preJobCommandResource.remove(ids);
+            List<String> preJobCommands = updatedDeployment.getPreJobCommands();
+            if (preJobCommands != null && !preJobCommands.isEmpty()){
+                for (String cmd : preJobCommands){
+                    ids = new HashMap<String, String>();
+                    ids.put(AbstractResource.PreJobCommandConstants.DEPLOYMENT_ID, deploymentId);
+                    ids.put(AbstractResource.PreJobCommandConstants.COMMAND, cmd);
+                    if (preJobCommandResource.isExists(ids)){
+                        preJobCommandResource = (PreJobCommandResource)preJobCommandResource.get(ids);
+                    }
+                    preJobCommandResource.setCommand(cmd);
+                    preJobCommandResource.setAppDeploymentResource(existingDep);
+                    preJobCommandResource.setAppDeploymentId(deploymentId);
+                    preJobCommandResource.save();
+                }
+            }
+
+            PostJobCommandResource postJobCommandResource = new PostJobCommandResource();
+            ids = new HashMap<String, String>();
+            ids.put(AbstractResource.PreJobCommandConstants.DEPLOYMENT_ID, deploymentId);
+            postJobCommandResource.remove(ids);
+            List<String> postJobCommands = updatedDeployment.getPreJobCommands();
+            if (postJobCommands != null && !postJobCommands.isEmpty()){
+                for (String cmd : postJobCommands){
+                    ids = new HashMap<String, String>();
+                    ids.put(AbstractResource.PostJobCommandConstants.DEPLOYMENT_ID, deploymentId);
+                    ids.put(AbstractResource.PostJobCommandConstants.COMMAND, cmd);
+                    if (postJobCommandResource.isExists(ids)){
+                        postJobCommandResource = (PostJobCommandResource)postJobCommandResource.get(ids);
+                    }
+                    postJobCommandResource.setCommand(cmd);
+                    postJobCommandResource.setAppDeploymentResource(existingDep);
+                    postJobCommandResource.setAppDeploymentId(deploymentId);
+                    postJobCommandResource.save();
+                }
+            }
+
             // remove existing lib prepand paths
             LibraryPrepandPathResource prepandPathResource = new LibraryPrepandPathResource();
             ids = new HashMap<String, String>();

http://git-wip-us.apache.org/repos/asf/airavata/blob/99fdd58a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java
index 3282fc2..0ead526 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java
@@ -241,21 +241,21 @@ public class ComputeResourceImpl implements ComputeResource {
 //        try {
 //            GSISSHSubmissionResource resource = new GSISSHSubmissionResource();
 //            String hostName = "GSISSH";
-//            resource.setSubmissionID(AppCatalogUtils.getID(hostName));
+//            resource.setDeploymentId(AppCatalogUtils.getID(hostName));
 //            resource.setSshPort(resource.getSshPort());
 //            resource.setResourceJobManager(gsisshJobSubmission.getResourceJobManager().toString());
 //            resource.setInstalledPath(gsisshJobSubmission.getInstalledPath());
 //            resource.setMonitorMode(gsisshJobSubmission.getMonitorMode());
 //            resource.save();
-//            gsisshJobSubmission.setJobSubmissionDataID(resource.getSubmissionID());
+//            gsisshJobSubmission.setJobSubmissionDataID(resource.getDeploymentId());
 //
 //            Set<String> exports = gsisshJobSubmission.getExports();
 //            if (exports != null && !exports.isEmpty()){
 //                for (String export : exports){
 //                    GSISSHExportResource exportResource = new GSISSHExportResource();
-//                    exportResource.setSubmissionID(resource.getSubmissionID());
+//                    exportResource.setDeploymentId(resource.getDeploymentId());
 //                    exportResource.setExport(export);
-//                    exportResource.setGsisshSubmissionResource(resource);
+//                    exportResource.setAppDeploymentResource(resource);
 //                    exportResource.save();
 //                }
 //            }
@@ -264,9 +264,9 @@ public class ComputeResourceImpl implements ComputeResource {
 //            if (preJobCommands != null && !preJobCommands.isEmpty()){
 //                for (String command : preJobCommands){
 //                    GSISSHPreJobCommandResource commandResource = new GSISSHPreJobCommandResource();
-//                    commandResource.setSubmissionID(resource.getSubmissionID());
+//                    commandResource.setDeploymentId(resource.getDeploymentId());
 //                    commandResource.setCommand(command);
-//                    commandResource.setGsisshSubmissionResource(resource);
+//                    commandResource.setAppDeploymentResource(resource);
 //                    commandResource.save();
 //                }
 //            }
@@ -275,13 +275,13 @@ public class ComputeResourceImpl implements ComputeResource {
 //            if (postJobCommands != null && !postJobCommands.isEmpty()){
 //                for (String command : postJobCommands){
 //                    GSISSHPostJobCommandResource commandResource = new GSISSHPostJobCommandResource();
-//                    commandResource.setSubmissionID(resource.getSubmissionID());
+//                    commandResource.setDeploymentId(resource.getDeploymentId());
 //                    commandResource.setCommand(command);
-//                    commandResource.setGsisshSubmissionResource(resource);
+//                    commandResource.setAppDeploymentResource(resource);
 //                    commandResource.save();
 //                }
 //            }
-//            return resource.getSubmissionID();
+//            return resource.getDeploymentId();
 //        }catch (Exception e) {
 //            logger.error("Error while saving GSISSH Job Submission...", e);
 //            throw new AppCatalogException(e);
@@ -293,7 +293,7 @@ public class ComputeResourceImpl implements ComputeResource {
 //        try {
 //            JobSubmissionProtocolResource resource = new JobSubmissionProtocolResource();
 //            resource.setResourceID(computeResourceId);
-//            resource.setSubmissionID(jobSubmissionId);
+//            resource.setDeploymentId(jobSubmissionId);
 //            ComputeResourceDescription computeResource = getComputeResource(computeResourceId);
 //            resource.setComputeHostResource(AppCatalogThriftConversion.getComputeHostResource(computeResource));
 //            resource.setJobType(JobSubmissionProtocol.GSISSH.toString());
@@ -309,22 +309,22 @@ public class ComputeResourceImpl implements ComputeResource {
 //        try {
 //            GlobusJobSubmissionResource resource = new GlobusJobSubmissionResource();
 //            String hostName = "GLOBUS";
-//            resource.setSubmissionID(AppCatalogUtils.getID(hostName));
+//            resource.setDeploymentId(AppCatalogUtils.getID(hostName));
 //            resource.setSecurityProtocol(globusJobSubmission.getSecurityProtocol().toString());
 //            resource.setResourceJobManager(globusJobSubmission.getResourceJobManager().toString());
 //            resource.save();
-//            globusJobSubmission.setJobSubmissionDataID(resource.getSubmissionID());
+//            globusJobSubmission.setJobSubmissionDataID(resource.getDeploymentId());
 //            List<String> globusGateKeeperEndPoint = globusJobSubmission.getGlobusGateKeeperEndPoint();
 //            if (globusGateKeeperEndPoint != null && !globusGateKeeperEndPoint.isEmpty()) {
 //                for (String endpoint : globusGateKeeperEndPoint) {
 //                    GlobusGKEndpointResource endpointResource = new GlobusGKEndpointResource();
-//                    endpointResource.setSubmissionID(resource.getSubmissionID());
+//                    endpointResource.setDeploymentId(resource.getDeploymentId());
 //                    endpointResource.setEndpoint(endpoint);
 //                    endpointResource.setGlobusJobSubmissionResource(resource);
 //                    endpointResource.save();
 //                }
 //            }
-//            return resource.getSubmissionID();
+//            return resource.getDeploymentId();
 //        } catch (Exception e) {
 //            logger.error("Error while saving Globus Job Submission...", e);
 //            throw new AppCatalogException(e);

http://git-wip-us.apache.org/repos/asf/airavata/blob/99fdd58a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/GSISSHPostJobCommand.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/GSISSHPostJobCommand.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/GSISSHPostJobCommand.java
deleted file mode 100644
index 86c78d9..0000000
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/GSISSHPostJobCommand.java
+++ /dev/null
@@ -1,73 +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.aiaravata.application.catalog.data.model;
-
-import java.io.Serializable;
-
-import javax.persistence.CascadeType;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.IdClass;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.Table;
-
-@Entity
-@Table(name = "GSISSH_POSTJOBCOMMAND")
-@IdClass(GSISSHPostJobCommandPK.class)
-public class GSISSHPostJobCommand implements Serializable {
-    @Id
-    @Column(name = "SUBMISSION_ID")
-    private String submissionID;
-    @Id
-    @Column(name = "COMMAND")
-    private String command;
-
-    @ManyToOne(cascade= CascadeType.MERGE)
-    @JoinColumn(name = "SUBMISSION_ID")
-    private GSISSHSubmission gsisshSubmission;
-
-    public String getSubmissionID() {
-        return submissionID;
-    }
-
-    public void setSubmissionID(String submissionID) {
-        this.submissionID = submissionID;
-    }
-
-    public String getCommand() {
-        return command;
-    }
-
-    public void setCommand(String command) {
-        this.command = command;
-    }
-
-    public GSISSHSubmission getGsisshSubmission() {
-        return gsisshSubmission;
-    }
-
-    public void setGsisshSubmission(GSISSHSubmission gsisshSubmission) {
-        this.gsisshSubmission = gsisshSubmission;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/99fdd58a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/GSISSHPostJobCommandPK.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/GSISSHPostJobCommandPK.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/GSISSHPostJobCommandPK.java
deleted file mode 100644
index 3dc1ed2..0000000
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/GSISSHPostJobCommandPK.java
+++ /dev/null
@@ -1,64 +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.aiaravata.application.catalog.data.model;
-
-import java.io.Serializable;
-
-public class GSISSHPostJobCommandPK implements Serializable {
-    private String submissionID;
-    private String command;
-
-    public GSISSHPostJobCommandPK(String submissionID, String command) {
-        this.submissionID = submissionID;
-        this.command = command;
-    }
-
-    public GSISSHPostJobCommandPK() {
-        ;
-    }
-
-    @Override
-    public boolean equals(Object o) {
-        return false;
-    }
-
-    @Override
-    public int hashCode() {
-        return 1;
-    }
-
-    public String getSubmissionID() {
-        return submissionID;
-    }
-
-    public void setSubmissionID(String submissionID) {
-        this.submissionID = submissionID;
-    }
-
-    public String getCommand() {
-        return command;
-    }
-
-    public void setCommand(String command) {
-        this.command = command;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/99fdd58a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/GSISSHPreJobCommand.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/GSISSHPreJobCommand.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/GSISSHPreJobCommand.java
deleted file mode 100644
index 06472af..0000000
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/GSISSHPreJobCommand.java
+++ /dev/null
@@ -1,73 +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.aiaravata.application.catalog.data.model;
-
-import java.io.Serializable;
-
-import javax.persistence.CascadeType;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.IdClass;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.Table;
-
-@Entity
-@Table(name = "GSISSH_PREJOBCOMMAND")
-@IdClass(GSISSHPreJobCommandPK.class)
-public class GSISSHPreJobCommand implements Serializable {
-    @Id
-    @Column(name = "SUBMISSION_ID")
-    private String submissionID;
-    @Id
-    @Column(name = "COMMAND")
-    private String command;
-
-    @ManyToOne(cascade= CascadeType.MERGE)
-    @JoinColumn(name = "SUBMISSION_ID")
-    private GSISSHSubmission gsisshSubmission;
-
-    public String getSubmissionID() {
-        return submissionID;
-    }
-
-    public void setSubmissionID(String submissionID) {
-        this.submissionID = submissionID;
-    }
-
-    public String getCommand() {
-        return command;
-    }
-
-    public void setCommand(String command) {
-        this.command = command;
-    }
-
-    public GSISSHSubmission getGsisshSubmission() {
-        return gsisshSubmission;
-    }
-
-    public void setGsisshSubmission(GSISSHSubmission gsisshSubmission) {
-        this.gsisshSubmission = gsisshSubmission;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/99fdd58a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/GSISSHPreJobCommandPK.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/GSISSHPreJobCommandPK.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/GSISSHPreJobCommandPK.java
deleted file mode 100644
index 5d62abc..0000000
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/GSISSHPreJobCommandPK.java
+++ /dev/null
@@ -1,64 +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.aiaravata.application.catalog.data.model;
-
-import java.io.Serializable;
-
-public class GSISSHPreJobCommandPK implements Serializable {
-    private String submissionID;
-    private String command;
-
-    public GSISSHPreJobCommandPK(String submissionID, String command) {
-        this.submissionID = submissionID;
-        this.command = command;
-    }
-
-    public GSISSHPreJobCommandPK() {
-        ;
-    }
-
-    @Override
-    public boolean equals(Object o) {
-        return false;
-    }
-
-    @Override
-    public int hashCode() {
-        return 1;
-    }
-
-    public String getSubmissionID() {
-        return submissionID;
-    }
-
-    public void setSubmissionID(String submissionID) {
-        this.submissionID = submissionID;
-    }
-
-    public String getCommand() {
-        return command;
-    }
-
-    public void setCommand(String command) {
-        this.command = command;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/99fdd58a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/PostJobCommand.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/PostJobCommand.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/PostJobCommand.java
new file mode 100644
index 0000000..7507583
--- /dev/null
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/PostJobCommand.java
@@ -0,0 +1,73 @@
+/*
+ *
+ * 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.aiaravata.application.catalog.data.model;
+
+import java.io.Serializable;
+
+import javax.persistence.CascadeType;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.IdClass;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.Table;
+
+@Entity
+@Table(name = "POST_JOBCOMMAND")
+@IdClass(PostJobCommandPK.class)
+public class PostJobCommand implements Serializable {
+    @Id
+    @Column(name = "APPDEPLOYMENT_ID")
+    private String deploymentId;
+    @Id
+    @Column(name = "COMMAND")
+    private String command;
+
+    @ManyToOne(cascade= CascadeType.MERGE)
+    @JoinColumn(name = "APPDEPLOYMENT_ID")
+    private ApplicationDeployment deployment;
+
+    public String getDeploymentId() {
+        return deploymentId;
+    }
+
+    public void setDeploymentId(String deploymentId) {
+        this.deploymentId = deploymentId;
+    }
+
+    public String getCommand() {
+        return command;
+    }
+
+    public void setCommand(String command) {
+        this.command = command;
+    }
+
+    public ApplicationDeployment getDeployment() {
+        return deployment;
+    }
+
+    public void setDeployment(ApplicationDeployment deployment) {
+        this.deployment = deployment;
+    }
+}