Makes the rather ugly assumption that there is only one rule match for a decision - which was previously the case
(self, context)
| 56 | self.dmnEngine = DMNEngine(self.decision_table) |
| 57 | |
| 58 | def decide(self, context): |
| 59 | """Makes the rather ugly assumption that there is only one |
| 60 | rule match for a decision - which was previously the case""" |
| 61 | if not isinstance(context, dict): |
| 62 | context = {'input': context} |
| 63 | task = Task(self.script_engine, context) |
| 64 | return self.dmnEngine.decide(task)[0] |
| 65 | |
| 66 | def result(self, context): |
| 67 | task = Task(self.script_engine, context) |