Clarity

  • 1.  How to get the output of a XOG read within a GEL script

    Posted Jul 01, 2014 12:15 PM


    I have a GEL script process where I am performing a XOG read of selected resources.  It all runs correctly and I can output the resulting write file to the log/screen OK.  What I am struggling with is getting that "resource write" output into a XML variable in memory (presumably via <gel:parse> ) which I can then add some extra data from another source to one of the nodes, using <gel:set> and XPATH.  The examples in the integration guide don't deal with the specific example of manipulating the write output unfortunately.

     

    Has anyone got any examples of this?



  • 2.  Re: How to get the output of a XOG read within a GEL script
    Best Answer

    Posted Jul 01, 2014 12:43 PM

    I think that the "GEL for Dummies.docx" contained in the Gel.zip file attached to the CA Clarity General Discussion - FAQs thread might have this sort of example?

     

    (its worth picking up those documents anyway in addition to the integration guide manual if you are playing with GEL)

     

    EDIT : the zip is also in the community documents ; here Gel.zip



  • 3.  Re: How to get the output of a XOG read within a GEL script

    Posted Jul 01, 2014 03:58 PM

    Confession time, I do have those documents but I only looked at one of them, and it was the other that had the line I was looking for...  Hopefully should be good to go with the manipulation part now, thanks Dave.



  • 4.  Re: How to get the output of a XOG read within a GEL script

    Posted Jul 01, 2014 04:01 PM

    gel parse is in memory.  If you want to see the output after parsing it, or after doing a gel:set, you will need to do something to convert it to a string for gel:out or gel:log. 

    Maybe something like:

    <gel:set asString="true" select="$gel_parse_variable" var="gel_parse_variable_str"/>



  • 5.  Re: How to get the output of a XOG read within a GEL script

    Posted Jul 01, 2014 04:10 PM

    I'm not worried about seeing the output on screen, just being able to manipulate it.

    The line that the document gives me is this:


    <!-- Read the output and extract some information from it -->

    <gel:set asString="true" select="$runresult/SOAP-ENV:Envelope/SOAP-ENV:Body/NikuDataBus/XOGOutput/Status/@state" var="XOGoutcome"/>


    As I'm concerned with doing something to the data within the resource write, I will change the select clause to:

    select="$runresult/SOAP-ENV:Envelope/SOAP-ENV:Body/NikuDataBus/Resources/Resource/Calendar/Days"


    Where I was going wrong was that I wasn't including the Soap nodes above, so the gel:set wasn't finding the data.