Fetch Data from DMN via API

Hello Everyone,

Wishing you all a very Happy New Year.

I have a query regarding fetching the data.
For Eg: I have a DMN with 2 input columns - Column A and Column B.
Will it possible to fetch the records just using either Column A or Column B with the below input parameter?

{
“variables”: {
“columnA”: {
“value”: “B”,
“type”: “String”
}
}
}

Hi @abhilash,

I’m sorry but I don’t get it. Please rephrase your question and provide more input :slight_smile:

Best regards,
Philipp

hi Phillip,

Thanks for responding.

I have a dmn with 2 columns - Column A and Column B.
When we make the API calls to fetch the data, do we have to provide the both the columns in the input like below:

{
“variables”: {
“columnA”: {
“value”: “B”,
“type”: “String”
},
“columnB”: {
“value”: “B”,
“type”: “String”
}
}
}

or is it possible that when we make the API call we can pass just one column data in the input like -
{
“variables”: {
“columnA”: {
“value”: “B”,
“type”: “String”
}
}
}

My query is that even though the input columns get added in the dmn in the further revisions, is it possible to fetch the data by sending only limited values in the API call input, for eg: only columnA in this case.

I don’t know that you mean by “API calls to fetch the data”.

However, you should provide all variables that are used in the input expressions. Otherwise the expression and the whole DMN fails to evaluate. Or, you need to deal with not existing variables.

Thanks Phillip.

We are using the Camunda API calls to fetch the data.
eg: https://hostname/engine-rest/decision-definition/key/Test/evaluate

Ok. I guess it is just about naming. You use the Camunda REST API to evaluate a DMN.

As I said, you should provide all the required variables.

Does this answer your question?

Yes Sir :slight_smile: this answers it.
Thank you so much :slight_smile:

Hi @Philipp_Ossler ,
How can I get DMN input & output in Spring Boot Java application with the help of Java code .
Use Case:
Need to compare my business value with list of DMN input & output.

Could you please help me on this ?

It depends. Inside the app, you could use the HistoryService API.
From the outside, you could use the REST API: Get Historic Decision Instance | docs.camunda.org