For article - thoughts on Kogito DMN Modeller, embedded as Excel Add in?

296 views
Skip to first unread message

Paul Browne

unread,
Aug 6, 2022, 5:07:09 AM8/6/22
to Kogito development mailing list
Hi All,

I'm currently writing an article for Excel Power users, introducing them to Rule Engines (KIE/ Drools) as they grow beyond what Excel can do for them.

Looking to reduce the "friction" as they move to KIE / Drools, and was considering an Excel Add-In embedding the Kogito DPN modeller. That way readers stay within a familiar environment (Microsoft Excel) , but have the Task Pane (effectively a web page, on the right hand side of the UI) to carry out DM edits, using the data in the Excel sheet.

Note that Excel Add Ins work in both the Desktop and Online (365) versions of Office. they are more UI focussed than the recently released Office script (a VBA replacement)

Not started coding / prototyping, but this might be as straightforward as embedding the KIE Standalone modeller (https://sandbox.kie.org/standalone/dmn/index.js) into a simple Excel Task add in (e.g. 10 minute quick start https://docs.microsoft.com/en-us/office/dev/add-ins/quickstarts/excel-quickstart-jquery?tabs=yeomangenerator).

Of course, there would need to be some some simple Javascript in the Excel add in to convert Excel data to and from JSON calls. And the DMN Runner would still be needed in the background (KIE Sandbox Extended Services) - but the Team have this already packaged as an easy to use EXE.

Still at the "nice idea" stage, wondering if the the team / community have any thoughts on this?

Paul

Matteo Mortari

unread,
Aug 6, 2022, 5:53:48 AM8/6/22
to Kogito development mailing list
Hi Paul,

I've been experimenting with a very similar idea last year, here are my notes: https://www.youtube.com/watch?v=zE1H9WGNocY

The "convention" for the decision table I referred to in the video, is described here: https://github.com/kiegroup/drools/tree/main/kie-dmn/kie-dmn-xls2dmn-cli#formalising-decision-table-in-the-spreadsheet-file
So far, we've seen this concept being useful as a command line utility eg here or even here.

If I were to iterate on this excel add-in experiment again, I would keep the DMN modeler as a view-only projection of the content of the excel file, while a side pane could be helpful for the JITRunner supplying input data with the rendered form you can see indeed from the Kie Sandbox, and see immediately the result output values there.

Does the video showcase the same concepts you were thinking of ?

If there is interest, I could share the excel add-in experiment code I've shown in the video on a public repo, if the community is interested to contribute/iterate on it.

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/097953ae-cb71-4c50-bb52-d293973a6e09n%40googlegroups.com.


--

Rhett S

unread,
Aug 6, 2022, 2:18:40 PM8/6/22
to Kogito development mailing list
interesting conversation. 
I'm trying to understand the value of the "excel add-on".  Let me breakdown what I mean:

VSCode DMN Model Editor: a edit/view tool to help humans visualize DMNs.
DMN XML: XML that follows XSD as defined by OMG group; good for persistence; good for uploading into DROOLS; bad for direct editing.
Excel: a microsoft tool that saves tablular data in XML (XSLX). effective tool for viewing/editing large decision-tables; popular with biz analysts (turns out there is a XSD for XSLX: https://docs.microsoft.com/en-us/openspecs/office_standards/ms-xlsx/6624db33-496c-47f7-a562-a54cb01b133f)

So what would this plug-in do? Would it convert the XSLX-XML to DMN-XML and validate it? Personally, I think that is a cool idea but I also would recommend to put as much of that code into a microservice, such that plugin does as little work as possible. That way, this functionality could also be in a Excel-online script and a SharePoint workflow- maybe- for better enterprise support.  just an idea!! you probably have others. 

yea MM/KIE has good templates to start from:

Paul Browne

unread,
Aug 6, 2022, 4:01:57 PM8/6/22
to Kogito development mailing list
Matteo and Rhett,

Really good replies - and to be honest both of you are coming from an angle that I hadn't though of (Enhancing the Excel as Rule Editor Experience). Looking back at the title of my post, I can see why it can be read that way.

Maybe a better title is "Excel Add in, embedding DMN Modeller on side pane, allows calling Kie / Drools passing in Excel data as model to execute rules".  So no enhancement to the rule editor experience, the focus is on translating Excel data to JSON and passing that to the KIE service.

Maybe a quick explanation of the use case would help: .

* My previous book l tried and failed to write for Excel Power users (as people who are often business analysts/ potential business rule authors). The biggest complaint being that users still needed to install and understand Java, it had about 25 pages of quite technical install instructions.  Book link - https://www.amazon.com/JBoss-Drools-Business-Rules-Browne/dp/1847196063
* 10+ years on , with the huge investment of time in the KIE tooling, and the availability of the Docker container and KIE sandbox,  it's worth trying to write the book again for Excel power users. Not every reader will have an IT department to support them (as they explore a new area) so the onboarding to a new (and complex) tool needs to be as gentle as possible.
* A good first step is keeping the data in Excel, and calling the rules engine passing in the Excel data. The Add in can translate Excel data to JSON , call KIE / Drools to excute a the DMN model, and then use the json results to update the Excel sheet.
* It may feel to the user that the the Rule Engine is just a more powerful Excel formula. But it does opens up rule engines to a much wider audience.

There are other options - this can be done already using Visual Basic for Applications (VBA), Office Javascript (both embedded in Excel), or an external Python or Excel script. But the Excel Add-on approach makes the experience a lot more polished for users.

So your responses validate that I'm not (completely) crazy in my thinking. I'll continue to explore, and more thoughts / suggestions are always welcome!

Thanks

Paul

Matteo Mortari

unread,
Aug 7, 2022, 11:21:13 AM8/7/22
to Kogito development mailing list
Paul,
thank you for elaborating further; if your goal is specifically testing, I would strongly recommend you get in touch with the Kogito Tooling team here on this mailing-list to further iterate on your idea in relation to the Test Scenario Simulation tool.

The v7 series SceSim had an import/export capability, based on CSV, which may get you quite close [screenshot attached].

I am not aware if/how the Kogito version of the SceSim in VSCode/Kie Sandbox enables that, but given the capabilities offered by the Excel Add-In framework, it should be possible for you eventually not to rely on CSV format, but directly for you to import/produce the XML based .scesim file instead.

It might be worthwhile indeed to double-check with the Tooling team before venturing further in your coding, if there are anything specific or planned changes with regards to the file .scesim format, to avoid potential problems down the line.

Hope this helps!
MM

Screenshot 2022-08-07 at 17.14.05.png

Jozef Marko

unread,
Aug 8, 2022, 2:13:44 AM8/8/22
to kogito-de...@googlegroups.com
You can contact Yeser Amer from the Kogito Tooling team.



--
Regards, Jozef
RHBA Quality Engineer

Paul Browne

unread,
Aug 8, 2022, 4:42:45 AM8/8/22
to Kogito development mailing list
Thanks Jozef, Matteo - I have sent Yeser a message directly on Zulip.

Happy to share the results of that conversation here if it helps the wider community.

Paul
Reply all
Reply to author
Forward
0 new messages