Clarity

 View Only
  • 1.  Hello world

    Posted Jan 12, 2016 03:56 PM

    I am looking for a CA PPM gel script hello world example that writes to an on demand file from

    within a custom process. Does anyone have something like that they can share?

     

    Thanks!!  - Joanne



  • 2.  Re: Hello world

    Posted Jan 13, 2016 12:30 AM

    Check this thread out

     

    GEL to output a txt file



  • 3.  Re: Hello world

    Posted Jan 14, 2016 10:47 AM

    I appreciate the reference, and I have seen that thread, but the issue for me is I am on demand, not

    on premise, so I cannot execute from a command prompt and I can't get any messages via gel:out.

    I have to write messages to log or to a text file and it has to be executed from a process.

     

    I'll post the code I have figured out.

     

    Thanks!  - Joanne



  • 4.  Re: Hello world
    Best Answer

    Posted Jan 14, 2016 10:48 AM

    I came up with this, and it works

     

    <gel:script

      xmlns:core="jelly:core"

      xmlns:util="jelly:util"

      xmlns:gel="jelly:com.niku.union.gel.GELTagLibrary"

      xmlns:file="jelly:com.niku.union.gel.FileTagLibrary">

     

      <!-- Set the path to the file share  -->

     

      <gel:parameter var="vFileName" default="/fs0/clarity1/share/Hello_World.txt"/>

     

     

      <!-- Create an output file named Hello_World.txt -->

      

      <file:writeFile fileName="${vFileName}" >

     

     

      <file:line>

      <file:column value="A row of data for the out put file"></file:column>

      </file:line>

          

      <!-- Close the output file -->

     

      </file:writeFile>

     

    </gel:script>