11.1 About the ECMA Expression Builder

Workflow Builder incorporates an ECMAScript interpreter and expression editor, which allows you create script expressions that refer to and modify workflow data. For example, you can use scripting to:

  • Create new data items needed in a workflow under the flowdata element.

  • Perform basic string, date, math, relational, concatenation, and logical operations on data.

  • Use expressions for runtime control to:

    • Modify or override form field labels.

    • Initialize form field data.

    • Customize email addresses and content.

    • Evaluate any past activity data to conditionally follow a workflow path by using the Condition activity.

    • Write different log messages that are conditionally triggered by using a single Log activity.

NOTE:To define expressions for a workflow, you need to understand how workflow activities are configured. For details on configuring workflow activities, see Section 10.0, Workflow Activity Reference.

11.1.1 About ECMAScript

ECMAScript is an object-oriented scripting language for manipulating objects in a host environment (in this case, Workflow Builder). ECMAScript (ECMA-262 and ISO/IEC 16262) is the standards-based scripting language underpinning both JavaScript (Netscape) and JScript (Microsoft). It is designed to complement and extend existing functionality in a host environment such as Workflow Builder’s graphical user interface. As a host environment, Workflow Builder provides ECMAScript access to various objects for processing. ECMAScript in turn provides a Java-like language that can operate on those objects.

The extensibility of ECMAScript, and its powerful string-handling tools (including regular expressions), make it an ideal language to extend the functionality of Workflow Builder.

NOTE:You can find detailed information about ECMAScript at the European Computer Manufacturers Association (ECMA) Web site.

11.1.2 Using the ECMA Expression Builder

Workflow Builder provides access to ECMAScript in various places. You can access the expression builder in the Properties view such as the Condition Expression property for a Condition activity or under the Data Items tab of an approval activity in the workflow. Click the edit icon to display the ECMA Expression Builder.

11.1.3 About Global Configuration Values Integration

Global configuration values (GCVs) are integrated with the workflow process through the ECMA expression builder. You can add a GCV using the Advanced option in the Settings page. For more information, see Configure Advanced Settings.

To access a GCV through the ECMA expression builder, select any GCV from the GCV list. These GCVs are available to you in all activities on the workflow.