Help ELMA BPM Platform
×
Menu

Working in Script Builder

If you want to use Script Builder to create a script, take the following steps when adding a script. In the Script Builder for ELMA Beta dialogue box click Open Script Builder (Fig. 1). Then, type the script name in the Add Script dialogue box. Click OK (Fig. 2). To name a script you can use English letters, digits, and the underscore. A script name must start with a letter.
Fig. 1. Script Builder for ELMA Beta dialogue box
Fig. 2. Add Script dialogue box
The Script Builder interface opens (Fig. 3).
Fig. 3. Script Builder interface
To edit a script, created in the script builder, open the Scripts tab of a process page and double-click on the script. The script builder interface will open (fig. 3)
Scripts created in the script builder are marked with the icon.
You cannot open scripts created in the script editor in the script builder.

Add selection box

The Add selection box (Fig. 4) is the key element of Script Builder. It is used to add operations, variables, actions and to create objects.
Fig. 4. Add selection box
When you click on the Add selection box, a drop-down list opens. It offers all the available variables and/or operations (Fig. 5). This list may vary according to the operation, to which the Add box belongs. Left-click on a variable/operation to select it.
Fig. 5. Drop-down list of the Add selection box

Adding operations

You can add an operation directly to the work pane or inside of another operation.
Only the following operations can be added to the work pane: Assign Value, If, Repeat.
There are several ways to add an operation:
1. Drag-n-drop: grab the desired operation (by clicking and holding the left mouse button) and drag it to the selection box. When you drag the element, the selection box is highlighted yellow (Fig. 6).
Fig. 6. Script Builder interface. Drag-n-drop technique used to add an operation
2. The Add selection box. Click on the Add selection box and select the desired operation from the drop-down list (Fig. 7). The list of available operations varies depending on where you want to add the operation.
Fig. 7. Script Builder. Selecting an operation in the Add selection field
3. When you place the mouse pointer between operation blocks in the work pane, or inside of another operation, the pointer turns into the plus icon: . The selected space will be highlighted yellow (Fig. 8).
Fig. 8. Script Builder. Adding an operation between operation boxes
Left-click to open a drop-down list similar to the list in the Add selection box.

Deleting operations

There are two ways to delete an operation.
1. Right-click on the operation box and select the Delete option from the provided context menu (Fig. 9).
Fig. 9. Script Builder. Deleting an operation
 
2. Left-click to select the desired operation box and press Delete on your keyboard.

Working with variables

All the variables available for the current script are listed on the Variables tab on the side panel (Fig. 10).
Fig. 10. Script Builder. Side panel. Variables tab
The variables on this tab are divided into two groups:
In Script Builder you can create or delete the local variables only.
Creating a local variable
There are two ways to create a local variable:
In the provided window (Fig. 13), fill in the required fields and click Create.
Fig. 13. Script Builder. Creating a new variable
All the fields are required.
Deleting local variables
To delete a variable, select it in the Variables section of the side panel and click the Delete button located at the top of the Variables section.

Adding actions

You can add an action from ELMA into your script (e.g., comment a document or change a project stage).
To add such an action to the script, click on the Add selection box and select Add Action from the drop-down list (Fig. 14).
Fig. 14. Drop-down list of the Add selection box. Add Action option
You will see a list where actions are divided into groups (Fig. 15).
Fig. 15. Script Builder. Adding an activity
Select the group and then select the required action. The action wizard will open (Fig. 16);
Fig. 16. Script Builder. Action wizard
Fill in all the required fields. The fields and number of steps may vary according to the type of action you are adding. To go to the next step, click Next. To return to the previous step, click Back. To finish, click Create. The action will be added to the work pane of Script Builder (Fig. 17).
Fig. 17. Example of an action added to Script Builder

Creating objects

You can use a script to create a system object in ELMA.
For this, do the following:
The Create Object operation will be added to the work pane of Script Builder (Fig. 21).
Fig. 21. Create Object operation in Script Builder

Copyright © 2006–2019 ELMA