How to get all rules from DMN table JAVA

I have some DMN rule like

Input Season
Spring -> output -> rainy, 25C
Winter -> output -> snow, -5C

I like to get all rule like

{
   "ListOfRule":[
      {
         "Season":"Spring",
         "env":"rainy",
         "temperature":"25"
      },
      {
         "Season":"Winter",
         "env":"snow",
         "temperature":"-5"
      }
   ]
}

my java code loop all seasons to get a result

      List<String> seasons =  Arrays.asList("Spring", "Winter", "Fall");

      for (String season: seasons) {

        VariableMap variables = Variables
                .putValue("season", season);
        
        DmnDecision decision = dmnEngine.parseDecision("decision", inputStream);
        // evaluate decision
        DmnDecisionTableResult result = dmnEngine.evaluateDecisionTable(decision, variables);
      }

not sure this is the right way to get a result because this code loop all table to get the result

thanks

Can you explain a little bit about why you’re doing this?