Create If-Then-Else Statements
An If-Then-Else expression is a logical notation that evaluates a test statement. It executes a primary expression if the test is true and a secondary expression if the test is not true. You can also introduce additional test statements using the Add Else If button.
To create a decision with the If-Then-Else logic:
- Add a new decision element.
- In the if expression field, press Ctrl+Space to view a suggestion list. You can use any decision outputs, variables, functions, and keywords from the list to define expressions in if, then, and else fields. Use the FEEL syntax to define expressions. See Define Expressions with the Friendly Enough Expression Language (FEEL).
- If necessary, change the logical notations for then and else fields to create a nested logic. All fields have the expression notation selected by default. Click Change Value
and select a different notation from the available options for a particular field. Configure logic for the selected notation.
- Changes you make within the decision model are automatically saved and validated from time to time. Errors and warnings, if any, are displayed within the decision panel.
In the following example, the input value of temperature determines the output of the If-Then-Else decision:

Description of the illustration dmn-ifthenelse.png
The following example uses an additional test statement, precipitation > 50, through Else If to determine the final output: