Combining BPMN and DMN

Hi. I would like to have a Decision Task (bpmn task) which would be bound to a DMN table, so something like a Business Rule Task, but actually binding it to a decision table.

So far I understood that bpmn-js and dmn-js are two completely separate modelers, and I understand that a Decision Task is not a standard BPMN type so my thoughts were that I could bind it through extensionElements of a service task, but bottom line is that I would like to use DMN’s table without the DMN modeler, just the table. Is this even possible?

image
image

The way you link a business rule task to a decision is through the Decision ID which can be set through the properties panel of the BPMN editor:

image

The same ID must be set in the properties panel of the DMN editor:

image

The engine executing the BPMN process will have to pick up the DMN decision based on the ID you set.

Thank you for replying so fast!

The way you link a business rule task to a decision is through the Decision ID which can be set through the properties panel of the BPMN editor:

Do I have to load some specific additionalModules (or extensions) for my properties panel to have that Called Decision panel or do I just implement it by myself through a Custom PropertiesProviderModule?

The same ID must be set in the properties panel of the DMN editor:

Can I avoid having to use a separate DMN editor to instantiate a Decision task and then edit the table? How could I just create & edit a single table?

My end goal is using only one modeler canvas (which would be the BPMN editor).

I went back to double check and it turns out the Decision ID is specific to the Zeebe engine (cf. bpmn-js-properties-panel/ZeebePropertiesProvider.js at master · bpmn-io/bpmn-js-properties-panel · GitHub). What engine is the process going to be deployed to?

We are using flowable engine, and I’ve checked their examples, their Decision Task generates an extension element with

<flowable:field name="decisionTableReferenceKey">
          <flowable:string><![CDATA[test_dtkey]]></flowable:string>
</flowable:field>

so we can bind it through keys…

So to go back to my other question of not using the DMN editor to create a task and then switch to table view, but to instantly open a table view, I found this topic where you answered: Open DMN in Decision Table View and this is more or less works, so I would instantiate the editor and then run your code.

But I have another concern, can I use a similar approach like we have in bpmn-js, useService(modeling|moddle|elementRegistry) to manipulate the nodes of the DMN? For instance, wanting to bind the abovementioned key to and from my BPMN model?