VMware Aria Automation Orchestrator

 View Only
  • 1.  Illegal Character Error in Schema Javascript

    Posted Mar 30, 2023 10:09 AM

    I added a "password" variable in Configuration and got Illegal Character error message when trying to save the script.

    The line with the error looks something like this:

    cmd = `Display ${password}`;

    I was told to put variable in a string, I need to use backtick. Does anyone know what's wrong with it?



  • 2.  RE: Illegal Character Error in Schema Javascript
    Best Answer

    Posted Mar 30, 2023 08:14 PM

    Hello ,

    I tried your approach in the Node.js runtime environment and it works perfect, backticks are here not a problem.

    StefanSchnell_0-1680206244659.png

    Do you use the Node.js runtime environment too? If you use the JavaScript runtime environment, which bases on the Rhino engine 1.7 R4, backticks doesn't work.

    StefanSchnell_1-1680206477065.png

    The current release of Rhino supports backticks, but the concatenation of strings and variables is different.

    StefanSchnell_2-1680207220537.png

    Hope it helps.

    Best regards
    Stefan

     



  • 3.  RE: Illegal Character Error in Schema Javascript

    Posted Mar 31, 2023 06:21 AM

     Thanks for your reply. I'm using JavaScript.

    Looks like mine is Rhino engine 1.7 R4. But where can I verify? And how can I upgrade it?



  • 4.  RE: Illegal Character Error in Schema Javascript

    Posted Mar 31, 2023 06:45 AM

    Hello ,

    you can get the version of the Rhino engine with the approach Easier Way to Detect Rhino Engine Version. For this it is however necessary to allow access to Java classes, in this case org.mozilla.javascript.*.

    As far as I know is the Rhino engine fixed part of the appliance and can not be upgraded.

    Best regards
    Stefan



  • 5.  RE: Illegal Character Error in Schema Javascript

    Posted Mar 31, 2023 07:48 AM

     Thank you so much!