MCPcopy
hub / github.com/sartography/SpiffWorkflow / decide

Method decide

tests/SpiffWorkflow/dmn/DecisionRunner.py:58–64  ·  view source on GitHub ↗

Makes the rather ugly assumption that there is only one rule match for a decision - which was previously the case

(self, context)

Source from the content-addressed store, hash-verified

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)

Calls 1

TaskClass · 0.70