Help ELMA BPM Platform
×
Menu

Creating Scripts


A process script can be created in a few ways:
Creating a process script in ELMA is similar for all the elements.
Let's consider an example of creating a Script. No script is selected in this box by default (fig. 1). To create a script, click the Add Script button. The box will look like in the fig. 3.
Fig. 3. Creating a script. Selecting a script
To create a new script, click Create. A dialog box for entering the script name will open (fig. 4). You can use letters, digits and the underscore in it. A script name must start with a letter.
Fig. 4. Entering a script name
By default, the script's name is generated automatically basing on the name of the element that calls the script. Depending on the script's conditions, one of the following templates is used:
·     <ElementName>OnViewLoad – template for naming a script executed when loading a form;
·     <ElementName>OnChange – template for naming a script executed when changing the name of the elements that calls the script;
·     <ElementName>ButtonOnClick –  template for naming a script executed when a button is pressed.
If the script is called by a block's property, then the script's name will also include its name: <BlockName><PropertyName>.
Below is the list of cases when the script's name is created only with the name of the element that calls the script:
·     in the Script activity;
·     when defining gateway conditions;
·     when calculating gateway variable;
·     when defining activity execution conditions;
·     when defining activity escalation condition;
The names of the scripts executed when interrumping a process instance are generated according to the name of the business process.
Also it is possible to enter the name of the script manually. You can use letters, numbers and the underscore symbol to name the script. Please note that the name must start with a letter.
 
After you click OK, the script editor (fig. 5) will open. If the script is being created in the settings of an activity, you need to click Go To.
Fig. 5. Script editor
To edit an existing script (fig. 3), select it in the list and click Go To. The created/selected script will be opened in the script editor (fig. 5).
Creating a script with the script builder
To create a script in the script builder, on the Scripts tab of a process page, hold Shift and right-click in any free space. In the appeared context menu, select Add a script using the builder (fig. 6).
Fig. 6. Process page. Scripts tab. Add a script using the builder button
You will see the Script builder for ELMA beta dialog box with information that the script builder is in the beta mode (fig. 7).
Fig. 7. Script builder for ELMA beta dialog box
To continue creating a script with the script builder, click Open Script Builder.
A dialog box for entering the script name will appear (fig. 4). After entering the name and clicking ОК the script builder will open.

Copyright © 2006–2019 ELMA