Import Script Libraries
You can import scripting code from JavaScript or Groovy files that are accessible from the local server using the
src attribute in the <script> statement. To use external code, you must deploy these scripts in the
MashZone NextGen Server. See
Deploying Groovy or JavaScript Scripts in
MashZone NextGen for more information on using external scripts.
For example:
<script type="text/javascript" src="myFunctions.js"
inputvariables="$order, $customer"
outputvariable="$scriptResult"/>
...
<script type="ruby" src="myRubyScript.rb"
inputvariables="$order, $customer"
outputvariable="$scriptResult"/>
The script has access to any variables that you pass in inputvariables. Order or input parameters is not important. The result of the script, if any, is placed in outputvariable.