Conversation
lucamolteni
left a comment
There was a problem hiding this comment.
This PR introduces a whole lot of Drools inside YaRD.
It does it directly, as its resulting syntax is very similar to Drools'.
The problem is that the current YaRD syntax is pretty different from Drools', as it's heavily inspired by DMN instead. So with this PR it feels like having Drools and DMN together in a single file, which seems a bit confusing.
For scorecards specifically I'm not sure we need this feature, so I wouldn't merge as it is. Perhaps I'm wrong and the users will need this from day one, but I still think we should design the YAML syntax first.
| @YamlSubtype(alias = "DecisionTable", type = DecisionTable.class), | ||
| @YamlSubtype(alias = "LiteralExpression", type = LiteralExpression.class) | ||
| @YamlSubtype(alias = "LiteralExpression", type = LiteralExpression.class), | ||
| @YamlSubtype(alias = "Rules", type = RuleExpression.class) |
There was a problem hiding this comment.
If I understand correctly this is putting a whole Drools like syntax dialect inside the current AST of YaRD, which I'm not necessarily against but it seems very different to what we have now.
Currently there is no documentation nor specification of what YaRD should be so this seems like a risky change
| import java.util.HashMap; | ||
| import java.util.Map; | ||
|
|
||
| public class MVELLER { |
There was a problem hiding this comment.
This (and its test) needs definitely a better name i.e.
MVELExpression
MVELThen
Examples of the added feature are in
yard-core/test/rulesfolder.Few notes about this.
Things to add later:
Things to reconsider: