Open yesamer opened 9 months ago
@tiagobento I updated the above description, discarding the 3rd solution option and adding another problem I faced with the current architecture in the last few days.
However, I think we need to make a decision about the direction of this feature, based on our future tooling strategy. The key point is: Should we have this feature working on VSCode only, or do we need it in the Sandbox too? Before replying, consider that such functionality is required by RULE-based scesim, and might be very useful in the case of a DRL editor. Relying on the current solution means not having that feature enabled in the Sandbox. I guess that clarifying this point can drive us to choose the better solution. Considering the problems we had maintaining the current architecture and the fact it works on VSCode only, I would prefer to explore the second solution.
To know more about the feature, I invite you to take a look at my below blog post. https://blog.kie.org/2022/05/dmn-types-from-java-classes.html
The architecture behind that feature has some weak points, in detail:
Based on the above reasons, we decided to temporarily not enable the "Import Java Classes" in the new DMN Editor, to investigate and assess a more robust solution, which is the scope of this ticket.
Possible solutions so far:
Using a Java parser that reads the Java Classes AST and returns the requested info (Java class names and public methods). A NodeJS library for that already exists (here), I tested it in this repo https://github.com/yesamer/java-parser-poc.This approach has a lot of limitations.Another point to underline is that the feature is a key one for the Test Scenario too, as we need it for RULE-based Test Scenario.