airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndo...@apache.org
Subject [01/23] airavata-php-gateway git commit: updating the thrift gen code and adding get_detailed_exp_tree method to ExperimentUtilities
Date Thu, 10 Dec 2015 16:50:14 GMT
Repository: airavata-php-gateway
Updated Branches:
  refs/heads/develop 93eb29d41 -> b3adcfe88


updating the thrift gen code and adding get_detailed_exp_tree method to ExperimentUtilities


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

Branch: refs/heads/develop
Commit: a80e2f25da61a1186326223ff185926bd07ca052
Parents: 4fa2e7f
Author: scnakandala <supun.nakandala@gmail.com>
Authored: Mon Nov 16 11:58:00 2015 -0500
Committer: scnakandala <supun.nakandala@gmail.com>
Committed: Mon Nov 16 11:58:00 2015 -0500

----------------------------------------------------------------------
 app/controllers/ExperimentController.php        |   2 +-
 app/libraries/Airavata/API/Airavata.php         | 433 +++++++++++++++++++
 .../Model/AppCatalog/ComputeResource/Types.php  |   2 +
 .../Airavata/Model/Experiment/Types.php         | 187 +++++---
 app/libraries/Airavata/Model/Task/Types.php     |  51 +++
 app/libraries/ExperimentUtilities.php           |  39 ++
 6 files changed, 645 insertions(+), 69 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/a80e2f25/app/controllers/ExperimentController.php
----------------------------------------------------------------------
diff --git a/app/controllers/ExperimentController.php b/app/controllers/ExperimentController.php
index 3ef331b..1e88d39 100755
--- a/app/controllers/ExperimentController.php
+++ b/app/controllers/ExperimentController.php
@@ -79,7 +79,7 @@ class ExperimentController extends BaseController
 
     public function summary()
     {
-        $experiment = ExperimentUtilities::get_experiment($_GET['expId']);
+        $experiment = ExperimentUtilities::get_detailed_experiment_tree($_GET['expId']);
         if ($experiment != null) {
             $project = ProjectUtilities::get_project($experiment->projectId);
             $expVal = ExperimentUtilities::get_experiment_values($experiment, $project);

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/a80e2f25/app/libraries/Airavata/API/Airavata.php
----------------------------------------------------------------------
diff --git a/app/libraries/Airavata/API/Airavata.php b/app/libraries/Airavata/API/Airavata.php
index edf5211..c3d3122 100644
--- a/app/libraries/Airavata/API/Airavata.php
+++ b/app/libraries/Airavata/API/Airavata.php
@@ -634,6 +634,64 @@ interface AiravataIf {
    */
   public function getExperiment(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId);
   /**
+   * Fetch the completed nested tree structue of previously created experiment metadata which
includes processes ->
+   * tasks -> jobs information.
+   * 
+   * @param airavataExperimentId
+   *    The identifier for the requested experiment. This is returned during the create experiment
step.
+   * 
+   * @return experimentMetada
+   *   This method will return the previously stored experiment metadata.
+   * 
+   * @throws org.apache.airavata.model.error.InvalidRequestException
+   *    For any incorrect forming of the request itself.
+   * 
+   * @throws org.apache.airavata.model.error.ExperimentNotFoundException
+   *    If the specified experiment is not previously created, then an Experiment Not Found
Exception is thrown.
+   * 
+   * @throws org.apache.airavata.model.error.AiravataClientException
+   *    The following list of exceptions are thrown which Airavata Client can take corrective
actions to resolve:
+   * 
+   *      UNKNOWN_GATEWAY_ID - If a Gateway is not registered with Airavata as a one time
administrative
+   *         step, then Airavata Registry will not have a provenance area setup. The client
has to follow
+   *         gateway registration steps and retry this request.
+   * 
+   *      AUTHENTICATION_FAILURE - How Authentication will be implemented is yet to be determined.
+   *         For now this is a place holder.
+   * 
+   *      INVALID_AUTHORIZATION - This will throw an authorization exception. When a more
robust security hand-shake
+   *         is implemented, the authorization will be more substantial.
+   * 
+   * @throws org.apache.airavata.model.error.AiravataSystemException
+   *    This exception will be thrown for any Airavata Server side issues and if the problem
cannot be corrected by the client
+   *       rather an Airavata Administrator will be notified to take corrective action.
+   * 
+   * 
+   * @param \Airavata\Model\Security\AuthzToken $authzToken
+   * @param string $airavataExperimentId
+   * @return \Airavata\Model\Experiment\ExperimentModel A structure holding the experiment
metadata and its child models.
+   * 
+   * userName:
+   *   The user name of the targeted gateway end user on whose behalf the experiment is being
created.
+   *     the associated gateway identity can only be inferred from the security hand-shake
so as to avoid
+   *     authorized Airavata Clients mimicking an unauthorized request. If a gateway is not
registered with
+   *     Airavata, an authorization exception is thrown.
+   * 
+   * experimentName:
+   *   The name of the experiment as defined by the user. The name need not be unique as
uniqueness is enforced
+   *      by the generated experiment id.
+   * 
+   * experimentDescription:
+   *    The verbose description of the experiment. This is an optional parameter.
+   * 
+   * @throws \Airavata\API\Error\InvalidRequestException
+   * @throws \Airavata\API\Error\ExperimentNotFoundException
+   * @throws \Airavata\API\Error\AiravataClientException
+   * @throws \Airavata\API\Error\AiravataSystemException
+   * @throws \Airavata\API\Error\AuthorizationException
+   */
+  public function getDetailedExperimentTree(\Airavata\Model\Security\AuthzToken $authzToken,
$airavataExperimentId);
+  /**
    * Configure a previously created experiment with required inputs, scheduling and other
quality of service
    *   parameters. This method only updates the experiment object within the registry. The
experiment has to be launched
    *   to make it actionable by the server.
@@ -4536,6 +4594,73 @@ class AiravataClient implements \Airavata\API\AiravataIf {
     throw new \Exception("getExperiment failed: unknown result");
   }
 
+  public function getDetailedExperimentTree(\Airavata\Model\Security\AuthzToken $authzToken,
$airavataExperimentId)
+  {
+    $this->send_getDetailedExperimentTree($authzToken, $airavataExperimentId);
+    return $this->recv_getDetailedExperimentTree();
+  }
+
+  public function send_getDetailedExperimentTree(\Airavata\Model\Security\AuthzToken $authzToken,
$airavataExperimentId)
+  {
+    $args = new \Airavata\API\Airavata_getDetailedExperimentTree_args();
+    $args->authzToken = $authzToken;
+    $args->airavataExperimentId = $airavataExperimentId;
+    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'getDetailedExperimentTree', TMessageType::CALL,
$args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('getDetailedExperimentTree', TMessageType::CALL,
$this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_getDetailedExperimentTree()
+  {
+    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_getDetailedExperimentTree_result',
$this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
+
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new \Airavata\API\Airavata_getDetailedExperimentTree_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->success !== null) {
+      return $result->success;
+    }
+    if ($result->ire !== null) {
+      throw $result->ire;
+    }
+    if ($result->enf !== null) {
+      throw $result->enf;
+    }
+    if ($result->ace !== null) {
+      throw $result->ace;
+    }
+    if ($result->ase !== null) {
+      throw $result->ase;
+    }
+    if ($result->ae !== null) {
+      throw $result->ae;
+    }
+    throw new \Exception("getDetailedExperimentTree failed: unknown result");
+  }
+
   public function updateExperiment(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId,
\Airavata\Model\Experiment\ExperimentModel $experiment)
   {
     $this->send_updateExperiment($authzToken, $airavataExperimentId, $experiment);
@@ -20265,6 +20390,314 @@ class Airavata_getExperiment_result {
 
 }
 
+class Airavata_getDetailedExperimentTree_args {
+  static $_TSPEC;
+
+  /**
+   * @var \Airavata\Model\Security\AuthzToken
+   */
+  public $authzToken = null;
+  /**
+   * @var string
+   */
+  public $airavataExperimentId = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'authzToken',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\Model\Security\AuthzToken',
+          ),
+        2 => array(
+          'var' => 'airavataExperimentId',
+          'type' => TType::STRING,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['authzToken'])) {
+        $this->authzToken = $vals['authzToken'];
+      }
+      if (isset($vals['airavataExperimentId'])) {
+        $this->airavataExperimentId = $vals['airavataExperimentId'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Airavata_getDetailedExperimentTree_args';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->authzToken = new \Airavata\Model\Security\AuthzToken();
+            $xfer += $this->authzToken->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->airavataExperimentId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('Airavata_getDetailedExperimentTree_args');
+    if ($this->authzToken !== null) {
+      if (!is_object($this->authzToken)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('authzToken', TType::STRUCT, 1);
+      $xfer += $this->authzToken->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->airavataExperimentId !== null) {
+      $xfer += $output->writeFieldBegin('airavataExperimentId', TType::STRING, 2);
+      $xfer += $output->writeString($this->airavataExperimentId);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Airavata_getDetailedExperimentTree_result {
+  static $_TSPEC;
+
+  /**
+   * @var \Airavata\Model\Experiment\ExperimentModel
+   */
+  public $success = null;
+  /**
+   * @var \Airavata\API\Error\InvalidRequestException
+   */
+  public $ire = null;
+  /**
+   * @var \Airavata\API\Error\ExperimentNotFoundException
+   */
+  public $enf = null;
+  /**
+   * @var \Airavata\API\Error\AiravataClientException
+   */
+  public $ace = null;
+  /**
+   * @var \Airavata\API\Error\AiravataSystemException
+   */
+  public $ase = null;
+  /**
+   * @var \Airavata\API\Error\AuthorizationException
+   */
+  public $ae = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        0 => array(
+          'var' => 'success',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\Model\Experiment\ExperimentModel',
+          ),
+        1 => array(
+          'var' => 'ire',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\InvalidRequestException',
+          ),
+        2 => array(
+          'var' => 'enf',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\ExperimentNotFoundException',
+          ),
+        3 => array(
+          'var' => 'ace',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AiravataClientException',
+          ),
+        4 => array(
+          'var' => 'ase',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AiravataSystemException',
+          ),
+        5 => array(
+          'var' => 'ae',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AuthorizationException',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['success'])) {
+        $this->success = $vals['success'];
+      }
+      if (isset($vals['ire'])) {
+        $this->ire = $vals['ire'];
+      }
+      if (isset($vals['enf'])) {
+        $this->enf = $vals['enf'];
+      }
+      if (isset($vals['ace'])) {
+        $this->ace = $vals['ace'];
+      }
+      if (isset($vals['ase'])) {
+        $this->ase = $vals['ase'];
+      }
+      if (isset($vals['ae'])) {
+        $this->ae = $vals['ae'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Airavata_getDetailedExperimentTree_result';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 0:
+          if ($ftype == TType::STRUCT) {
+            $this->success = new \Airavata\Model\Experiment\ExperimentModel();
+            $xfer += $this->success->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->ire = new \Airavata\API\Error\InvalidRequestException();
+            $xfer += $this->ire->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRUCT) {
+            $this->enf = new \Airavata\API\Error\ExperimentNotFoundException();
+            $xfer += $this->enf->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRUCT) {
+            $this->ace = new \Airavata\API\Error\AiravataClientException();
+            $xfer += $this->ace->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 4:
+          if ($ftype == TType::STRUCT) {
+            $this->ase = new \Airavata\API\Error\AiravataSystemException();
+            $xfer += $this->ase->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 5:
+          if ($ftype == TType::STRUCT) {
+            $this->ae = new \Airavata\API\Error\AuthorizationException();
+            $xfer += $this->ae->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('Airavata_getDetailedExperimentTree_result');
+    if ($this->success !== null) {
+      if (!is_object($this->success)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
+      $xfer += $this->success->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ire !== null) {
+      $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
+      $xfer += $this->ire->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->enf !== null) {
+      $xfer += $output->writeFieldBegin('enf', TType::STRUCT, 2);
+      $xfer += $this->enf->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ace !== null) {
+      $xfer += $output->writeFieldBegin('ace', TType::STRUCT, 3);
+      $xfer += $this->ace->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ase !== null) {
+      $xfer += $output->writeFieldBegin('ase', TType::STRUCT, 4);
+      $xfer += $this->ase->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ae !== null) {
+      $xfer += $output->writeFieldBegin('ae', TType::STRUCT, 5);
+      $xfer += $this->ae->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
 class Airavata_updateExperiment_args {
   static $_TSPEC;
 

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/a80e2f25/app/libraries/Airavata/Model/AppCatalog/ComputeResource/Types.php
----------------------------------------------------------------------
diff --git a/app/libraries/Airavata/Model/AppCatalog/ComputeResource/Types.php b/app/libraries/Airavata/Model/AppCatalog/ComputeResource/Types.php
index ce752e3..e2d2461 100644
--- a/app/libraries/Airavata/Model/AppCatalog/ComputeResource/Types.php
+++ b/app/libraries/Airavata/Model/AppCatalog/ComputeResource/Types.php
@@ -177,6 +177,7 @@ final class JobSubmissionProtocol {
   const UNICORE = 3;
   const CLOUD = 4;
   const SSH_FORK = 5;
+  const LOCAL_FORK = 6;
   static public $__names = array(
     0 => 'LOCAL',
     1 => 'SSH',
@@ -184,6 +185,7 @@ final class JobSubmissionProtocol {
     3 => 'UNICORE',
     4 => 'CLOUD',
     5 => 'SSH_FORK',
+    6 => 'LOCAL_FORK',
   );
 }
 

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/a80e2f25/app/libraries/Airavata/Model/Experiment/Types.php
----------------------------------------------------------------------
diff --git a/app/libraries/Airavata/Model/Experiment/Types.php b/app/libraries/Airavata/Model/Experiment/Types.php
index fd56220..d01c0d0 100644
--- a/app/libraries/Airavata/Model/Experiment/Types.php
+++ b/app/libraries/Airavata/Model/Experiment/Types.php
@@ -355,6 +355,10 @@ class ExperimentModel {
    * @var \Airavata\Model\Commons\ErrorModel[]
    */
   public $errors = null;
+  /**
+   * @var \Airavata\Model\Process\ProcessModel[]
+   */
+  public $processes = null;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
@@ -448,6 +452,15 @@ class ExperimentModel {
             'class' => '\Airavata\Model\Commons\ErrorModel',
             ),
           ),
+        18 => array(
+          'var' => 'processes',
+          'type' => TType::LST,
+          'etype' => TType::STRUCT,
+          'elem' => array(
+            'type' => TType::STRUCT,
+            'class' => '\Airavata\Model\Process\ProcessModel',
+            ),
+          ),
         );
     }
     if (is_array($vals)) {
@@ -502,6 +515,9 @@ class ExperimentModel {
       if (isset($vals['errors'])) {
         $this->errors = $vals['errors'];
       }
+      if (isset($vals['processes'])) {
+        $this->processes = $vals['processes'];
+      }
     }
   }
 
@@ -688,6 +704,24 @@ class ExperimentModel {
             $xfer += $input->skip($ftype);
           }
           break;
+        case 18:
+          if ($ftype == TType::LST) {
+            $this->processes = array();
+            $_size24 = 0;
+            $_etype27 = 0;
+            $xfer += $input->readListBegin($_etype27, $_size24);
+            for ($_i28 = 0; $_i28 < $_size24; ++$_i28)
+            {
+              $elem29 = null;
+              $elem29 = new \Airavata\Model\Process\ProcessModel();
+              $xfer += $elem29->read($input);
+              $this->processes []= $elem29;
+            }
+            $xfer += $input->readListEnd();
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
         default:
           $xfer += $input->skip($ftype);
           break;
@@ -764,9 +798,9 @@ class ExperimentModel {
       {
         $output->writeListBegin(TType::STRING, count($this->emailAddresses));
         {
-          foreach ($this->emailAddresses as $iter24)
+          foreach ($this->emailAddresses as $iter30)
           {
-            $xfer += $output->writeString($iter24);
+            $xfer += $output->writeString($iter30);
           }
         }
         $output->writeListEnd();
@@ -789,9 +823,9 @@ class ExperimentModel {
       {
         $output->writeListBegin(TType::STRUCT, count($this->experimentInputs));
         {
-          foreach ($this->experimentInputs as $iter25)
+          foreach ($this->experimentInputs as $iter31)
           {
-            $xfer += $iter25->write($output);
+            $xfer += $iter31->write($output);
           }
         }
         $output->writeListEnd();
@@ -806,9 +840,9 @@ class ExperimentModel {
       {
         $output->writeListBegin(TType::STRUCT, count($this->experimentOutputs));
         {
-          foreach ($this->experimentOutputs as $iter26)
+          foreach ($this->experimentOutputs as $iter32)
           {
-            $xfer += $iter26->write($output);
+            $xfer += $iter32->write($output);
           }
         }
         $output->writeListEnd();
@@ -831,9 +865,26 @@ class ExperimentModel {
       {
         $output->writeListBegin(TType::STRUCT, count($this->errors));
         {
-          foreach ($this->errors as $iter27)
+          foreach ($this->errors as $iter33)
+          {
+            $xfer += $iter33->write($output);
+          }
+        }
+        $output->writeListEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->processes !== null) {
+      if (!is_array($this->processes)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('processes', TType::LST, 18);
+      {
+        $output->writeListBegin(TType::STRUCT, count($this->processes));
+        {
+          foreach ($this->processes as $iter34)
           {
-            $xfer += $iter27->write($output);
+            $xfer += $iter34->write($output);
           }
         }
         $output->writeListEnd();
@@ -1391,15 +1442,15 @@ class ExperimentStatistics {
         case 7:
           if ($ftype == TType::LST) {
             $this->allExperiments = array();
-            $_size28 = 0;
-            $_etype31 = 0;
-            $xfer += $input->readListBegin($_etype31, $_size28);
-            for ($_i32 = 0; $_i32 < $_size28; ++$_i32)
+            $_size35 = 0;
+            $_etype38 = 0;
+            $xfer += $input->readListBegin($_etype38, $_size35);
+            for ($_i39 = 0; $_i39 < $_size35; ++$_i39)
             {
-              $elem33 = null;
-              $elem33 = new \Airavata\Model\Experiment\ExperimentSummaryModel();
-              $xfer += $elem33->read($input);
-              $this->allExperiments []= $elem33;
+              $elem40 = null;
+              $elem40 = new \Airavata\Model\Experiment\ExperimentSummaryModel();
+              $xfer += $elem40->read($input);
+              $this->allExperiments []= $elem40;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -1409,15 +1460,15 @@ class ExperimentStatistics {
         case 8:
           if ($ftype == TType::LST) {
             $this->completedExperiments = array();
-            $_size34 = 0;
-            $_etype37 = 0;
-            $xfer += $input->readListBegin($_etype37, $_size34);
-            for ($_i38 = 0; $_i38 < $_size34; ++$_i38)
+            $_size41 = 0;
+            $_etype44 = 0;
+            $xfer += $input->readListBegin($_etype44, $_size41);
+            for ($_i45 = 0; $_i45 < $_size41; ++$_i45)
             {
-              $elem39 = null;
-              $elem39 = new \Airavata\Model\Experiment\ExperimentSummaryModel();
-              $xfer += $elem39->read($input);
-              $this->completedExperiments []= $elem39;
+              $elem46 = null;
+              $elem46 = new \Airavata\Model\Experiment\ExperimentSummaryModel();
+              $xfer += $elem46->read($input);
+              $this->completedExperiments []= $elem46;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -1427,15 +1478,15 @@ class ExperimentStatistics {
         case 9:
           if ($ftype == TType::LST) {
             $this->failedExperiments = array();
-            $_size40 = 0;
-            $_etype43 = 0;
-            $xfer += $input->readListBegin($_etype43, $_size40);
-            for ($_i44 = 0; $_i44 < $_size40; ++$_i44)
+            $_size47 = 0;
+            $_etype50 = 0;
+            $xfer += $input->readListBegin($_etype50, $_size47);
+            for ($_i51 = 0; $_i51 < $_size47; ++$_i51)
             {
-              $elem45 = null;
-              $elem45 = new \Airavata\Model\Experiment\ExperimentSummaryModel();
-              $xfer += $elem45->read($input);
-              $this->failedExperiments []= $elem45;
+              $elem52 = null;
+              $elem52 = new \Airavata\Model\Experiment\ExperimentSummaryModel();
+              $xfer += $elem52->read($input);
+              $this->failedExperiments []= $elem52;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -1445,15 +1496,15 @@ class ExperimentStatistics {
         case 10:
           if ($ftype == TType::LST) {
             $this->cancelledExperiments = array();
-            $_size46 = 0;
-            $_etype49 = 0;
-            $xfer += $input->readListBegin($_etype49, $_size46);
-            for ($_i50 = 0; $_i50 < $_size46; ++$_i50)
+            $_size53 = 0;
+            $_etype56 = 0;
+            $xfer += $input->readListBegin($_etype56, $_size53);
+            for ($_i57 = 0; $_i57 < $_size53; ++$_i57)
             {
-              $elem51 = null;
-              $elem51 = new \Airavata\Model\Experiment\ExperimentSummaryModel();
-              $xfer += $elem51->read($input);
-              $this->cancelledExperiments []= $elem51;
+              $elem58 = null;
+              $elem58 = new \Airavata\Model\Experiment\ExperimentSummaryModel();
+              $xfer += $elem58->read($input);
+              $this->cancelledExperiments []= $elem58;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -1463,15 +1514,15 @@ class ExperimentStatistics {
         case 11:
           if ($ftype == TType::LST) {
             $this->createdExperiments = array();
-            $_size52 = 0;
-            $_etype55 = 0;
-            $xfer += $input->readListBegin($_etype55, $_size52);
-            for ($_i56 = 0; $_i56 < $_size52; ++$_i56)
+            $_size59 = 0;
+            $_etype62 = 0;
+            $xfer += $input->readListBegin($_etype62, $_size59);
+            for ($_i63 = 0; $_i63 < $_size59; ++$_i63)
             {
-              $elem57 = null;
-              $elem57 = new \Airavata\Model\Experiment\ExperimentSummaryModel();
-              $xfer += $elem57->read($input);
-              $this->createdExperiments []= $elem57;
+              $elem64 = null;
+              $elem64 = new \Airavata\Model\Experiment\ExperimentSummaryModel();
+              $xfer += $elem64->read($input);
+              $this->createdExperiments []= $elem64;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -1481,15 +1532,15 @@ class ExperimentStatistics {
         case 12:
           if ($ftype == TType::LST) {
             $this->runningExperiments = array();
-            $_size58 = 0;
-            $_etype61 = 0;
-            $xfer += $input->readListBegin($_etype61, $_size58);
-            for ($_i62 = 0; $_i62 < $_size58; ++$_i62)
+            $_size65 = 0;
+            $_etype68 = 0;
+            $xfer += $input->readListBegin($_etype68, $_size65);
+            for ($_i69 = 0; $_i69 < $_size65; ++$_i69)
             {
-              $elem63 = null;
-              $elem63 = new \Airavata\Model\Experiment\ExperimentSummaryModel();
-              $xfer += $elem63->read($input);
-              $this->runningExperiments []= $elem63;
+              $elem70 = null;
+              $elem70 = new \Airavata\Model\Experiment\ExperimentSummaryModel();
+              $xfer += $elem70->read($input);
+              $this->runningExperiments []= $elem70;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -1547,9 +1598,9 @@ class ExperimentStatistics {
       {
         $output->writeListBegin(TType::STRUCT, count($this->allExperiments));
         {
-          foreach ($this->allExperiments as $iter64)
+          foreach ($this->allExperiments as $iter71)
           {
-            $xfer += $iter64->write($output);
+            $xfer += $iter71->write($output);
           }
         }
         $output->writeListEnd();
@@ -1564,9 +1615,9 @@ class ExperimentStatistics {
       {
         $output->writeListBegin(TType::STRUCT, count($this->completedExperiments));
         {
-          foreach ($this->completedExperiments as $iter65)
+          foreach ($this->completedExperiments as $iter72)
           {
-            $xfer += $iter65->write($output);
+            $xfer += $iter72->write($output);
           }
         }
         $output->writeListEnd();
@@ -1581,9 +1632,9 @@ class ExperimentStatistics {
       {
         $output->writeListBegin(TType::STRUCT, count($this->failedExperiments));
         {
-          foreach ($this->failedExperiments as $iter66)
+          foreach ($this->failedExperiments as $iter73)
           {
-            $xfer += $iter66->write($output);
+            $xfer += $iter73->write($output);
           }
         }
         $output->writeListEnd();
@@ -1598,9 +1649,9 @@ class ExperimentStatistics {
       {
         $output->writeListBegin(TType::STRUCT, count($this->cancelledExperiments));
         {
-          foreach ($this->cancelledExperiments as $iter67)
+          foreach ($this->cancelledExperiments as $iter74)
           {
-            $xfer += $iter67->write($output);
+            $xfer += $iter74->write($output);
           }
         }
         $output->writeListEnd();
@@ -1615,9 +1666,9 @@ class ExperimentStatistics {
       {
         $output->writeListBegin(TType::STRUCT, count($this->createdExperiments));
         {
-          foreach ($this->createdExperiments as $iter68)
+          foreach ($this->createdExperiments as $iter75)
           {
-            $xfer += $iter68->write($output);
+            $xfer += $iter75->write($output);
           }
         }
         $output->writeListEnd();
@@ -1632,9 +1683,9 @@ class ExperimentStatistics {
       {
         $output->writeListBegin(TType::STRUCT, count($this->runningExperiments));
         {
-          foreach ($this->runningExperiments as $iter69)
+          foreach ($this->runningExperiments as $iter76)
           {
-            $xfer += $iter69->write($output);
+            $xfer += $iter76->write($output);
           }
         }
         $output->writeListEnd();

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/a80e2f25/app/libraries/Airavata/Model/Task/Types.php
----------------------------------------------------------------------
diff --git a/app/libraries/Airavata/Model/Task/Types.php b/app/libraries/Airavata/Model/Task/Types.php
index 2e3f678..6d666f1 100644
--- a/app/libraries/Airavata/Model/Task/Types.php
+++ b/app/libraries/Airavata/Model/Task/Types.php
@@ -100,6 +100,10 @@ class TaskModel {
    * @var \Airavata\Model\Commons\ErrorModel
    */
   public $taskError = null;
+  /**
+   * @var \Airavata\Model\Job\JobModel[]
+   */
+  public $jobs = null;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
@@ -142,6 +146,15 @@ class TaskModel {
           'type' => TType::STRUCT,
           'class' => '\Airavata\Model\Commons\ErrorModel',
           ),
+        10 => array(
+          'var' => 'jobs',
+          'type' => TType::LST,
+          'etype' => TType::STRUCT,
+          'elem' => array(
+            'type' => TType::STRUCT,
+            'class' => '\Airavata\Model\Job\JobModel',
+            ),
+          ),
         );
     }
     if (is_array($vals)) {
@@ -172,6 +185,9 @@ class TaskModel {
       if (isset($vals['taskError'])) {
         $this->taskError = $vals['taskError'];
       }
+      if (isset($vals['jobs'])) {
+        $this->jobs = $vals['jobs'];
+      }
     }
   }
 
@@ -259,6 +275,24 @@ class TaskModel {
             $xfer += $input->skip($ftype);
           }
           break;
+        case 10:
+          if ($ftype == TType::LST) {
+            $this->jobs = array();
+            $_size0 = 0;
+            $_etype3 = 0;
+            $xfer += $input->readListBegin($_etype3, $_size0);
+            for ($_i4 = 0; $_i4 < $_size0; ++$_i4)
+            {
+              $elem5 = null;
+              $elem5 = new \Airavata\Model\Job\JobModel();
+              $xfer += $elem5->read($input);
+              $this->jobs []= $elem5;
+            }
+            $xfer += $input->readListEnd();
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
         default:
           $xfer += $input->skip($ftype);
           break;
@@ -323,6 +357,23 @@ class TaskModel {
       $xfer += $this->taskError->write($output);
       $xfer += $output->writeFieldEnd();
     }
+    if ($this->jobs !== null) {
+      if (!is_array($this->jobs)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('jobs', TType::LST, 10);
+      {
+        $output->writeListBegin(TType::STRUCT, count($this->jobs));
+        {
+          foreach ($this->jobs as $iter6)
+          {
+            $xfer += $iter6->write($output);
+          }
+        }
+        $output->writeListEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
     $xfer += $output->writeFieldStop();
     $xfer += $output->writeStructEnd();
     return $xfer;

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/a80e2f25/app/libraries/ExperimentUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/ExperimentUtilities.php b/app/libraries/ExperimentUtilities.php
index b9f8bfd..0d6c960 100644
--- a/app/libraries/ExperimentUtilities.php
+++ b/app/libraries/ExperimentUtilities.php
@@ -127,6 +127,45 @@ class ExperimentUtilities
     }
 
     /**
+     * Get the experiment tree including all nested structures such as proesses, jobs, tasks
etc
+     * @param $expId
+     * @return null
+     */
+    public static function get_detailed_experiment_tree($expId)
+    {
+
+        try {
+            return Airavata::getDetailedExperimentTree(Session::get('authz-token'), $expId);
+        } catch (InvalidRequestException $ire) {
+            CommonUtilities::print_error_message('<p>There was a problem getting the
experiment.
+            Please try again later or submit a bug report using the link in the Help menu.</p>'
.
+                '<p>InvalidRequestException: ' . $ire->getMessage() . '</p>');
+        } catch (ExperimentNotFoundException $enf) {
+            CommonUtilities::print_error_message('<p>There was a problem getting the
experiment.
+            Please try again later or submit a bug report using the link in the Help menu.</p>'
.
+                '<p>ExperimentNotFoundException: ' . $enf->getMessage() . '</p>');
+        } catch (AiravataClientException $ace) {
+            CommonUtilities::print_error_message('<p>There was a problem getting the
experiment.
+            Please try again later or submit a bug report using the link in the Help menu.</p>'
.
+                '<p>AiravataClientException: ' . $ace->getMessage() . '</p>');
+        } catch (AiravataSystemException $ase) {
+            CommonUtilities::print_error_message('<p>There was a problem getting the
experiment.
+            Please try again later or submit a bug report using the link in the Help menu.</p>'
.
+                '<p>AiravataSystemException: ' . $ase->getMessage() . '</p>');
+        } catch (TTransportException $tte) {
+            CommonUtilities::print_error_message('<p>There was a problem getting the
experiment.
+            Please try again later or submit a bug report using the link in the Help menu.</p>'
.
+                '<p>TTransportException: ' . $tte->getMessage() . '</p>');
+        } catch (Exception $e) {
+            CommonUtilities::print_error_message('<p>There was a problem getting the
experiment.
+            Please try again later or submit a bug report using the link in the Help menu.</p>'
.
+                '<p>Exception: ' . $e->getMessage() . '</p>');
+        }
+
+    }
+
+
+    /**
      * Create and configure a new Experiment
      * @return Experiment
      */


Mime
View raw message