Configure an Expression activity
Use the following procedure to configure an Expression activity to define a rule for performing operations on data.
-
Add an activity to the map.
By default, the Configuration tab is open in the properties panel of the activity.
- Change the default Name of the activity to something meaningful.
- On the Type list, select .
-
Click
for
Configuration.
The Expression dialog box is displayed.
-
On the
Target variable list, select a process or server variable.
The value resulting from the expression rule is held in this target variable.
- Optional. Enter a Description for the expression node.
-
Right-click on the rule editor and define an
Expression using the Process variables, Server variables, and/or functions
(Math,
Text, and
Date) as
needed. Add as many expressions as needed.
You can reuse the expression by copying and pasting it into another expression activity.
-
Be careful in using literal values in your expression. If a literal value includes a decimal point such as 123.45, the data type is double. If you try to assign this literal value to a variable defined as a decimal or in a calculation that expects a decimal, the compilation fails. Therefore, if you wish to use decimal values in your expression, you should create a variable of type Decimal and store the literal value in the variable.
-
When you use any variable such as document, folder, data object, or data backbone as the target variable in an expression and if you use the same variable as the input variable in the subsequent expression within the same activity, an error is displayed.
-
When you use Capture, data model or data backbone field as target variable in one expression and assigning same Capture, data model, or data backbone object as input in the subsequent expression, an error is displayed.
-
-
To validate the expression, click
Validate.
If the expression rule is invalid, an error message appears.
-
Optional. To ensure the results and format are as expected, click
Test.
The Test expression dialog box displays the variable values.
The Test option is not available in on-premise multi-tenant and Azure environments.
-
Click
Execute test.
The expression is executed, and the test result is displayed. You can change the variable values and retest the expression if needed.
Click Cancel if you do not want to test the expression.
- Click Add.
- Save or release the process map.
- Configure other properties for this activity. See Activity properties.