api to retrieve metadata from a dmn file

48 views
Skip to first unread message

Marco Iannelli

unread,
Jun 19, 2024, 7:03:40 AM (10 days ago) Jun 19
to Kogito development mailing list
Dear All,
does kogito/drools provides any api to retrieve metadata information for a given dmn?
e.g. i have a bkm model in a dmn file (let's call it "common") and business logic as part of another dmn, which includes common;

now i would like to retrieve the metadata of common, let's say the description field, from the business logic.

is this possible? if yes any advice?

thank you for your feedback
BR
Marco

Gabriele Cardosi

unread,
Jun 21, 2024, 7:38:04 AM (8 days ago) Jun 21
to kogito-de...@googlegroups.com
Hi Marco,
just to be sure: do you mean a programmatic way (i.e. java code) ?

--
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/9f0ba78a-a5b5-43c4-babc-d3f49f7dd8c8n%40googlegroups.com.

Marco Iannelli

unread,
Jun 21, 2024, 11:00:03 AM (8 days ago) Jun 21
to Kogito development mailing list
Hi Gabriele,
yes exactly. somehow i need to fetch those information such that from the business logic i can display those info

Gabriele Cardosi

unread,
Jun 21, 2024, 12:00:16 PM (8 days ago) Jun 21
to kogito-de...@googlegroups.com
Ok, gotcha. I'll take a look and come back ASAP.
Bye!


Alex Porcelli

unread,
Jun 21, 2024, 12:09:48 PM (8 days ago) Jun 21
to kogito-de...@googlegroups.com
Marco,

I don't think such capability exists today, and I just want to raise
that the DMN file itself is a spec - so you can use the existing API
to retrieve the DMN file content and you can then navigate in the file
following the spec definition (it's a XML file in the end).
> To view this discussion on the web visit https://groups.google.com/d/msgid/kogito-development/CAB%3DT0rwtUAF44_8OZPS4B5yK-p9jiTbE8_aprE1XTuam%3DWPsDg%40mail.gmail.com.

Gabriele Cardosi

unread,
Jun 24, 2024, 9:38:52 AM (5 days ago) Jun 24
to kogito-de...@googlegroups.com
Hi Marco,
the DMNModel object represents the xml, and you may use its methods to get details of the underlying model, also for imported models.

You may instantiate it with 
runtime.getModel("{namespace}",
"{modelname}");

I'm not sure if this could be of any help.
As Alex said, there are no specific API for your need, AFAIK

Best

Gabriele

Marco Iannelli

unread,
Jun 24, 2024, 6:25:52 PM (5 days ago) Jun 24
to Kogito development mailing list
Thank you Gabriele and Alex. You gave some intresting suggestion on how I could move on with this topic.
Best regards

Marco Iannelli

unread,
Jun 25, 2024, 3:32:33 AM (5 days ago) Jun 25
to Kogito development mailing list
and if for example i want to extend the ui which displays the properties of a particular dmn element, such that i can have additional fields to view and store custom metadata object, is this possible? 
if yes could you give some hints from where to start?
thank you and regards
Marco


Gabriele Cardosi

unread,
Jun 25, 2024, 4:06:34 AM (5 days ago) Jun 25
to kogito-de...@googlegroups.com
I think it is not possible, OOTB.
There is a swagger API, that exposes some/most of the model's information (not everything), and this could be "queried" with a REST call (it returns a JSON).
But as per modify/extend the UI itself, Alex could give you more details.

Best
Gabriele


Marco Iannelli

unread,
Jun 25, 2024, 10:45:42 AM (4 days ago) Jun 25
to Kogito development mailing list
Thank you Gabriele.
Could you share some reference related the rest end point you mentioned? 
Thank you best regards

Reply all
Reply to author
Forward
0 new messages