Running JavaScript on the MID server

In addition to running shell commands, the MID server can also run JavaScript, just like the instance. There are a couple of key differences, however:

  • The MID server does not have direct access to the database, and global variables (such as gs) are not defined. It also cannot access standard Script Includes.
  • Instead, access to Java packages is allowed, enabling you to access lower-level functions within the extensive Java libraries.
  • You can also add Java packages of your choice and distribute them from the instance.

Get ServiceNow: Building Powerful Workflows now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.