Server script editor¶
This section describes the functions of the server script editor. If you want to know how to use it, see the section Adding scripts to nodes.
Script editor toolbar¶
SaveAfter changing the source code, this button will save the changes and the code will be executed.
PrintOpens the Print dialog.
UndoUndo the last action.
RedoRedo the last undone action.
CopyCopy a marked text (and save it to the clipboard).
CutCut a marked text (and save it to the clipboard).
PastePaste the text from the clipboard.
Find and ReplaceOpens the following window to find character strings and/or replace them with other character strings.
Go to lineOpens the following window to jump to a desired line in the source code:
Decrease indentDecreases the indent for a line.
Increase indentIncreases the indent for a line.
Wrap wordsEnables the automatic word wrap.
Show line numbersShows the line numbers on the left side of the script.
Highlight current lineHighlights the currently selected line.
Show blanks and tabsShows all blanks and tabs in the script.
Show matching parentheses.Highlights matching parentheses.
Show warningsOpens a window at the bottom of the editor that shows script errors and warnings.
Edit metadataClicking this button will open the edit medatata dialog.
Script priority – The priority of script execution from 1 (lowest priority) to 10 (highest priority). If Default is set, the priority depends on the script type:
Alarming (prevention and modification scripts): 11 (highest priority)
WebAccess (login and logout scripts): 11 (highest priority)
Script library scripts: Priority is specified by the server
Script owner – The owner of the script, i.e. the user that created the script. If the script is created by an anonymous session, no owner is defined in the metadata. In this case, the system ("root") is considered as script owner.
Script runcontext – Defines in which context, either "caller" (default) or "owner", the script is executed.
Ignored by switchover – Only for redundant systems.
Trigger on passive server – Only for redundant systems.
Trigger event when called – Only for webMI method scripts. Defines if an event is triggered when executing the script. This option is enabled by default when creating a new script.
Hint
The <fireevent> tag can be used to determine which of the webMI method scripts provided by atvise trigger an event when executed. To override the default behavior of atvise scripts, a script with the same name, necessary script parameters and appropriate metadata can be created under Library ‣ PROJECT ‣ webMI Method Scripts. This script then calls the atvise script using call("SYSTEM.LIBRARY.ATVISE.WEBMIMETHODS.<Script>"[, paramObject]).
Refer to access control - important notes for further information on script owner and runcontext.
Save and Terminate (all scripts except menu scripts)Clicking this button will save the script and then terminate all script instances running the previous script code. This can be used to terminate a script that runs in an endless loop.
Save and Run (menu scripts only)The last button on the toolbar is different for menu scripts. Clicking this button will save the script if it has been changed and the run it.