Clarity

  • 1.  Process parameters via Command Prompt

    Posted Sep 24, 2012 09:16 AM
    Hello Everyone,

    I have the Custom Gel script and want to schedule it outside of clarity and need rto call it using the Batch file and we don't want to hard code the username and password inside the gel script so I am trying to pass the xog username and password as gel script parameters from command prompt using -Dusername="user1" where username is the variable in the gel script.( <gel:parameter var="username"/> ).But unfortunately it is not working and username is passing as empty.please help me in passing parameters to the GEL script throgh command prompt.


    Thanks in Advance,
    Karthik


  • 2.  RE: Process parameters via Command Prompt
    Best Answer

    Posted Sep 24, 2012 09:21 AM
    Don't use the 'D' which is for passing Java parameters/arguments.
    <gel:script 
    xmlns:gel="jelly:com.niku.union.gel.GELTagLibrary"
    >
    <gel:parameter var="from_cmd_line" default="not set" />
    <gel:out>Parameter set from cmd line: ${from_cmd_line}</gel:out>
    </gel:script>
    C:\ProjectX>\Clarity\12.1.3\bin\gel -script cmd_line.gel
    Parameter set from cmd line: not set

    C:\ProjectX>\Clarity\12.1.3\bin\gel -script cmd_line.gel -from_cmd_line=qwerty

    Parameter set from cmd line: qwerty

    C:\ProjectX>


  • 3.  RE: Process parameters via Command Prompt

    Posted Sep 24, 2012 09:27 AM
    Thanks a lot Nikc.It worked like a charm!!!!

    Thanks Again,
    Karthik