Script editor
Script view
In the main script view, the selected script version is visible. In the side panel, there are buttons that allow you to expand the script parameters, unit tests, and logs panels.
The script run button is located in the tab Parameters.

Script editing
Working on the script is possible thanks to the Monaco editor (the editor supports JavaScript).
Initially it works in read-only. To start working, click the Edit script located at the end of the navigation bar.

The instruction "how to write a service script" is in Scripts (scriptService) and ScriptCode best practices.
Variables in ScriptCode within block scope
The Eximee platform requires variables in ScriptCode to be declared within block scope.
Failure to declare a variable will cause a script error.
Parameters
Modifying parameters is also done in Monaco (the editor supports JSON notation).
On first entry to a non-empty script, parameters will be automatically deduced (if possible) from the script contents alone.
Below the editor there is a button allowing you to run the script with parameters provided in the section Test data.

Parameters filled in in the section Test data are not part of the script itself and will not be saved in that version!
Editing inputs/outputs
Here we can add or remove service script inputs/outputs.
Adding or removing an input will also update the runtime parameters, so after removing a parameter we will lose any mapping it may have at the attachment point.

Script result
An additional window appears at the bottom of the screen. There you can find all information about the executed script:
Script execution time given in ms.
Script execution logs in the form:
[OPERATION_TIME] [OPERATION_TYPE]: Operation textFor example:
[14:31:22,976] [GET_DATA]: Called getData("GesCustomComponent1","data") and resulted with data from ccThe result of invoking the script (in the log panel), i.e. all values defined as outputs during creation of the service script in the form KEY : VALUE.

Figure 5. Script result tab
Monaco editor (keyboard shortcuts)
The editor used in the project is a full-fledged code editor, so it offers many keyboard shortcuts that speed up daily work.
Navigation and search
F1
Display the list of all available editor commands and shortcuts.
Ctrl + F
Search for text in the current file.
Ctrl + H
Search and replace text.
Ctrl + Shift + O
Jump to a variable or function.
Ctrl + G
Jump to the specified line.
Code editing
Ctrl + Z
Undo the last change.
Ctrl + Y
Redo the undone change.
Ctrl + C
Copy the selected text.
Ctrl + V
Paste the copied text.
Ctrl + X
Cut the selected text or current line.
Ctrl + Shift + I
Format code. It is worth using this option after larger changes in the script.
Ctrl + Shift + K
Delete the current line.
Alt + ↑
Move the current line up one line.
Alt + ↓
Move the current line down one line.
Multiple cursors and simultaneous editing
The Monaco editor allows simultaneous editing of multiple places in the code. This feature is especially useful when modifying variable names, parameters, or repeated fragments of the script.
Alt + mouse click
Add an additional cursor at the selected location.
Ctrl + D
Select the next occurrence of the currently selected text and add a cursor.
Ctrl + Shift + L
Select all occurrences of the currently selected text and add cursors at all occurrence locations.
Ctrl + F2
Add a cursor at all occurrences of the current word or selection.
Ctrl + Shift + Alt + ↑ / ↓
Add a cursor on the line above or below the current cursor position.
Additional functions
Ctrl + P
Export the script document to a PDF file.
Tests
The editor allows defining test scenarios.
Errors during test execution
If the script contains errors, during test execution such an error will be logged in the console under the editor. The message will include the reason and the location in the code where the error occurred.

Last updated
Was this helpful?
