Decision Expression Examples

Example Data Objects

For the following examples, the process definition includes the following data objects:
Label
Data Type
Name
String data object
ProductId
String data object
Discount
Numeric data object
Cost
Numeric data object

Example 1: Comparing the Value of a Data Object to a String Constant

ProductId == "A123B"

Example 2: Comparing the Values of Multiple Data Objects to String Constants

(ProductId == "A123B") && (Name == "Smith")

Example 3: Comparing the Value of a Data Object to a Numeric Constant

Discount >= 5

Example 4: Comparing the Values of Two Different Data Objects

Cost == (Cost – Discount)

Example 5: Expression Using the Upcase Function

upcase(ProductID) == "A1235CC"

Example 6: Expression Using Data Object Substitution

This example uses the ${} syntax so that the complete path to the data object can be specified. (See Data Object Substitution.) This is useful if a local data object has the same name as a global data object that has been defined on the root process, and you want the decision gateway to use the global object. In this example, the decision gateway uses the data object Discount that is defined on the Main process.
${/Main/Discount} > 1000
Note: Data determination logic is supported to ensure backwards compatibility with previous versions of workflow. All data objects should be defined explicitly using the appropriate data type (Date , Numeric , Short Text , and so on). In subsequent releases, processing will honor only the specified data type and all support for real-time data type determination will be removed.