|
DOCUMENTS 5 - PortalScripting API
|
This class allows asynchronous calling a script from another script. More...
Public Member Functions | |
| boolean | addParameter (String name, String value) |
| Add a parameter to the called script. More... | |
| string [] | getEnumval () |
| Get the return enumval value of the called script. More... | |
| String | getLastError () |
| Get the description of the last error that occurred. More... | |
| String | getReturnValue () |
| Get the return value of the called script. More... | |
| boolean | isFinished () |
| Check whether the script call was finished. More... | |
| boolean | isRunning () |
| Check whether the script call is actually running. More... | |
| boolean | launch () |
| Launch the script call. More... | |
| ScriptCall | ScriptCall (Var systemUser, String scriptName, boolean waitable) |
| Create a new ScriptCall object. More... | |
| boolean | setDocFile (DocFile docFile) |
| Set the execution context file of the called script. More... | |
| boolean | setDocument (Document doc) |
| Set the execution context document of the called script. More... | |
| boolean | setEvent (String scriptEvent) |
| Set the execution context event of the called script. More... | |
| boolean | setFolder (Folder folder) |
| Set the execution context folder of the called script. More... | |
| boolean | setRegister (Register register) |
| Set the execution context register of the called script. More... | |
| boolean | setRunAsEnumScript (boolean runAsEnumScript) |
| Let the called script run as an enumeration script. More... | |
| boolean | waitForFinish () |
| Wait for the script call to finish. More... | |
This class allows asynchronous calling a script from another script.
You should deliberate whether a script call can be waitable or not. Only waitable script calls can be managed e.g. waiting for a script call to finish or checking whether a call is still running.
| ScriptCall ScriptCall::ScriptCall | ( | Var | systemUser, |
| String | scriptName, | ||
| boolean | waitable | ||
| ) |
Create a new ScriptCall object.
The following properties of the execution context of the called script are carried over from the execution context of the script where this ScriptCall object is created:
You can change these context properties with the available set-methods.
| systemUser | The system user who triggers execution of the called script and can be specified as follows:
|
| scriptName | String with the name of the called script. |
| waitable | boolean flag indicating whether this script call is waitable. |
| boolean ScriptCall::addParameter | ( | String | name, |
| String | value | ||
| ) |
Add a parameter to the called script.
| name | String value containing the parameter name. |
| value | String value containing the parameter value. |
true if successful, false in case of any error | string [] ScriptCall::getEnumval | ( | ) |
Get the return enumval value of the called script.
| String ScriptCall::getLastError | ( | ) |
Get the description of the last error that occurred.
| String ScriptCall::getReturnValue | ( | ) |
Get the return value of the called script.
| boolean ScriptCall::isFinished | ( | ) |
Check whether the script call was finished.
true if the script call is finished, otherwise false | boolean ScriptCall::isRunning | ( | ) |
Check whether the script call is actually running.
Actually running means, that the script will be executed at this moment (other states are new or queued)
true if the script call is running, otherwise false | boolean ScriptCall::launch | ( | ) |
Launch the script call.
In case of successful launch the script will be executed in an own context.
true if successful, false in case of any error | boolean ScriptCall::setDocFile | ( | DocFile | docFile | ) |
Set the execution context file of the called script.
| docFile | DocFile object representing the desired execution context file. |
true if successful, false in case of any error | boolean ScriptCall::setDocument | ( | Document | doc | ) |
Set the execution context document of the called script.
| doc | Document object representing the desired execution context document. |
true if successful, false in case of any error | boolean ScriptCall::setEvent | ( | String | scriptEvent | ) |
Set the execution context event of the called script.
| scriptEvent | String value containing the desired script event of the execution context. |
true if successful, false in case of any error | boolean ScriptCall::setFolder | ( | Folder | folder | ) |
Set the execution context folder of the called script.
| folder | Folder object representing the desired execution context folder. |
true if successful, false in case of any error | boolean ScriptCall::setRegister | ( | Register | register | ) |
Set the execution context register of the called script.
| register | Register object representing the desired execution context register. |
true if successful, false in case of any error | boolean ScriptCall::setRunAsEnumScript | ( | boolean | runAsEnumScript | ) |
Let the called script run as an enumeration script.
The global parameter enumval is then available in the called script
| runAsEnumScript | boolean value. |
| boolean ScriptCall::waitForFinish | ( | ) |
Wait for the script call to finish.
true if successful, false in case of any error