Skip to content
Richard Szolár edited this page Jan 29, 2020 · 7 revisions

Since this is a repo for a scoped app in Servicenow, there is not really a possibility to contribute to the code outside of a Servicenow instance. So if you have any suggestions please create an issue and we will discuss there.

So what is this all about?

Well, this is a scoped app, which contains a base for our experiment. There are some functions which are used to send and execute a script inside a NodeJS VM outside of a Servicenow instance.

You may ask what is this good for? Well, Servicenow still supports ES5 only, this little experiment may allow you to run ES6 code offsite of Servicenow, or use some functions which can not be used due to Java Rhino. For example running async code

Also it brings us a new opportunity. Writing and running NodeJS style code from the Servicenow instance. Seamlessly sending the script to the NodeJS vm, getting the results back is now a lot easier.

Like probably to you, it may have happened a lot of times, that you wanted to use an NPM package, but you can not install npm packages onto a Servicenow instance right? Well, if the package was maid that way, you could load it from a CDN and use it client side, download the minified lib, load it on Servicenow and run it from there. But that is ugly and hard to maintain, right?

Well, this solution will provide you a way to run NPM packages with ease.

If you have something that you would like to run, you have to install it previously on the node-exec docker instance, with yarn add [packagename] and then you can use it further in your scripts that you write on the Servicenow side.

If you want to give it a try, see the "Get started" article for more info on your right here.

License: See LICENSE

Give it a try and give me feedback!

Clone this wiki locally