AutoSys Workload Automation

 View Only
  • 1.  Is there a way load an external javascript into a d-Series javascript?

    Posted Sep 16, 2014 12:29 PM

    The "load ("some_script.js")" works in a standalone Rhino install, but fails when run inside a dSeries javascript. Any ideas/pointers?

    Thanks!



  • 2.  Re: Is there a way load an external javascript into a d-Series javascript?

    Posted Sep 17, 2014 12:33 PM

    Did you use the 'Import Javascripts' function within the Services perspective?

    Import JS.PNG



  • 3.  Re: Is there a way load an external javascript into a d-Series javascript?

    Posted Sep 17, 2014 12:48 PM

    I did, but the problem is it says my javascript exeeds the allowed limit of 65,536 chars! (Yes, I admit its bigger than that)

    Let me re-phrase what I'm trying to do instead, which could hopefully help someone give me better pointers. I'm trying to call a webservice from inside a dSeries JS. I'm using ajax/jquery to accomplish it. The call works in the Rhino shell, because I can "load" these 2 external JS files required to do the web service call.

     

    env.rhino.1.2.js

    jquery-1.11.1.min.js

     

    I then do the web service call like this:

     

    var request = $.ajax({

            type: "GET",

            url: "http://some.url.com/some_service/services/product/version",

            headers: {

                Accept: "text/plain; charset=utf-8"

            }

        });

     

    I just cannot find a way to get it to work inside the DE JS runtime environment.