dmn editor integration

28 views
Skip to first unread message

paul

unread,
Mar 18, 2021, 7:02:27 PM3/18/21
to Kogito development mailing list
hi all,

I've built a standalone web app using the dmn editor and added a simple debugger to allow a user to step through the evaluation of the model.

Two questions (1) does the DMN editor expose any events such as click, focus or node open, (2) does the editor support programatically setting focus on nodes, context entries etc?

Thanks,
Paul.

Eder Ignatowicz

unread,
Mar 19, 2021, 7:39:47 AM3/19/21
to Kogito development mailing list
Hi Paul,

I've built a standalone web app using the dmn editor and added a simple debugger to allow a user to step through the evaluation of the model.

That sounds really cool, if it's possible, I would love to see a video/demo of it. 

Two questions (1) does the DMN editor expose any events such as click, focus or node open, (2) does the editor support programatically setting focus on nodes, context entries etc?

Not yet, but this is something in our mid-term roadmap.

We are in the planning stage for an API able to interact programmatically with BPMN and DMN editor, so I would like to ask you to file a feature request JIRA with a detailed description of what you are trying to accomplish. Then we will use this as one of the inputs for our feature planning.

Thanks!


 

paul

unread,
Mar 19, 2021, 8:41:55 AM3/19/21
to Kogito development mailing list
hi,

Ah, what a shame! I'll raise a feature request. 

To call it a "debugger" is a bit of a stretch, it's effectively a replay of the evaluated model but it's good enough for now. To make it a "proper" debugger wouldn't be too hard I suppose...<thinking/>

Essentially what I've done is implement a DMNRuntimeEventListener which captures the before/after events and enhances the event information where possible. For example in afterInvokeBKM I capture the parameters & the values that were passed to the bkm.

I create a JsonObject representation of each event and associated data and add it to a simple List<JsonObject>. I post process this list to make it easier to work with (for example I collapse consecutive, related events such as before & after contextEntry into a single JsonObject). Then I dump the whole list to disk as json.

Finally, I have a simple (horrible!) little bootstrap app that lets me step through the serialised json list an object at a time and tries to represent the callstack, dependencies etc.

I was hoping to integrate this into the existing DMN editor so I could show the evaluated result next to each context entry.

If you'd still like to see it I'll happily share what I have once it's a bit more joined up.

Cheers,
Paul.

Michael Anstis

unread,
Mar 19, 2021, 9:03:08 AM3/19/21
to Kogito development mailing list
> Essentially what I've done is implement a DMNRuntimeEventListener which captures the before/after events and enhances the event information where possible. For example in afterInvokeBKM I capture the parameters & the values that were passed to the bkm.

> I create a JsonObject representation of each event and associated data and add it to a simple List<JsonObject>. I post process this list to make it easier to work with (for example I collapse consecutive, related events such as before & after contextEntry into a single JsonObject). Then I dump the whole list to disk as json.

This is what Trusty adds to kogito applications; so it's even plausible some of this is available out of the box.

I've BCC'ed Daniele Zonca the Trustry architect.

--
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/3d8f15d9-ac83-41fa-92b6-f63e071f9847n%40googlegroups.com.


--

Michael Anstis

Principal Software Engineer

Red Hat

paul

unread,
Mar 19, 2021, 9:07:32 AM3/19/21
to Kogito development mailing list
I did look at Trusty - from what I could tell it seemed to need kafka setting up which was a bit too much for my use case.

If I could get this out of the box though without the infrastructure overhead that would be great :)
Reply all
Reply to author
Forward
0 new messages