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

# Create a DMN Decision Table

In this section you'll learn how to create your first DMN decision table with the Camunda Modeler. The table contains decision logic about the desired dish for a given season and guest count.

Start up the Camunda Modeler to begin.

## Create a new decision diagram

Create a new DMN diagram by clicking **File > New File > DMN Diagram**.

<img src="https://mintcdn.com/aseeflow/nrz9o5m15i2WLCpp/get-started/dmn/img/modeler-new-dmn-table.png?fit=max&auto=format&n=nrz9o5m15i2WLCpp&q=85&s=d85bf6c55a8e1f62bd0371a0b4950ddc" alt="Create a new DMN diagram" width="1028" height="472" data-path="get-started/dmn/img/modeler-new-dmn-table.png" />

## Start with the table header

Select the decision and open the properties panel on the right side. Change the text to `dish` as the technical ID of the decision, which is used to reference the decision inside the process application.

<img src="https://mintcdn.com/aseeflow/nrz9o5m15i2WLCpp/get-started/dmn/img/modeler-step1.png?fit=max&auto=format&n=nrz9o5m15i2WLCpp&q=85&s=12cf4260811c28a84ea180ec5accf18d" alt="Set the decision id" width="1132" height="496" data-path="get-started/dmn/img/modeler-step1.png" />

Next, set the name of the decision to *Dish* in the field below.

Click the table icon on top of the decision to drill down into the decision table.

<img src="https://mintcdn.com/aseeflow/nrz9o5m15i2WLCpp/get-started/dmn/img/modeler-step2a.png?fit=max&auto=format&n=nrz9o5m15i2WLCpp&q=85&s=0f9bf1d4b1d5a32e6bd48b14da08ceeb" alt="Drill down into the decision table" width="1132" height="552" data-path="get-started/dmn/img/modeler-step2a.png" />

Set the input label to *Season* by double-clicking the field under *When*. Similarly, set the output label to *Dish* by double-clicking the field under *Then*.

<img src="https://mintcdn.com/aseeflow/nrz9o5m15i2WLCpp/get-started/dmn/img/modeler-step2b.png?fit=max&auto=format&n=nrz9o5m15i2WLCpp&q=85&s=5a6cad9cda0eaeb5b3274fa05a29ce31" alt="Set the input and output labels" width="1132" height="639" data-path="get-started/dmn/img/modeler-step2b.png" />

## Configure the input expression and the output name

Assuming the input value for *Season* comes from a variable named `season`, set the input expression to `season`.

Double-click the *Season* field and enter `season` as the expression in the modal menu.

<img src="https://mintcdn.com/aseeflow/nrz9o5m15i2WLCpp/get-started/dmn/img/modeler-step3.png?fit=max&auto=format&n=nrz9o5m15i2WLCpp&q=85&s=a524c0e15e1af1033b14ffbced829f86" alt="Configure the input expression" width="1132" height="639" data-path="get-started/dmn/img/modeler-step3.png" />

Next, double-click the *Dish* field and set `desiredDish` as the output name.

## Configure the type of the input and output

If the input value for *Season* is provided as a string, set the input type to `string`.

Double-click the *Season* column header. Open the *Type* dropdown and select `string`.

<img src="https://mintcdn.com/aseeflow/nrz9o5m15i2WLCpp/get-started/dmn/img/modeler-step4.png?fit=max&auto=format&n=nrz9o5m15i2WLCpp&q=85&s=f09386d1171de7af94297555f5b2cd9f" alt="Configure the input type" width="1132" height="649" data-path="get-started/dmn/img/modeler-step4.png" />

Similarly, double-click the *Dish* column header and choose `string` as the output type.

## Add rules

Add the first rule by clicking the *+* button at the bottom of the table. In the new row, type `Fall` in the input column and `Spareribs` in the output column.

<img src="https://mintcdn.com/aseeflow/nrz9o5m15i2WLCpp/get-started/dmn/img/modeler-step5.png?fit=max&auto=format&n=nrz9o5m15i2WLCpp&q=85&s=69e08e7442deeeade32fe40e4c11e196" alt="Add the first rule" width="1132" height="640" data-path="get-started/dmn/img/modeler-step5.png" />

`Fall` is the condition (input entry) of the rule, expressed in FEEL. It checks whether the input value (the `season` variable) equals `Fall`.

`Spareribs` is the conclusion (output entry) of the rule and returns the string `Spareribs`.

Next, add a second input *How many guests* with the input expression `guestCount` and type `integer`. Fill the table with additional rules for the remaining seasons.

<img src="https://mintcdn.com/aseeflow/nrz9o5m15i2WLCpp/get-started/dmn/img/modeler-step6.png?fit=max&auto=format&n=nrz9o5m15i2WLCpp&q=85&s=191d1d8166203e095b0a88cdad6dbe6a" alt="Add the remaining rules" width="1132" height="538" data-path="get-started/dmn/img/modeler-step6.png" />

## Configure the hit policy

Set the hit policy to *UNIQUE*, which specifies that only one rule can match. Click the *Hit Policy* dropdown and choose *UNIQUE*.

<img src="https://mintcdn.com/aseeflow/nrz9o5m15i2WLCpp/get-started/dmn/img/modeler-step7.png?fit=max&auto=format&n=nrz9o5m15i2WLCpp&q=85&s=87b4e642ab664bfd139683640d2d180b" alt="Configure the hit policy" width="1132" height="538" data-path="get-started/dmn/img/modeler-step7.png" />

<Note>
  The default hit policy is *UNIQUE*. If your rules are mutually exclusive, you don't need to change this setting.
</Note>

## Save the decision table

Save your changes by clicking **File > Save File As...**. Navigate to your application project directory and place the model in the `src/main/resources` folder.

<img src="https://mintcdn.com/aseeflow/nrz9o5m15i2WLCpp/get-started/dmn/img/modeler-save-dmn-table.png?fit=max&auto=format&n=nrz9o5m15i2WLCpp&q=85&s=a13dfacf7d3b1aab9a799117eaa8cd57" alt="Save the decision table" width="1132" height="536" data-path="get-started/dmn/img/modeler-save-dmn-table.png" />

Return to your IDE, right-click the project folder, and click *Refresh* to synchronize the new DMN file. For automatic workspace synchronization, consider configuring auto-sync in your IDE.

<Note>
  **Catch up: get the sources of Step-3**

  ```bash theme={null}
  git clone https://github.com/aseeflow/aseeflow-get-started-dmn.git
  git checkout -f Step-3
  ```

  Or [download as a `.zip`](https://github.com/aseeflow/aseeflow-get-started-dmn/archive/Step-3.zip).
</Note>

## Next step

Continue to [evaluate and deploy the decision table](/get-started/dmn/deploy).
