1

I am developing a DMN plugin for JQAssistant (https://github.com/remast/jqa-dmn-plugin). I know how to handle the DMN itself. Now I want to create relations for all Java calls to the DMN decision table.

One way to invoke the decision table in Java is:

DmnDecisionTableResult dishDecisionResult = decisionService.evaluateDecisionTableByKey("dish", variables)

I have figured out how to query all invokations of the method evaluateDecisionTableByKey. But how can I get access to the parameter "dish"?

In my DMN plugin I have included a sample application at https://github.com/remast/jqa-dmn-plugin/tree/master/example. The code above is taken from this example. I am trying to link the Java calls to the DMN decision table in the sample application.

remast
  • 33
  • 5
  • AFAIK the parameter values were not stored in the jQA database as they are not considered relevant for architecture purposes. Seems you need some additional information in the graph. You can do that by creating a plugin that extends the Java plugin and add all the information you need. Or you decide to put the entire AST into the graph. For that you may want to give the JavaParser plugin https://github.com/kontext-e/jqassistant-plugins/blob/master/javaparser/src/main/asciidoc/javaparser.adoc a try which basically puts the AST created by JavaParser into the graph. – Jens Nerche Feb 24 '20 at 06:53
  • First of all congrats for the plugin! It's actually not about the AST, it is more about data flow analysis which would be required. Doing this is possible with both AST and bytecode but it's not trivial. Maybe we can find a shortcut if the literal ("dish") is passed directly as a parameter, the data model already includes something similar for values of static fields. – Dirk Mahler Feb 24 '20 at 09:20
  • Ok thanks! I`d be curious to find out more about the "shortcut" you mention. If I don't find a way I will need to create an annotion that I can use to relate the Java class to the DMN decision. – remast Feb 24 '20 at 19:59

0 Answers0