This documentation supports the 21.02 version of BMC Helix Innovation Studio.To view an earlier version, select the version from the Product version menu.

Expression Editor


BMC Helix Innovation Studio provides an Expression Editor in the View designer, Process designer, and Rule designer that you can use to configure the data required for views, processes, and rules of an application. For example, you can provide an expression to configure the data of input map properties of a Call Activity in a Process designer.

For information about Expression editor in the View designer, see Creating-or-modifying-view-definitions.

For information about expressions, see Types-of-expressions-in-expression-editor.

Expression Editor in Process designer and Rule designer consists of the following sections:

  • Expression builder where you build the expression
  • Virtual keyboard
  • Context based dictionary UI from where you can pick an expression of a process variable, a keyword, and an activity result.

Data dictionary UI

The following table describes the nodes in the Data dictionary UI:

Dictionary node

Description

Expression

Process Variables

The process variables that you define in the process definition are available in the Expression Editor. This includes the process input parameters, output parameters, and local variables.

If a process variable is a record, and has associations, the associations are available in the Expression Editor which help to navigate to the associated records without using query.

To use a dynamic variable in a string, you can simply type the $variable name in the string and the value of the variable is inserted in the string at runtime.

For example:

“Hi $user, your ticket is created. The id is $ticketId. You can view the ticket details at $ticketLink.”

When you use any field, variable, or keyword within a string expression, it will be evaluated to the value at runtime. If you want to use the variable name and not its value in the expression, then add an escape character (\) to the expression.

For example, "$\{processContext.processVariableName}"

${processContext.<variable id or name>}

${processContext.task._associations.<association definition GUID>.nodeA/nodeB...}

Activities

The results of all the activities that have outputs are available in the Expression Editor. The results of all the activities are captured in the process context and you do not have to store an activity result by using the activity output mapping. You can use an expression to pass the activity result to other activities.

${activityResults.<activity GUID>.field}

General

The keywords such as Server URL, Current date, Current date and time, Current Groups, and so on are available in the Expression Editor.

$<keyword name>$

Errors

This node is available only if you have already defined an Error Boundary event earlier in the process.

You can use an expression to access the exception class and error number (for Java exception error), or error message (for business error) caught by the Error Boundary event.

${errors.<errorBoundaryEventGUID>.errorMessageOrClass}

Email Receive Event Fields

This node is available only when you are using the Email Receive Event in a rule.

The incoming mailbox attributes, such as mailbox name, email sent to, plain text body, and so on, are available in the Expression Editor.

"${ruleContext.mailSentTo} = \"helpdesk@calbro.com\" AND ( ${ruleContext.priority} = \"1\" OR ${ruleContext.priority} = \"2\" OR ${ruleContext.priority} =\"3\") AND ${ruleContext.plainTextBody} LIKE \"%sometextfrommailbody%"

Expression Editor examples

The following table illustrates Expression Editor examples:

Configuration using Expression Editor

Example

In Process designers and Rule designers, you can use regular expressions in a Qualification (condition).

In Rule Designers, you can configure expressions in Rule Qualification.
For example, the expression 'Created By' LIKE "%Mi%Jo%" matches with Michael Jordan, Mike Johnson, Micth Joe and so on.

In Process designers, you can use expressions in the following components:

  • Get Records By Query action
  • In the condition for Exclusive gateway
  • User Task Completion condition

In the Process designers, expressions can be used only with the LIKE operator.

The following characters are allowed in the expression:

  • %: Matches any string.
  • _ (Underscore): Matches any single character. For example, the expression 'Created By' LIKE "M_n" matches Man, Men.
  • []: Matches any given char. For example, 'Flag' LIKE [a-p] matches any char in given range a to p.

18_11_expression_editor.jpg

Configure an expression by using individual attributes from a JSON schema.

1811_Example of REST API attributes.png

Configure an expression by selecting the fields from the associated records.

Important: Only fields from one to one and one to many associations are supported.

Edit expression for recipients.png

Configure an expression by using fields in the configured incoming mailbox.

Email attributes in an expression editor.png

Configure condition using an activity result.

Configure condition using activity result.png

Configure the expression by using error details caught by the Error Boundary event.

Configure expression_error boundary event.png

Configure a condition to check if the security label for a record instance is updated.

When using SECURITYLABELCHNG() function in a process, add a record instance as a parameter. When using SECURITYLABELCHNG() function in a rule, you do not need any parameter.

Important: In Rule designer, the SECURITYLABELCHNG() function is supported only with Record Event trigger type. If you use SECURITYLABELCHNG() function with Timer Event or System Event trigger type, an error is generated while saving the rule.

For more information about configuring a condition to identify the changes in security label, see Identifying updates to the security label.

Using Process:

1808_Securitylblchng for process.png

Using Rule:

1808_Securitylblchng for rule.png

Configure a selection field.

Configure selection field.png

Server URL in user message.

Expression for server URL.png

Configure Start Process expression in a rule.

Process start expression.png

Symbols used in Expression Editor.

Expression editor symbols.png

Related topics

Defining-the-application-business-logic-through-processes

Types-of-expressions-in-expression-editor

Adding-rules-to-validate-data-or-trigger-events-in-a-process

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*