In dmn engine rule, I can evaluate decision/table only by passing variables

XMLWordPrintable

    • Type: Feature Request
    • Resolution: Won't Fix
    • Priority: L3 - Default
    • None
    • Affects Version/s: None
    • Component/s: dmn-engine
    • None

      Provide option in DmnEngineRule to evaluate decision/table only by passing variables. An example follows of current/expected code. That will reduce the amount of code and improve the user experience while writing testing code.

      Current:

      public class DecisionTest {
      
        @Rule
        public DmnEngineRule dmnEngineRule = new DmnEngineRule();
      
        @Test
        public void test() {
          // given
          // load decision
          //...
          VariableMap variables = Variables.createVariables();
      
          // when
          DmnDecisionResult result = dmnEngine.evaluateDecision(decision, variables);
      
        }
      }
      

      Goal:

      public class DecisionTest {
      
        @Rule
        public DmnEngineRule dmnEngineRule = new DmnEngineRule();
      
        @Test
        public void test() {
          // given
          // load decision and 
          // pass the dmn key to the dmnEngineRule 
          //...
          VariableMap variables = Variables.createVariables();
      
          // when
          DmnDecisionResult result = dmnEngineRule.evaluateDecision(variables);
      
        }
      }
      

            Assignee:
            Unassigned
            Reporter:
            Yana Vasileva
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: