3 Replies Latest reply on Jul 16, 2013 10:12 AM by jayshaughnessy

    Cannot get the Package History in a content of deployment.

    guillo

      Hi.

       

      From a Java client. i'm trying to get the InstalledPackageHistory of a Deployment Resource, with this 2 lines:

       

      InstalledPackage pack = remoteClient.getContentManager().getBackingPackageForResource(subject, deployment.getId());

      List<InstalledPackageHistory> packageHistory = (List<InstalledPackageHistory>)pack.getPackageVersion().getInstalledPackageHistory();

       

       

      However, pack.getPackageVersion().getInstalledPackageHistory() always returns null.. The PackageHistory List is empty.

       

      The Deployment resource name is Test1 and the deployment.getId() returns the good id, so the pack variable is correctly instanciated, but with a empty PackageHistory.

       

      When I display the PackageHistory of this Deployment from JON interface, i can see many update of the package in the History List. Please refer to the attached .png.

       

       

      Why JON interface show the history list and the RHQ API getInstalledPackageHistory() show empty list ?

       

      The reason i'm trying this is beacuse i want to get the status of the package update upcoming after a call method ClientProxyMethodHandler.updateBackingContent(...)

       

      I want to be able to evaluate if the update of the package of the deployment resource was sucessful.

       

      Anyone have an idea ?

       

      thank you in advance.