DMN DRD example

I would like to implement a DRD (decision requirements diagram) with 3 decision tables. I had it working using Camunda’s DMN engine. When I use the same DMN file in Flowable, the required/dependent decision tables are ignored. Here is a snippet of my code.

dmnDecisionService.createExecuteDecisionBuilder()
.decisionKey(decisionKey)
.variables(variables)
.executeDecision()

Are there any examples on how DRD should be used with Flowable engine? I searched source code for version 6.6.0 but I could not find a good one.

Hi,

there are quite some caveats with ‘just’ dropping in artefacts (DMN / BPMN etc) from other solutions and trying to execute with the API. (Specific extensions that aren’t cross platform compatible, other script languages used etc)
Best way forward is to start with importing them in Flowable Modeler and check that there are complete before deploying them on and running them with the Flowable Engines.

This unit test shows some usages of the Java API.

Hope this helps.

Regards,

Yvo

Thank for the pointers, Yvo.

Your explanation for “no simple drop-in” is understood.

I have encountered a few issues with the modeler.

  1. I can’t import the following dmn file into the modeler. Got error “Error while processing the DMN XML file : No DMN DI found in definition simple_decisionservice.dmn”. I guess this is a hand-written file. There is no DMN.

flowable-dmn-engine\src\test\resources\org\flowable\dmn\engine\test\runtime\simple_decisionservice.dmn

  1. Next I tried a file with dmndi element from the test. I got a different error: “Error while processing the DMN XML file : Import failed for decision_service_1.dmn, error message null”

flowable-dmn-engine\src\test\resources\org\flowable\dmn\engine\test\deployment\decision_service_1.dmn

  1. I then tried creating a new decision service, following this tutorial below. I did not get very far. After dropping a decision in to the service, there is no place for me to define rules in the decision table.
    Decision Models · Flowable Enterprise Documentation

Fan

Re #3: that tutorial is for the Enterprise version and not the Open Source code base.

Yes the tutorial is for enterprise version. It was mentioned because there is no equivalent in the open source documents.

Regardless, the point is the open source DMN modeler in Flowable 6.6.0 does not work when it comes to decision services.

Blockquote
the point is the open source DMN modeler in Flowable 6.6.0 does not work when it comes to decision services.

That’s quite a bold statement. Do you state this based on the fact that you’re trying to import a DMN file that does not include DI information? This is needed for the graphical editor to place the elements on the canvas. If you create a Decision Service model in the modeler; export it and import it again it should work.

Regarding your 3th point;

When creating a Decision Service you define decisions inside the decision service. These decisions refer to decision tables. The decision tables themselves contain the rules.

The decision inside the decision service.

The decision table reference of a decision.

The decision table

What part of this just does not work when it comes to decision services?

Regards,

Yvo

Yvo,

Thanks for the clarification. The UI makes sense now after reading your example.

I am able to chain the decision tables in the decision service. Will test the dmn file with the actual service.

Fan