Skip to main content
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. Create a new DMN diagram

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. Set the decision id 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. Drill down into the decision table 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. Set the input and output labels

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. Configure the input expression 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. Configure the input type 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. Add the first rule 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. Add the remaining rules

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. Configure the hit policy
The default hit policy is UNIQUE. If your rules are mutually exclusive, you don’t need to change this setting.

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. Save the decision table Return to Eclipse, right-click the project folder, and click Refresh to synchronize the new DMN file with your IDE. For automatic workspace synchronization, consider configuring auto-sync in Eclipse.
Catch up: get the sources of Step-3
git clone https://github.com/camunda/camunda-get-started-dmn.git
git checkout -f Step-3
Or download as a .zip.

Next step

Continue to evaluate and deploy the decision table.