Hello community,
I would like to contribute some code to the DmnEngineRule and I would like to know if there is interest of doing so. Following features:
- declarative approach for loading dmn resources
- declarative approach for “deploying”/“activating” specific dmn rule
- convenience methods for “evaluateDecision” and “evaluateDecisionTable”
Example unit test:
@DmnResource(resources = "/rule.dmn")
public class RptNttMatchClassicTest {
@Rule
public DmnEngineRule dmnEngineRule = new DmnEngineRule();
@Test
@DmnDecisionKey(name = "rule-id")
public void rptTTMatchClassicNormaliseProductsTest() {
// given
Map<String, Object> variables = new HashMap<String, Object>();
...
// when
DmnDecisionResult dmnDecisionResult = dmnEngineRule.evaluateDecision(variables);
// then
...
}
}
My idea is highly inspired by the BPMN unit test support!