---
title: "Creating an Expression Rule"
slug: "creating-expression-rule"
description: "This document shows how to create and utilize an Expression Rule in Decisions. Expressions Rules allow users the ability to create a Defined Expression Entity for use as a step within a flow that has a Boolean Outcome. The document contains a tutorial on how to create an Expression Rule that evaluates Breaking Distances. "
updated: 2025-05-07T19:59:40Z
published: 2025-05-07T19:59:40Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://documentation.decisions.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Creating an Expression Rule

## Feature Deprecated

Starting in [v9.5](https://documentation.decisions.com/v99/docs/version-95x-release-notes) Expression Rules can no longer be created. Expression Rules created in prior versions will function normally. Users are encouraged to use [Formulas](https://documentation.decisions.com/docs/formulas) instead.

## Overview

An **Expression Rule** allows a user to create a Defined Expression Entity that can be used as a step for a Flow with a Boolean outcome. To create one, click on CREATE RULE in the Designer Project and pick **Create Expression** sub-menu. After the expression is created, locate it in the Flow designer Toolbox under **Integration > Expressions > [UserDefinedCategory] > [UserDefinedNameOfExpression].**

## Example

In this example, an Expression Rule will utilize a formula to calculate a vehicle's braking distance to the object. Then, a Flow will ask a user for the current speed and distance to the stop point. Next, it will tell the user if this distance is enough for the current speed to stop before the desired stop point. Below is a downloadable example .zip file that can be [imported](/v9/docs/importing-and-exporting-projects) into Decisions.

[Creating Expression Rule-07042020-042419.zip](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/Creating%20Expression%20Rule-07042020-042419.zip)

---

1. In a **Designer Project**, click CREATE RULE. Click CREATE, select **Expression**, and click **Expression**.  
![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/2024-06-27_14h06_58.png)
2. In the **E****xpression**window**,**enter an **Expression Name**to be the****name of the step in the Flow Designer.  
  
Enter an **Expression**and place variable values in square braces.  
  
Enter a **Step Category** that will define the subcategory that can be found under the Expressions category. Click SAVE to save and close the window.![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/2024-06-27_14h08_14.png)
3. Back in the Designer Project, select CREATE FLOW on the Global Action Bar.
4. Choose the **Flow** tile and provide a name, then select CREATE to open the Flow Designer.
5. In the Flow Designer, add a **Show Form**step from the FAVORITES section of the Toolbox between the **Start**and **End**steps. [Create a Form.](/v9/docs/create-forms)  
  
This example uses a Form designed with two number boxes to capture the distance and speed as values of the Double data type.

![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/2024-06-27_14h08_44.png)
6. After the Show Form step is added and the Form is configured, add the **Expression Rule Step [Braking Distance]** from **Integration > Expressions > Auto** category in the Toolbox.
7. Select the **Braking Distance** step and expand the INPUTS section.
8. Select the **Pick** button under **Distance** and choose the**Distance** output of the Form.
9. Select the **Pick** button under **Speed** and choose the**Speed** output of the Form.
10. This example uses two more simple Forms for the True and False path of the Expression Rule. One to indicate the brake distance is successful and the other to indicate a potential wreck.![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/2024-06-27_14h09_38.png)

---

## Debug

1. Click **Debug** on the top panel. Click START DEBUGGING.
2. When the debugger runs, enter "60" as the distance and "40" as the speed and click Calculate. The Form with "Possible Wreck"****will be displayed to****the user.
3. Select the **Braking Distance** step and choose **Execution 1,**and select ****View Input/Output Data**** from the menu to see how the inputs are evaluated**.**
4. Run the debugger again with the same speed but a longer distance. The Form with "Successful Breaking"****appears as a result.

---

## Feature Changes

| Description | Version | Release | Developer Task |
| --- | --- | --- | --- |
| Expression Rules have been deprecated. | [9.5](https://documentation.decisions.com/v99/docs/version-95x-release-notes) | November 2024 | [DT-042293] |

For further information on Rules, visit the [Decisions Forum](https://community.decisions.com/categories/Rules).
