> ## 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.

# Leverage Business Rules

This guide demonstrates how to integrate decision automation into BPMN processes using business rule tasks and DMN decision tables.

## Add a business rule task

Open your Payment Retrieval process in the Camunda Modeler. Select the *Approve Payment* task and change its type to *Business Rule Task* via the wrench menu.

<img src="https://mintcdn.com/aseeflow/nrz9o5m15i2WLCpp/get-started/quick-start/img/modeler-businessrule-task1.png?fit=max&auto=format&n=nrz9o5m15i2WLCpp&q=85&s=a782104ad9bf1d286ec756dee3447493" alt="Change to a business rule task" width="1200" height="673" data-path="get-started/quick-start/img/modeler-businessrule-task1.png" />

Configure the task properties:

* **Implementation:** `DMN`
* **Decision Ref:** `approve-payment`
* **Result Variable:** `approved`
* **Map Decision Result:** `singleEntry`

<img src="https://mintcdn.com/aseeflow/nrz9o5m15i2WLCpp/get-started/quick-start/img/modeler-businessrule-task2.png?fit=max&auto=format&n=nrz9o5m15i2WLCpp&q=85&s=7b872a2f3dabdd227f30da812e312e40" alt="Configure the business rule task" width="420" height="512" data-path="get-started/quick-start/img/modeler-businessrule-task2.png" />

Deploy the updated process using the deploy button.

## Create a DMN table

Create a new DMN diagram via **File > New File > DMN Diagram**.

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

Name the decision element *Approve Payment* with ID `approve-payment` (matching your BPMN Decision Ref).

<img src="https://mintcdn.com/aseeflow/nrz9o5m15i2WLCpp/get-started/quick-start/img/modeler-new-dmn-diagram-properties.png?fit=max&auto=format&n=nrz9o5m15i2WLCpp&q=85&s=a8507022d13af14ca22eb1c7d268d3f5" alt="Set the decision id" width="1200" height="673" data-path="get-started/quick-start/img/modeler-new-dmn-diagram-properties.png" />

Click the table button to generate a new DMN table.

<img src="https://mintcdn.com/aseeflow/nrz9o5m15i2WLCpp/get-started/quick-start/img/modeler-new-dmn-table.png?fit=max&auto=format&n=nrz9o5m15i2WLCpp&q=85&s=45c7d8dfd40c8acf19a1115844118a05" alt="Generate the DMN table" width="100" height="100" data-path="get-started/quick-start/img/modeler-new-dmn-table.png" />

## Specify the DMN table

Double-click **Input** to configure:

* **Input Label:** `Item`
* **Input Expression:** `item`

<img src="https://mintcdn.com/aseeflow/nrz9o5m15i2WLCpp/get-started/quick-start/img/modeler-dmn2.png?fit=max&auto=format&n=nrz9o5m15i2WLCpp&q=85&s=6ed65ea1747d8bec433969fef5168bc6" alt="Configure the input column" width="1200" height="675" data-path="get-started/quick-start/img/modeler-dmn2.png" />

Configure the output column:

* **Output Label:** `Approved`
* **Output Name:** `approved`

<img src="https://mintcdn.com/aseeflow/nrz9o5m15i2WLCpp/get-started/quick-start/img/modeler-dmn3.png?fit=max&auto=format&n=nrz9o5m15i2WLCpp&q=85&s=97626c016f894ed716de327e952d6482" alt="Configure the output column" width="1200" height="675" data-path="get-started/quick-start/img/modeler-dmn3.png" />

Add rules using the plus icon and set the output column data type to `boolean`.

<img src="https://mintcdn.com/aseeflow/nrz9o5m15i2WLCpp/get-started/quick-start/img/modeler-dmn4.png?fit=max&auto=format&n=nrz9o5m15i2WLCpp&q=85&s=c7f42fb8e0939818cfd5bcf30c0f88ac" alt="Add rules" width="1200" height="675" data-path="get-started/quick-start/img/modeler-dmn4.png" />

Your completed table should resemble:

<img src="https://mintcdn.com/aseeflow/nrz9o5m15i2WLCpp/get-started/quick-start/img/modeler-dmn5.png?fit=max&auto=format&n=nrz9o5m15i2WLCpp&q=85&s=a2cb321b2d07a46a203199ac58fc3f13" alt="Completed decision table" width="1200" height="675" data-path="get-started/quick-start/img/modeler-dmn5.png" />

## Deploy the DMN table

Click **Deploy** in the Modeler. Provide the deployment name *Payment Retrieval Decision* and confirm.

<img src="https://mintcdn.com/aseeflow/nrz9o5m15i2WLCpp/get-started/quick-start/img/modeler-dmn6.png?fit=max&auto=format&n=nrz9o5m15i2WLCpp&q=85&s=3cc67089bcad9fb6416b30b340c7deb3" alt="Deploy the DMN table" width="1200" height="675" data-path="get-started/quick-start/img/modeler-dmn6.png" />

## Verify the deployment with Cockpit

Navigate to `http://localhost:8080/camunda/app/cockpit/` and log in with `demo` / `demo`. Open the *Decisions* section to confirm *Approve Payment* appears as a deployed decision definition.

<img src="https://mintcdn.com/aseeflow/nrz9o5m15i2WLCpp/get-started/quick-start/img/cockpit-approve-payment.png?fit=max&auto=format&n=nrz9o5m15i2WLCpp&q=85&s=294b4454d38e3650ff139ed1a2d02450" alt="The deployed decision in Cockpit" width="1300" height="700" data-path="get-started/quick-start/img/cockpit-approve-payment.png" />

## Inspect with Cockpit and Tasklist

Open Tasklist at `http://localhost:8080/camunda/app/tasklist/`. Start two Payment Retrieval instances with different inputs to observe routing variations based on the DMN evaluation.

<img src="https://mintcdn.com/aseeflow/nrz9o5m15i2WLCpp/get-started/quick-start/img/tasklist-dmn1.png?fit=max&auto=format&n=nrz9o5m15i2WLCpp&q=85&s=acebf29571cdeadf565ad26d0a41d125" alt="Start instances in Tasklist" width="1300" height="700" data-path="get-started/quick-start/img/tasklist-dmn1.png" />

<img src="https://mintcdn.com/aseeflow/nrz9o5m15i2WLCpp/get-started/quick-start/img/tasklist-dmn2.png?fit=max&auto=format&n=nrz9o5m15i2WLCpp&q=85&s=5fd79c25af36556e9ac56567ff18c9f5" alt="Observe routing variations" width="1300" height="700" data-path="get-started/quick-start/img/tasklist-dmn2.png" />

Review the executed decision instances in Cockpit's *Decisions* section:

<img src="https://mintcdn.com/aseeflow/nrz9o5m15i2WLCpp/get-started/quick-start/img/cockpit-dmn-table.png?fit=max&auto=format&n=nrz9o5m15i2WLCpp&q=85&s=86017437b02dfb7b049aa682ac42fbf4" alt="Decision instances in Cockpit" width="1300" height="700" data-path="get-started/quick-start/img/cockpit-dmn-table.png" />

## Success!

You've completed the quick start. For next steps, explore the [ASEE Flow documentation](/introduction).

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

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

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