ESP dSeries Workload Automation

 View Only
  • 1.  SetVar function in Workload automation DE 12.2

    Posted Jul 06, 2020 10:44 AM
    Hi ,

    We are looking to set the variable using setVar function through a javascript as below
    setVar('TEST_JAVASCRIPT','','CHECKRC');

    here TEST_JAVASCRIPT is variable
    '' is empty string
    CHECKRC is context

    As per the documentation,it says

    value Defines the value of the global variable. 0-1024 charactersLimits: To specify an empty string, enter two single quotes ('').


    But i am trying to give the value as empty string suggested above it is throwing the below error.
    [Mon Jul 06 03:01:14 PDT 2020] [DEV_R12] - Error executing job-level runtime JavaScript script for job org.mozilla.javascript.WrappedException: Wrapped com.ca.wa.comp.library.script.WAScriptException: setVar: No value specified, please check the syntax. (<wascope>#1). The error is: {2}

    Can you help us to resolve this issue?

    Note: We have very recently upgraded from R11 to R12. In R11 the above Syntax is working,where as in R12 it shows above issue.

    ------------------------------
    Manoj Kumar
    ------------------------------


  • 2.  RE: SetVar function in Workload automation DE 12.2
    Best Answer

    Broadcom Employee
    Posted Jul 07, 2020 09:55 AM
    HI,
    You need to specify some value.  A value is needed for any variable even if you have a blank space.  The JavaScript engine error you are seeing is about null value.  So you can to put in a space between quotes like this and it should work.
       setVar('TEST_JAVASCRIPT',' ','CHECKRC');

    HTH,
    Nitin Pande


    ------------------------------
    Support
    Broadcom
    Toronto
    ------------------------------



  • 3.  RE: SetVar function in Workload automation DE 12.2

    Broadcom Employee
    Posted Jul 09, 2020 04:04 AM
    Hi,

    I think what Nitin suggests should work. However, as you have mentioned that it used to work fine in previous release. Can you please raise an issue for this.

    - Ravi Kiran


  • 4.  RE: SetVar function in Workload automation DE 12.2

    Posted Jul 09, 2020 08:34 AM
    Yeah its working with this.However ,in the previous version it was working and also in R12 CA doc it should work.

    But as @Ravi Kiran Kunduri said ,will raise an issue for this.Thanks a lot for your help.​

    ------------------------------
    Manoj Kumar
    ------------------------------