RunScript
RunScript is a tool to run JavaScript scripts. It executes the JavaScript script that is provided in fileName.
Syntax
RunScript -script
fileName
Parameters
fileName is the file to run such as a WJS.
The script files, by convention, almost always have an extension of .wjs. The script files must be saved in UTF-8 format.
RunScript can be used to develop and test scripts that may eventually be part of one of the other DocOrigin applications. Or it may be used as a standalone application to carry out virtually any activity.
Since RunScript can invoke other applications via its _run object, it can be used to orchestrate business processes involving many steps. Note that RunScript can even invoke other instances of itself such that processing steps can be broken down into parts and then have a master script that runs each part, or runs each part conditionally. We find that technique particularly handy for running a suite of tests.
RunScript includes all of the DocOrigin features described below in Common DocOrigin Script Functions.