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

# Executable Rules Models: DMN in Aletyx Playground

> A 30-minute hands-on walkthrough of building and testing DMN decision models in the browser-based Aletyx Playground.

export const AnnotatedImage = ({src, alt, markers = []}) => <div style={{
  position: "relative",
  width: "100%",
  margin: "1rem 0",
  lineHeight: 0
}}>
    <img src={src} alt={alt} style={{
  width: "100%",
  display: "block",
  borderRadius: "0.5rem",
  border: "1px solid rgba(0,0,0,0.1)"
}} />
    {markers.map((m, i) => <span key={i} title={m.label} style={{
  position: "absolute",
  top: `${m.top}%`,
  left: `${m.left}%`,
  transform: "translate(-50%, -50%)",
  width: "1.4rem",
  height: "1.4rem",
  borderRadius: "9999px",
  background: "#ea580c",
  color: "#ffffff",
  fontSize: "0.78rem",
  fontWeight: 700,
  display: "flex",
  alignItems: "center",
  justifyContent: "center",
  border: "2px solid #ffffff",
  boxShadow: "0 1px 4px rgba(0,0,0,0.45)",
  cursor: "help",
  lineHeight: 1,
  userSelect: "none",
  zIndex: 2
}}>
        {i + 1}
      </span>)}
  </div>;

Aletyx Playground is a lightweight, browser-based tool for creating, editing, and
testing business processes and decision models. In this guide, you'll explore the
core features of Aletyx Playground and get hands-on experience with both DMN
decision models and BPMN process models.

<Info>
  This guide uses the Aletyx Enterprise Build of Kogito and Drools 10.1.0-aletyx.
  Plan for about **30 minutes**.
</Info>

## Accessing Aletyx Playground

Aletyx Playground is available both as a container that can easily be deployed into
any container orchestration platform and as a local installation option.

<Tabs>
  <Tab title="Cloud">
    Navigate to [playground.aletyx.ai](https://playground.aletyx.ai). No
    installation required — just start playing immediately!
  </Tab>

  <Tab title="Local container">
    As long as you have set up your local environment to meet the Local
    Environment Requirements, you can run one of these commands to get started
    with everything deployed locally:

    <CodeGroup>
      ```bash macOS theme={null}
      curl -sL https://raw.githubusercontent.com/aletyx-labs/kie-10.0.0-sandbox/refs/heads/main/docker-compose.yaml | docker compose -f - up
      ```

      ```bash Linux theme={null}
      curl -sL https://raw.githubusercontent.com/aletyx-labs/kie-10.0.0-sandbox/refs/heads/main/docker-compose.yaml | docker-compose -f - up
      ```

      ```bash Windows theme={null}
      curl -sL https://raw.githubusercontent.com/aletyx-labs/kie-10.0.0-sandbox/refs/heads/main/docker-compose.yaml | docker-compose -f - up
      ```
    </CodeGroup>

    Then access Aletyx Playground at [http://localhost:9090](http://localhost:9090).
  </Tab>
</Tabs>

## The Aletyx Playground Interface

When you navigate to Aletyx Playground, you'll see a welcome screen with several
key areas:

<Frame>
  <img src="https://mintcdn.com/aletyx-3353d50c/ofr1TVSA8RUT0-Zd/images/dmn-pg-playground_welcome.png?fit=max&auto=format&n=ofr1TVSA8RUT0-Zd&q=85&s=22da8e28d3a3c0ea1e03cce51edcae10" alt="Aletyx Playground Welcome Screen" width="1708" height="968" data-path="images/dmn-pg-playground_welcome.png" />
</Frame>

<AccordionGroup>
  <Accordion title="1. Creation Area">
    The top tiles allow you to create new projects or import existing ones.
  </Accordion>

  <Accordion title="2. Import Area">
    Import existing projects or DMN/BPMN files either from various Git providers or
    through direct file uploads.
  </Accordion>

  <Accordion title="3. Projects Area">
    The lower section displays your locally imported projects and models.
  </Accordion>

  <Accordion title="4. Toolbar">
    The top bar provides access to:

    * **Dev Deployments**: Test deployments to connected Kubernetes or OpenShift clusters
    * **Extended Services**: Connection to the DMN execution service for testing
    * **Settings** (⚙️): Configure your Playground instance, including DMN version settings
    * **Profile** (👤): Configure connections to Git providers and Kubernetes environments
  </Accordion>
</AccordionGroup>

<Note>
  Projects in Aletyx Playground are stored in your browser's local storage by
  default. For persistent storage and collaboration, connect to a Git provider
  under Profile settings. Playground is not designed to be long-term storage of
  your BPMN/DMN models and should be regularly synchronized with your Git provider!
</Note>

## Exploring Decisions with DMN

Let's begin by exploring a sample Decision Model and Notation (DMN) model.

<Steps>
  <Step title="Open the sample">
    From the welcome screen, click **Try Sample** under the Decision section.

    <Frame>
      <img src="https://mintcdn.com/aletyx-3353d50c/ofr1TVSA8RUT0-Zd/images/dmn-pg-try-dmn-sample.png?fit=max&auto=format&n=ofr1TVSA8RUT0-Zd&q=85&s=b7255c954043b75c5fb1f10a2d920037" alt="Try Sample DMN" width="1708" height="968" data-path="images/dmn-pg-try-dmn-sample.png" />
    </Frame>
  </Step>

  <Step title="Review the model">
    This opens a sample "Loan Pre-qualification" DMN model (DMN 1.5 Specification).

    Hover over each numbered marker on the screenshot to see what that part does,
    or expand the list below.

    <AnnotatedImage
      src="/docs/images/dmn-pg-dmn-editor.png"
      alt="DMN editor with numbered callouts for each part"
      markers={[
    { top: 20, left: 20, label: "1. Decision Editor — the active view, showing the model or your selection" },
    { top: 45, left: 50, label: "2. Decision Connectors — drag the lines to link a decision to another decision or a knowledge source" },
    { top: 37, left: 47, label: "3. Decision Output Type — map the decision's data type to part of your model or structures" },
    { top: 20, left: 35, label: "4. Data Types Editor — view, create, or edit the model's data types" },
    { top: 20, left: 75, label: "5. Included Models — reference other models for reuse" },
    { top: 62, left: 67, label: "6. Credit Score Rating decision node — produces the rating from the Credit Score input" },
    { top: 76, left: 67, label: "7. Credit Score input node — the applicant's credit score, required to execute the decision" },
    { top: 75, left: 5,  label: "8. DRG node selector — navigate between the diagram's nodes" },
    { top: 63, left: 5,  label: "9. Annotations — free-text notes; no executable impact" },
    { top: 33, left: 5,  label: "10. Decision Input (oval) — an input, mappable to data types" },
    { top: 38, left: 5,  label: "11. Decision Node — a decision; executes once its requirements are met" },
    { top: 62, left: 55, label: "12. Decision BKM (on the diagram) — reusable logic via FEEL, Java, or PMML" },
    { top: 43, left: 5,  label: "13. Decision BKM (palette) — add a Business Knowledge Model" },
    { top: 48, left: 5,  label: "14. Knowledge Source — documents, policies, or people guiding a decision; not executable" },
    { top: 53, left: 5,  label: "15. Decision Service — capture and expose (or hide) decisions from execution" },
    { top: 51, left: 43, label: "16. Edit Decision — edit the logic of the selected node" },
    { top: 27, left: 99, label: "17. Properties — click the i icon (or press i) to open the node's properties" },
  ]}
    />

    <Accordion title="What each numbered part of the DMN editor does">
      1. **Decision Editor** — The currently active section of the editor, showing the DMN model or your current selection.
      2. **Decision Connectors** — From a decision, drag the connector lines to link it to the appropriate target — another decision or a knowledge source.
      3. **Decision Output Type** — The pulldown that maps the decision's data type to a particular part of your model or structures.
      4. **Data Types Editor** — View, create, or edit the data types associated with the model.
      5. **Included Models** — Reference other models so decisions, data objects, and logic can be reused.
      6. **Credit Score Rating decision node** — The rectangle is a Decision Node; here it produces the Credit Score Rating from the Credit Score input.
      7. **Credit Score input node** — The oval is an Input Data Node — the applicant's credit score — required to execute the decision.
      8. **DRG node selector** — Navigate between the nodes of the Decision Requirements Diagram.
      9. **Annotations** — Free-text annotations on the model; no executable impact, but great for explaining a model.
      10. **Decision Input** — In DMN an oval represents an input; these can be mapped to specific data structures or types.
      11. **Decision Node** — Places a decision on the diagram. A node with no inputs executes on invocation; if a requirement node (another decision or input) precedes it, that must complete first.
      12. **Decision BKM (on the diagram)** — A Business Knowledge Model lets FEEL, Java, or PMML supplement decision execution.
      13. **Decision BKM (palette)** — The palette shape for adding a Business Knowledge Model.
      14. **Knowledge Source** — Documents, committees, regulations, policies, or people that define how a decision should be made. Not executable.
      15. **Decision Service** — Captures decisions and exposes (or hides) them from execution.
      16. **Edit Decision** — Click **Edit** below a node to edit that decision's logic.
      17. **Properties of selected item** — Click the *i* icon (or press `i`) to open the selected node's properties.
    </Accordion>

    <Accordion title="View Sample DMN Model">
      <Frame>
        <img src="https://mintcdn.com/aletyx-3353d50c/ofr1TVSA8RUT0-Zd/images/dmn-pg-dmn-sample-view.png?fit=max&auto=format&n=ofr1TVSA8RUT0-Zd&q=85&s=e0ef2cc6b683e955afbbe8890377b519" alt="Sample DMN Model" width="1708" height="930" data-path="images/dmn-pg-dmn-sample-view.png" />
      </Frame>
    </Accordion>
  </Step>

  <Step title="Explore the model components">
    * **Input Nodes**: "Applicant Data" and "Credit Score"
    * **Decision Nodes**: "Loan Pre-Qualification"
    * **Business Knowledge Models**: Reusable decision logic
  </Step>

  <Step title="Open a decision">
    Click on the "Credit Score Rating" decision node and select **Edit** to view the
    decision logic.

    <Frame>
      <img src="https://mintcdn.com/aletyx-3353d50c/ofr1TVSA8RUT0-Zd/images/dmn-pg-edit-credit-rating.png?fit=max&auto=format&n=ofr1TVSA8RUT0-Zd&q=85&s=ef89a34bad92578f03954a7fbfe3dccc" alt="Edit Credit Score Rating" width="1706" height="928" data-path="images/dmn-pg-edit-credit-rating.png" />
    </Frame>
  </Step>

  <Step title="Inspect the decision table">
    This decision table is used to determine the credit ratings based on FICO®
    scores. If you hover over each icon, it will describe different parts of the
    Decision Table.

    <AnnotatedImage
      src="/docs/images/dmn-pg-credit-score-dmn-edit.png"
      alt="Decision table with numbered callouts for each part"
      markers={[
    { top: 33, left: 15, label: "1. Input column / condition — the condition on Credit Score.FICO (a number)" },
    { top: 45, left: 15, label: "2. FEEL condition — comparison expressions; [] inclusive, () exclusive, .. for ranges" },
    { top: 33, left: 25, label: "3. Output column — sets Credit Score Rating (maps to Credit_Score_Rating)" },
    { top: 45, left: 25, label: "4. FEEL output — the value set when the rule matches" },
    { top: 33, left: 35, label: "5. Annotations column (optional) — notes; ignored by the engine" },
    { top: 33, left: 6,  label: "6. Hit Policy — how an outcome is reached when multiple rules match" },
    { top: 43, left: 6,  label: "7. Rule 1 — FICO >= 750 sets the rating to Excellent" },
    { top: 48, left: 6,  label: "8. Rule 2 — FICO 700 to < 750 sets the rating to Good" },
    { top: 58, left: 6,  label: "9. Rule 3 — FICO 650 to < 700 sets the rating to Fair" },
    { top: 65, left: 6,  label: "10. Rule 4 — FICO 600 to < 650 sets the rating to Poor" },
    { top: 75, left: 6,  label: "11. Rule 5 — FICO < 600 sets the rating to Bad" },
  ]}
    />

    <Accordion title="What each numbered part of the decision table does">
      1. **Input column / condition** (e.g. "Credit Score.FICO (number)") — Sets the condition on the FICO score. The dot notation takes the `FICO` property from the input data. The rule rows below use the supplied score to determine the rating.
      2. **FEEL condition** — Comparison expressions are common. Use brackets `[]` (inclusive) or parentheses `()` (exclusive) with `..` to write ranges. Note the Unique (U) hit policy requires that only a single rule can fire across the table.
      3. **Output column** (e.g. "Credit Score Rating (Credit\_Score\_Rating)") — Sets the decision's output value when a row's conditions match. Here it maps to the `Credit_Score_Rating` data type.
      4. **FEEL output** — The value set when the rule's conditions are met. Strings use quotes (as shown), but this could just as easily be a number or a FEEL expression.
      5. **Annotations column** (optional) — Notes about each rule; ignored by the engine during evaluation.
      6. **Hit Policy** (the letter in the top-left cell) — Determines how an outcome is reached when multiple rules match: Unique (U), Any (A), Priority (P), First (F), and Collect (C) variants — Collect/Sum (C+), Collect/Min (C\<), Collect/Max (C>), Collect/Count (C#).
      7. **Rule 1 — Credit Score ≥ 750** — When the FICO score is 750 or greater, the Credit Score Rating is set to Excellent.
      8. **Rule 2 — Credit Score 700 to \< 750** — When the FICO score is inclusive of 700 to less than 750, the Credit Score Rating is set to Good.
      9. **Rule 3 — Credit Score 650 to \< 700** — When the FICO score is inclusive of 650 to less than 700, the Credit Score Rating is Fair.
      10. **Rule 4 — Credit Score 600 to \< 650** — When the FICO score is inclusive of 600 to less than 650, the Credit Score Rating is Poor.
      11. **Rule 5 — Credit Score \< 600** — When the FICO score is less than 600, the Credit Score Rating is set to "Bad".
    </Accordion>
  </Step>
</Steps>

In the next section, we will see how to interact with this model within Aletyx
Playground!

### Interacting With Your Decision Model

When building DMN models within Aletyx Playground, you can take advantage of the
fact that DMN includes an execution specification, making it super lightweight and
portable. Aletyx Playground includes a built-in DMN runner that lets you see how
the model would execute as it is written right now — no compilation. As you finish
your change within a given cell or decision, you can see how your decision reacts in
real time, all in the comfort of your browser!

<Steps>
  <Step title="Run the model">
    Click the **Run** button in the top-right menu. An input form appears, allowing
    you to test the decision with various inputs.

    <Frame>
      <img src="https://mintcdn.com/aletyx-3353d50c/ofr1TVSA8RUT0-Zd/images/dmn-pg-run-dmn.gif?s=a2bfcd654ad4e4d03cf5e43a62c24903" alt="Run DMN Model" width="1728" height="992" data-path="images/dmn-pg-run-dmn.gif" />
    </Frame>
  </Step>

  <Step title="Test an input">
    Enter a credit score between 700 and 750 to test the "Credit Score Rating"
    decision.
  </Step>

  <Step title="Observe real-time output">
    Let's observe how the output updates in real-time as you change the input. To
    test this out, edit the **Credit Score** decision by modifying a value in the
    range we tested (in the GIF example this is 725, so change the second row). There
    are constrained values that you can see by:

    * Clicking **Data Types** at the top of the DMN model (2)
    * Selecting the `Pre_Bureau_Risk_Category` and selecting `Credit_Score_Rating`
    * You can see the example's prefilled values of Poor, Bad, Fair, Good, Excellent — you can either add a new value here or change to work with one of these constrained values.

    <Frame>
      <img src="https://mintcdn.com/aletyx-3353d50c/ofr1TVSA8RUT0-Zd/images/dmn-pg-dmn-constraints.png?fit=max&auto=format&n=ofr1TVSA8RUT0-Zd&q=85&s=49cc741e496e5208c1823386cea93ac3" alt="DMN Enumeration" width="3450" height="1918" data-path="images/dmn-pg-dmn-constraints.png" />
    </Frame>
  </Step>

  <Step title="Modify the decision table">
    Return to the model by clicking **Editor** at the top, then click the Credit
    Score Rating and click **Edit**. Change the rating for scores between 700–750
    from "Good" to "Excellent", and observe how the test results update immediately
    after leaving the cell you are working on.

    <Frame>
      <img src="https://mintcdn.com/aletyx-3353d50c/ofr1TVSA8RUT0-Zd/images/dmn-pg-update-dmn-row.gif?s=e9c1ee4a2a37c81833f1a4b1e89cd519" alt="DMN Testing" width="1728" height="992" data-path="images/dmn-pg-update-dmn-row.gif" />
    </Frame>
  </Step>
</Steps>

## Creating Your First Project

Now that you've explored the sample models, let's create your own project.

<Steps>
  <Step title="Create a new decision">
    Return to the home screen and click **New Decision**. You can do this by clicking
    the Aletyx Playground logo.

    <Frame>
      <img src="https://mintcdn.com/aletyx-3353d50c/ofr1TVSA8RUT0-Zd/images/dmn-pg-new-dmn-decision.png?fit=max&auto=format&n=ofr1TVSA8RUT0-Zd&q=85&s=0f1b057bf0eaa18e2f4b09800f937f85" alt="New DMN Decision" width="1726" height="944" data-path="images/dmn-pg-new-dmn-decision.png" />
    </Frame>
  </Step>

  <Step title="Name the model">
    When the model opens up, you can change its name.

    <Frame>
      <img src="https://mintcdn.com/aletyx-3353d50c/ofr1TVSA8RUT0-Zd/images/dmn-pg-new-dmn-model-name.png?fit=max&auto=format&n=ofr1TVSA8RUT0-Zd&q=85&s=7b246aa25ce664f80cebb1253ff9ab64" alt="Create Project" width="3454" height="1340" data-path="images/dmn-pg-new-dmn-model-name.png" />
    </Frame>
  </Step>

  <Step title="Plan the project">
    In your new model, you can build a DMN 1.5 model and later incorporate features
    tied to a larger project that features:

    * BPMN process models
    * More DMN decision models
    * Imported existing models
    * A connection to a Git repository for version control
  </Step>
</Steps>

In the next section we will start building a new decision fairly quickly to see how
easy it is to go from Zero to DMN Hero!

## Basics of DMN modeling — A Top-Down or Bottom-Up Approach both work here!

Now that the model is created, we need to create the base of the model. Our model
can be designed from a top-down approach or bottom-up, given that we know most of
the decision as it stands right now. There is a **base level of days** that will be
used and **three extra-days cases** that can be created. We also know that there are
two inputs for the decisions — **Age and Years of Service**.

Since we know most of the decision design up front, let's get started quickly! We can
put 2 input nodes (the ovals) and four decision nodes (the rectangles) onto the DMN
designer area. You can drag and drop these from the left-hand side and start changing
the names.

<Tip>
  This can be done by double-clicking the name of each node (double-click New Input
  Data and then change the name, same with the New Decision) or by using the
  properties menu — **press `i` on your keyboard when the node is selected** or click
  the *i* button in the top right of the DRD editor.
</Tip>

<Frame>
  <img src="https://mintcdn.com/aletyx-3353d50c/ofr1TVSA8RUT0-Zd/images/dmn-pg-dmn-nodes-on.png?fit=max&auto=format&n=ofr1TVSA8RUT0-Zd&q=85&s=46ce0af21c3761ab3dc6928069f87a9d" alt="DMN nodes on DRD showing modeling" width="1726" height="793" data-path="images/dmn-pg-dmn-nodes-on.png" />
</Frame>

```text theme={null}
Input Node 1: Age
Input Node 2: Years of Service
Decision Node 1: Base Vacation Days
Decision Node 2: Extra days case-1
Decision Node 3: Extra days case-2
Decision Node 4: Extra days case-3
```

Now that we have the names of the nodes, we need to modify the contents within them.
Click the appropriate node and click the *i* button to open the properties panel
(you can also press the `i` key on your keyboard to instantly open it). This can also
be edited using the pulldown above the node for quicker change; the properties panel
can also provide extra context if needed.

<Frame>
  <img src="https://mintcdn.com/aletyx-3353d50c/ofr1TVSA8RUT0-Zd/images/dmn-pg-input-dmn-property.png?fit=max&auto=format&n=ofr1TVSA8RUT0-Zd&q=85&s=f26aa40641caf503579b592a63256bdb" alt="Property change" width="1186" height="798" data-path="images/dmn-pg-input-dmn-property.png" />
</Frame>

For each input node, do the following configuration:

* **Age** — Data Type: **number**
* **Years of Service** — Data Type: **number**

After this is done, we will work on the Decision nodes. Each one will have a Data
Type of number.

<Tip>
  Everything is stored locally in the browser storage, so you don't have to press a
  combination of keys to save your work as you go — the editor is constantly in motion
  and saving while you're working. These are all stored locally; later we will get to
  how this interaction works with Git.
</Tip>

Now we need to connect the Age and Years of Service input nodes to our Extra days
case-1, Extra days case-2 and Extra days case-3 decision nodes (note we're not
connecting to Base Vacation Days — this will be explained later!). A good practice with
DMN model design that Aletyx Playground allows is the use of the DMN Runner to see how
your model is evolving while you're working on it. If you **press Run** just above the
editor, you will start seeing the model interact as it changes. When your cursor hovers
over the input node (Age or Years of Service), you will see an arrow icon — the
Information Requirement arrow — that we will use to make Extra days case-1, Extra days
case-2 and Extra days case-3 all require both the Age and Years of Service inputs.

<Frame>
  <img src="https://mintcdn.com/aletyx-3353d50c/ofr1TVSA8RUT0-Zd/images/dmn-pg-age-info-require.png?fit=max&auto=format&n=ofr1TVSA8RUT0-Zd&q=85&s=d5f5b216ae0533c57698e5f9f220b9d0" alt="Age with Information Requirement Arrow" width="458" height="347" data-path="images/dmn-pg-age-info-require.png" />
</Frame>

<Accordion title="Click to see the process in action">
  <Frame>
    <img src="https://mintcdn.com/aletyx-3353d50c/ofr1TVSA8RUT0-Zd/images/dmn-pg-draw-info-require.gif?s=1d8c32500d4993495e44b43f89c30baf" alt="Demo of the process" width="1804" height="834" data-path="images/dmn-pg-draw-info-require.gif" />
  </Frame>
</Accordion>

## Building Extra Days Case-1

The first Extra days case is modeled by the scenario: "Employees younger than 18 or
older than 60 will receive an extra 5 days; or greater than 30 years of service will
receive 7 days." To implement this we will build a decision table to model this logic.
Note that our decision table is going to use the Age and Years of Service that we are
taking from the input nodes.

<Accordion title="Click to see a preview of Extra Days Case-1">
  <Frame>
    <img src="https://mintcdn.com/aletyx-3353d50c/ofr1TVSA8RUT0-Zd/images/dmn-pg-extra-days-case-1.gif?s=16f6f237bcd8e90e61e2fde16bb1fd2f" alt="Demo of Extra Days" width="1802" height="834" data-path="images/dmn-pg-extra-days-case-1.gif" />
  </Frame>
</Accordion>

<Steps>
  <Step title="Open the decision editor">
    **Click the Extra days case-1 node and select Edit** just below the box to open
    the decision editor.
  </Step>

  <Step title="Set the expression type">
    Set the expression type to a Decision Table and then enter the rows below.
  </Step>

  <Step title="Set the hit policy">
    The hit policy of the decision table is by default set to **U** (Unique), meaning
    only one rule is expected to fire for a given input. Here, we want **Collect Max**:
    for a given input multiple decisions might match, but we want to collect the output
    from the rule with the highest number of additional vacation days. Click the **U**
    in the upper-left corner of the decision table, set the Hit Policy to **Collect**,
    and when prompted for the Aggregator function, **select MAX** to pull the largest
    value from the table. This allows all rules to fire and the largest to be chosen.
    You can test this with various scenarios using the runner while writing. You will
    see these executions under Extra days case-1 on the right side of the DMN runner's
    outputs.

    <Note>
      If you add an extra row to the table after creating it, you can copy the two rows
      below and paste them as you would into a spreadsheet — they're in the format you
      need to work!
    </Note>

    | Age         | Years of Service | Extra days case-1 | Annotation                      |
    | ----------- | ---------------- | ----------------- | ------------------------------- |
    | `<18, >=60` | `-`              | `5`               | "Less than 18 or older than 60" |
    | `-`         | `>30`            | `7`               | "More than 30 years of service" |
  </Step>

  <Step title="Set a default output">
    You may have noticed situations that didn't return a value and left it `null` when
    testing. To avoid issues with a null, set a default value on the output column for
    the otherwise situations. Click the column header of Extra days case-1 and open the
    property panel by clicking the *i* button on the decision header. Scroll down to
    **Default Output Entry**. Since we're just changing the default value of the column,
    no expression language is needed — just **set the value equal to 0**. Once you leave
    the Content box, the decision itself reacts.

    <Accordion title="How to set default to 0">
      <Frame>
        <img src="https://mintcdn.com/aletyx-3353d50c/ofr1TVSA8RUT0-Zd/images/dmn-pg-default-to-zero.gif?s=d61296937c4c0cf39d0bb9f39907b6b2" alt="Demo of Extra Days" width="1804" height="834" data-path="images/dmn-pg-default-to-zero.gif" />
      </Frame>
    </Accordion>
  </Step>

  <Step title="Return to the diagram">
    After this rule is done, click **Back to Diagram**.
  </Step>
</Steps>

## Building Extra Days Case-2

A lot of the same steps from before are going to be repeated for Extra Days Case-2,
so let's jump right in!

<Accordion title="Click to see a preview of Extra Days Case-2">
  <Frame>
    <img src="https://mintcdn.com/aletyx-3353d50c/ofr1TVSA8RUT0-Zd/images/dmn-pg-extra-days-case-2.gif?s=c7b131f5b9f35f15990efb01a9cdfbfb" alt="Demo of Extra Days" width="1728" height="842" data-path="images/dmn-pg-extra-days-case-2.gif" />
  </Frame>
</Accordion>

<Steps>
  <Step title="Open the decision editor">
    To implement the second use case, **click the Extra days case-2 decision node and
    select Edit** to open the decision editor.
  </Step>

  <Step title="Select a decision table">
    **Click on Select expression and select Decision Table.** The table will be
    autopopulated with the columns, same as before, since they are connected as an
    information requirement to the node.
  </Step>

  <Step title="Enter the rules">
    This time the rule is an additional 4 days for more than 30 years of service, or an
    additional 3 days for those greater than 60. Same as before, it will be a Collect
    Max with a default value of 0. Be sure to change the Hit Policy from Unique to
    Collect Max, and set the default to 0.

    | Age    | Years of Service | Extra days case-2 | Annotation                      |
    | ------ | ---------------- | ----------------- | ------------------------------- |
    | `>=60` | `-`              | `3`               | "Older than 60"                 |
    | `-`    | `>30`            | `4`               | "More than 30 years of service" |
  </Step>

  <Step title="Return to the diagram">
    After this is completed, click **Back to Diagram** so we can add the last extra days
    case to Extra days case-3.
  </Step>
</Steps>

## Building Extra Days Case-3

This will be done with the case that, based on years of service being between 15 and
30, you get 3 extra days of vacation; or if at least 45 (Age), you get 2 more days.
Same as before, all default cases are set to 0.

| Age    | Years of Service | Extra days case-3 | Annotation                       |
| ------ | ---------------- | ----------------- | -------------------------------- |
| `-`    | `[15..30]`       | `3`               | "Between 15-30 years of service" |
| `>=45` | `-`              | `2`               | "Older than 45"                  |

This rule will be set up exactly the same way as the others. Edit the **Extra days
case-3** decision and add the conditions for between 15 and 30 years of service for 3
days, and if the Age is above 45 for 2 days. Make sure to set the default back to 0 as
before with Extra days case-1 and Extra days case-2.

<Accordion title="Click to see a preview of Extra Days Case-3">
  <Frame>
    <img src="https://mintcdn.com/aletyx-3353d50c/ofr1TVSA8RUT0-Zd/images/dmn-pg-extra-days-case-3.gif?s=609e538992fddb9535d376f9c87e673f" alt="Demo of Extra Days" width="1724" height="810" data-path="images/dmn-pg-extra-days-case-3.gif" />
  </Frame>
</Accordion>

Click **Back to Diagram** to return to the diagram and move to the next section.

## Summary of the Extra Days Cases

There's an important component about the three extra cases worth visiting before
moving on. You will notice that all three had both input nodes connected to them, and
from that connection the DMN editor built the columns used as condition columns, with
the decision node itself used as the output column. This greatly helps with building
your decisions. As a Decision Requirements Diagram, the decision node uses the inputs
to drive the decision based on the information requirements you give it. As we added
more components to the diagram, it continued to execute them once the requirements were
met. This is an essential part of DMN. Now that the extra days cases are each completed,
we can revisit Base Vacation Days.

## Creating Base Vacation Days

The last base decision we need to create is the **Base Vacation Days** decision. On the
base Decision Requirement Diagram, click on Base Vacation Days and click **Edit**. On the
node's "Select expression", select **Literal** and input `22`, as the base number of
vacation days is 22.

<Frame>
  <img src="https://mintcdn.com/aletyx-3353d50c/ofr1TVSA8RUT0-Zd/images/dmn-pg-base-vacation-days.png?fit=max&auto=format&n=ofr1TVSA8RUT0-Zd&q=85&s=4983f66bf35d804961e12faf42769d23" alt="Base Vacation Days" width="1728" height="810" data-path="images/dmn-pg-base-vacation-days.png" />
</Frame>

<Accordion title="Click to see a preview of Base Vacation Days">
  <Frame>
    <img src="https://mintcdn.com/aletyx-3353d50c/ofr1TVSA8RUT0-Zd/images/dmn-pg-base-vacation-days.gif?s=61452239d3b1f08ddaaeeb2d867e5519" alt="Demo of Base Days" width="1728" height="810" data-path="images/dmn-pg-base-vacation-days.gif" />
  </Frame>
</Accordion>

<Note>
  **Bringing the decisions together** — After the `22` is entered, the Base Vacation Day
  decision executes as soon as it is completed. This is because this decision has no
  requirements on the age or years of service. If you were to delete the data from Age
  and Years of Service, Base Vacation Days would remain at 22 and the others would return
  null, as the data is assumed to be null/empty. This is the power of DMN: the decisions
  that can be made at the time of execution will be made based on the requirements met.
  As more data is obtained (Age/Years of Service), the nodes attached to it execute once
  their requirements are met. Now that we have these nodes executing, we want to reach a
  final decision made when all 4 components are executed.
</Note>

## Building Total Vacation Days

<Steps>
  <Step title="Add the decision node">
    On the diagram, create one more decision called Total Vacation Days. Click on any of
    the four decision nodes and you will see a means to add a connection to another
    decision node. Click on this and drag it to an open area at the top of the Decision
    Requirement Diagram.

    <Accordion title="Click to see a preview of Drawing Total Vacation Days">
      <Frame>
        <img src="https://mintcdn.com/aletyx-3353d50c/ofr1TVSA8RUT0-Zd/images/dmn-pg-drawing-total-vacation-days.gif?s=dd31dc27f7c4740e449b12ea0b250851" alt="Demo of Total Vacation Days" width="1728" height="808" data-path="images/dmn-pg-drawing-total-vacation-days.gif" />
      </Frame>
    </Accordion>
  </Step>

  <Step title="Connect the remaining nodes">
    Once this is added, connect the remaining 3 decision nodes using the line with the
    arrowhead to connect them. This makes the Total Vacation Days decision require all 4
    nodes to be activated before it can execute.
  </Step>

  <Step title="Enter the FEEL expression">
    For this decision, it is going to be the Base Vacation Days plus the higher of the two
    between case-1 and case-3, plus the days from case-2. The FEEL expression would look
    like:

    ```text theme={null}
    Base Vacation Days + max(Extra days case-1, Extra days case-3) + Extra days case-2
    ```

    <Accordion title="Click to see a preview of Total Vacation Days">
      <Frame>
        <img src="https://mintcdn.com/aletyx-3353d50c/ofr1TVSA8RUT0-Zd/images/dmn-pg-total-vacation-days.gif?s=a7d2df94886de0cc37278208d844bb17" alt="Demo of Total Vacation Days" width="1724" height="812" data-path="images/dmn-pg-total-vacation-days.gif" />
      </Frame>
    </Accordion>
  </Step>
</Steps>

## Connecting to Git

To ensure your work is saved and versioned properly:

<Steps>
  <Step title="Open Profile">
    Click the Profile icon (👤) in the top-right corner.
  </Step>

  <Step title="Add a Git provider">
    Select **Git Providers** and click **Add Provider**.
  </Step>

  <Step title="Configure credentials">
    Choose your Git provider (GitHub, GitLab, etc.) and configure your credentials.
  </Step>

  <Step title="Connect your project">
    Return to your project and click the **Connect to Git** button.
  </Step>

  <Step title="Select repository and branch">
    Select your repository and branch, then click **Connect**.
  </Step>
</Steps>

## Next Steps

Now that you're familiar with Aletyx Playground, here are some next steps to continue
your journey:

* **Design a Complete Decision Model**: Create a more complex decision model for a real-world scenario.
* **Build an End-to-End Process**: Design a complete business process with multiple tasks and decisions.
* **Deploy to Kubernetes**: Learn how to deploy your models to a Kubernetes environment.
* **Integrate with Java Applications**: Explore how to use your models in Java applications.

<CardGroup cols={2}>
  <Card title="Decisions guide" icon="diagram-project" href="/docs/guides/decisions">
    How decisions are authored, tested, and governed.
  </Card>

  <Card title="Processes guide" icon="arrows-spin" href="/docs/guides/processes">
    Orchestrate long-running business processes.
  </Card>

  <Card title="Decision Analyst quickstart" icon="table-cells" href="/docs/quickstart/decision-analysts">
    Model your first decision visually.
  </Card>

  <Card title="What is DMN?" icon="circle-question" href="/docs/faq/concepts/what-is-dmn">
    Background on Decision Model and Notation.
  </Card>
</CardGroup>

## Additional Resources

* **DMN Modeling Guide**: Comprehensive guide to decision modeling.
* **BPMN Modeling Guide**: Detailed information on process modeling.
* **Aletyx Playground API**: Learn about the API for automation and integration.
