We are planning the migration from Camunda7 to Camunda8. We are working with Camunda as a standalone shared server and communicating with it via REST API. My question is now
How do I have to format the REST API request
/v2/decision-definitions/evaluate for a really simple DMN.
My test was like this (Request body):
Hi @Edmund - this is an interesting scenario. The data that is sent to the server is just a JSON document, which doesn’t have a native date format and uses a string representation. On the backend, it doesn’t know what variables should be a date, so it continues as a string. I think the best approach is to convert the value to a date using FEEL inside your DMN using the conversion function.
I have brought this to the attention of the product team to investigate further, though, to see if there’s a more elegant solution that could be implemented.
Hi Nethan,
this interesting scenario is the scenario from Camunda7. We are using this REST API for more than 5 years now.
…
{
“variables” : {
“MYDATE” : { “value” : “2019-05-03T01:22:22.143+0100”, “type” : “Date” }
}
}
…
from Camunda7 is sending the datatype together with the value and the value is then interpreted inside the DMN as a date.
You mean this has also changed in Camunda8 and we have to change hundreds of DMNs?
Hi @Edmund - that’s not necessarily what I’m saying. The execution engine and API was built from scratch for C8, so there are differences with C7. But at the same time, we want to make sure migrations aren’t a series of long manual tasks and we want to automate as much of that as it is possible to automate.
Do you have an enterprise license for C7? We have a taskforce dedicated to assisting with C7->C8 migrations that I can get you in touch with. I’ve also raised this concern with our product management team to investigate, from both a migration tooling perspective as well as supporting dates natively in variable parameters.
Hi Nathan,
yes the customer I am working for has an enterprise license and we are in contact with our Camunda Contact representative. I am just trying to get deeper in this new system to understand what and where we have to do changes.
Thanks Edmund for reporting this. I agree that we should allow setting the type, your use case of DMN evaluation using dates is spot on. I started a discussion with product management/engineering if and when we could include this. For tracking I created this issue: REST API: Support variable type for process variables (e.g. date) · Issue #29678 · camunda/camunda · GitHub. Feel free to add comments or feedback either here on in this issue!
Best - Bernd
Hi, yes, we call our DMNs almost exclusively via a BPMN. This DMN is used to accelerate several thousand calls of a DMN with several variable sets. This speeds it up by reducing the network latency time. The BPMN collects the DMN results and returns them in a result list (Json).
We were able to migrate this BPMN into the new C8 environment, there is just one smaller problem which was discussed here: Running dynamic DMN in BPMN.
Yes, we are using the FEEL conversion in the DMN expression field. Unfortunately this means that our business users have to go through hundreds of rules…which is error prone.