Clarity

  • 1.  How to read XBL file using gel script

    Broadcom Employee
    Posted Jun 26, 2018 10:13 PM

    Hi.

     

    Do you have any handy script to get CA PPM services status using XBL in Gel Script?

     

     

    Thanks

    Senthil



  • 2.  Re: How to read XBL file using gel script

    Posted Jun 27, 2018 07:32 AM

    Hi lakse01 , 

     

    I will suggest going through blog Exploit CA PPM XBLs and PMDs, this might be helpful.

     

    Regards, 

    Prashank Singh



  • 3.  Re: How to read XBL file using gel script

    Broadcom Employee
    Posted Jun 27, 2018 09:08 AM

    I tried calling XBL file in gel script to get the services. but it not working.

     

    Thanks

    Senthil



  • 4.  Re: How to read XBL file using gel script

    Posted Jun 27, 2018 08:59 PM

    So just guessing here (haven't tried it yet) but does your script look like this? 

     

    The services.xbl need the following variable:

     <xbl:variable name="host" value="{data/host/@value}"/>

     

    I think the value attribute needs to be the name of the host display via NSA.

     

    <gel:script xmlns:core="jelly:core" xmlns:gel="jelly:com.niku.union.gel.GELTagLibrary"  >
        <gel:parse var="inputDoc">
            <data>
                <host value='TheHostName' />
            </data>
        </gel:parse>
        <core:catch var="excp">
            <core:new className="com.niku.odf.object.xbl.XBLExecutor" var="xblInstance">
                <core:arg value="xbl\services.xbl"/>
                <core:arg value="nsa"/>
                <core:arg value="${inputDoc}"/>
            </core:new>
            <core:invoke method="executeXBL" on="${xblInstance}" var="responseDoc"/>
        </core:catch>
        <gel:log>Response Doc : <gel:expr select="$responseDoc"/> </gel:log>
        <gel:log>Exception: ${excp} </gel:log>
    </gel:script>

     

    V/r,

    Gene



  • 5.  Re: How to read XBL file using gel script

    Broadcom Employee
    Posted Jun 28, 2018 09:07 AM

    Hi Gene

     

    I tried this option also. but no luck.

     

     

    The process retrieves the information when I deploy the process and ran. but the same process won't retrieve the information after restarted the services.

     

     

    Thanks

    Senthil



  • 6.  Re: How to read XBL file using gel script

    Posted Jun 28, 2018 08:24 PM

    This is not a legitimate API call (calling XBLs from GEL isn't an action that would be supported).

     

    So I suspect if you find the script stops working after the system has been restarted, is because the XBL in question isn't yet in the CA PPM global memory cache on that server/node.  "Flush all caches" type operations could cause similar issues even without a restart.

     

    If that is the case, you will need to find a way to use the XBL via the UI (or on the bg service, more likely via an appropriate job or report that uses that XBL) in order to get it loaded into the cache first.

     

    This is not very robust however.