3 Replies Latest reply on Feb 26, 2009 7:51 PM by Bill Robinson

    Finding References To Property Instances...


      I'm not sure which blcli command I should be using to do this, or if there's an easier way to go about it...


      I have a property instance that defines an application. I want to find other property instances in a different property class that reference my application property instance.


      What's the easiest way to do this?


      Thanks - Lee

        • 1. Re: Finding References To Property Instances...
          Bill Robinson

          so it's like a dependency - like 'what points here' ?

          • 2. Re: Finding References To Property Instances...

            Yeah so... as an example...


            I have a SERVER_ENV property class.

            Each instance of that class describes a server application environment (like maybe a java app server running on a Linux box... but the physical box might have multiple java app servers, each running different apps).


            So my instances might be named something like this...







            The SERVER_ENV class has a property of APPLICATION which is a reference to another property class describing applications.


            Now, I want to deploy code to my java appservers, but only the ones that are running a particular application, we'll call it SALES for the sake of argument.


            So I need to be able to read through the property values of all of my SERVER_ENV instances and find out which ones have the property APPLICATION set to a value of "SALES" and they will become the targets for my deploy job.


            Does that make sense?



            • 3. Re: Finding References To Property Instances...
              Bill Robinson

              you can probably use some combination of:


              PropertyClass.listAllInstanceNames Class://SystemObject/SERVER_ENV


              for each instance



              PropertyInstance.getFullyResolvedPropertyValue APPLICATION


              and then some conditionals to figure out what's what, then the blcli to make your job