The include function loads JavaScript code that is defined in a file for use in the pre-execution or post-execution section of any operator or in the SourceCode section of the Run JavaScript operator. The loaded JavaScript code is only good for the duration of the pre-execution, post-execution or SourceCode section that it is loaded in.
Syntax
include(jsFile)
Arguments
This parameter must refer to a JavaScript file. This parameter can be an HTTP URL in which case the parameter must start with a file URL or it can be a path inside the c2ouserresources folder. The path must be relative to the ".c2ouserresources" folder itself. ".c2ouserresources" is present inside the .c2orepository folder in the CA Process Automation installation folder.
Return Value
No value returned (void).
Examples
The following example is an HTTP URL; the parameter starts with a file URL..
include('http://test.ca.com/test.js')
The following examples load the test file from a path relative to the .c2ouserresources folder.
include('file://c:/test.js')
Include('test.js')
|
Copyright © 2014 CA.
All rights reserved.
|
|