Skip to main content

DMN Evaluation (A8Studio)

To enable external evaluation of DMN in DMN Hub, you require an API key and a DMN Hub URL. They are configured via A8config in A8Studio web.

  • To Generate the API Key, (follow these steps).
  • For the DMN Hub URL, check here.

Configurating the Evaluation Variables

To configure the variables (API key and DMN Hub URL), head to the Configuration section of your A8Studio App.

  • Apps > Configuration
  • Click the Add Variable button.

Outside-Evaluate-API

Setting Up - API Key & URL Variables

Outside-Evaluate-API

Mandatory

Ensure the "Key" for the API Key & URL variables are exactly as specified: dmn_hub_apiKey & dmn_hub_url.

Configuring the API Key Variable

  • Enter (dmn_hub_apiKey) as your Key for the API Key variable.
  • Enter the generated API Key as your Value.
  • Click Create.

Configuring the DMN Hub URL Variable

  • Enter (dmn_hub_url) as your Key for the URL variable.
  • Enter this [DMN server url]/api/v1/dmn/evaluate as your Value.
  • Click Create.

Methods for External Evaluation

There are two methods to evaluate the DMN outside of DMN Hub:

1. evaluateDMN

Using A8Flow SDK's evaluateDMN:

  • Configure the data by creating a payload.
  • Specify the DMN name.
  • Add the version code.
Payload
const payload = {
data: {},
dmnName: "personalLoan",
"version": 2
}

Note: If the version code is not provided, it defaults to the latest one.

  • Set the DMN Hub flag to true
DMN_Hub_Flag
const response = await a8flow.evaluateDMN("", payload, true)

2. Business Rule Task

Via Business Rule Task in Assisted flow:

  • Place a Business Rule Task.
  • Select DMN Hub in the Implementation field within the properties section.

Outside-Evaluate-API

  • Set the DMN name in the Decision Ref field.
  • Assign a Varaible name to the output in Result Variable.

Outside-Evaluate-API

The captured Result can then be used as required.

Outside-Evaluate-API