Coordinate DMN decision with BPMN

89 views
Skip to first unread message

rishab raina

unread,
Jan 3, 2024, 12:27:15 PM1/3/24
to Kogito development mailing list
Hi,

I have a use case

i have multiple decision tables ( DMN's) for each country  and i need to process each table based on whether the input request has which country.

I wanted to orchestrate this decisioning using BPMN.

But the problem is e.g. I have a data type associated with the DMN i.e. part of DMN.
Its attached here.

IN BPMN , when i create a task & convert that into business rule to trigger the DMN, i will have to define input/ output in the data assignment section.

Now, the request/response are part of DMN as a itemdefinition, hence there is no POJO/class created for these itemdefinitions. So how can i refer them here in BPMN, without creating classes wrt to them.

Regards
Rishab

Screenshot 2024-01-03 at 10.52.15 PM.png
Screenshot 2024-01-03 at 10.52.52 PM.png

Matteo Mortari

unread,
Jan 3, 2024, 12:41:26 PM1/3/24
to kogito-de...@googlegroups.com
Hi Rishab,
more in general, the topic to define the data model once (say with ItemDefinition) and re-use it in several model-notations is in the scope of OMG's SDMN, fyi.

I believe you have, as of today, two options.

Option1.
You could create the Java class using a tool (VSCode extension for instance) so that is taken care of (semi?)-automatically, and adopt it from BPMN pov to use the same then from DMN pov.

Option2
You could use a Map for your Data Assignment BPMN->DMN, that is you could create a generic Map as part of Script or Task in BPMN, then the Drools DMN open source engine would use it for the "Request" InputData node.

Hope this helps,
MM

--
You received this message because you are subscribed to the Google Groups "Kogito development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kogito-developm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kogito-development/6d184202-f26d-473a-b07a-8301f11ba1can%40googlegroups.com.


--

rishab raina

unread,
Jan 4, 2024, 3:21:41 AM1/4/24
to Kogito development mailing list
Hi,

I do not understand above points.

"the topic to define the data model once (say with ItemDefinition) and re-use it in several model-notations is in the scope of OMG's SDMN, fyi" -- it means its already implemented or its in scope to be implemented in future ?

Which VS Code extension can help me to autogenerate Java Code from Itemdeifinitions ? 

As per Option 2 , i will need to keep all my pojo attributes within the map , which I dont want to do , i need to keep the data type as part of Itemdefinition only.

Thanks
Rishab 

Matteo Mortari

unread,
Jan 4, 2024, 3:52:13 AM1/4/24
to kogito-de...@googlegroups.com
Hi,

On Thu, 4 Jan 2024 at 09:21, rishab raina <2812r...@gmail.com> wrote:
Hi,

I do not understand above points.

"the topic to define the data model once (say with ItemDefinition) and re-use it in several model-notations is in the scope of OMG's SDMN, fyi" -- it means its already implemented or its in scope to be implemented in future ?

No, I wanted to highlight it is a general comment beyond Kogito/Kie/Drools and what you mentioned is accounted in more general terms by another spec by OMG, the SDMN.

 
Which VS Code extension can help me to autogenerate Java Code from Itemdeifinitions ? 

 
As per Option 2 , i will need to keep all my pojo attributes within the map , which I dont want to do , i need to keep the data type as part of Itemdefinition only.

As stated, if you supply in DMN input Context a java.util.Map for your "Request" InputData input, the Drools DMN open source engine will lookup attributes "Country", "Consignee" etc in the map instead of a pojo/class.
 
Reply all
Reply to author
Forward
0 new messages