Help ELMA BPM Platform
×
Menu

Script Syntax Check


The first step of script debugging is a syntax check. It is checked on the Scripts tab of a process page at the same time as the business process check. There are several types of syntax errors:
To run a script check manually, click Check in the toolbar of the process page (fig. 1).
You do not need to save or publish the process to check the scripts. When publishing a process, all its scripts are checked for syntax errors automatically. If syntax errors are found, publishing is interrupted. Thus, the system prevents publishing a process version, whose scripts contain syntax errors.
Fig. 1. Scripts tab of a process. Check button
The system will check the script for syntax errors. If there are no such errors, you will see a respective notification (fig. 2).
Fig. 2. Script check notification
If errors are found, you will see the Errors and Warnings panel at the bottom of the window (fig. 3). It lists all the errors found in the scripts, and warnings about possible errors. The table has five columns:
- error,
– warning.
Double-click on an error or a warning to go to the corresponding code line. After fixing the error, check the script again to make sure it is fixed.
You cannot publish a process, if its scripts contain errors. However, you can still publish a process if there are warnings on the Errors and Warning panel, but it is recommended that you check and fix them. A warning usually informs about a minor thing that could turn into an error unless taken care of.
Fig. 3. The Errors and Warnings panel
Note, that the syntax check does not check the scripts for errors, that cause the scripts to behave unexpectedly. This feature only checks whether the script can be executed.
Checking separate scripts
If you need to check separate process scripts, you can comment out the code fragments, which you do not need to check. It speeds up the script check. Before publishing the process, uncomment the code fragments. The commented code is neither checked nor executed.
ELMA supports C# scripts.
To comment out a text fragment in C#, use a forward slash and an asterisk like this: /* text */.
To comment a line, add two forward slashes at the beginning: // text.

Copyright © 2006–2019 ELMA