Top
Systemwalker Runbook Automation Studio User's Guide
Systemwalker

11.14 Defining JavaScript Expressions

In Systemwalker Runbook Automation Studio, JavaScript expressions are used with the following elements:

Several software controls are provided to help you build JavaScript expressions more effectively and easily. The following figure shows an example:

Figure 11.47 Defining JavaScript Expressions

Key:

Expression Mode Button

The Expression Mode Button allows you to switch between different expression modes. The character on the button shows the mode that is currently effective. The modes are:

Mode

Button

Description

Constant Mode

Used for simple constant (literal) JavaScript expressions. Examples of constants are 50 or AskVicePresident.

Variable Mode

Used for JavaScript expressions that consist of a User Defined Attribute (UDA) or Application Variables or both. When you switch to this mode, a list is displayed that allows you to select the UDA or the Application Variables.

Expression Mode

Used for complex JavaScript expressions. A complex JavaScript expression might be composed of UDAs, operators, JavaScript functions and constants.

The following is an example:

"Process started" + uda.get("Description")

With Expression Mode, you can type the JavaScript expression directly or build it using the Expression Builder.

Expression Builder Button

The Expression Builder Button opens a dialog that helps you build complex JavaScript expression.

Expression Field

The Expression Field displays the JavaScript expression that you specify.

Expression Builder

The Expression Builder helps you create more effective and viable JavaScript expressions in less time and with less chance for making time-consuming hard-to-find errors. You can select expression building blocks from lists and add operators by clicking them. This is an easier and faster method of building JavaScript expressions, especially if you are unfamiliar with JavaScript syntax. Also, the Expression Builder has a built-in verification function that checks the validity of JavaScript expressions you have built before they are used.

The following figure shows the Expression Builder.

Figure 11.48 Expression Builder

The Expression Builder consists of the following parts: