gorules / jdm-editor

JDM Editor is an open-source React component for crafting and designing JDM (JSON Decision model) files.
https://gorules.io
MIT License
143 stars 37 forks source link

Creating a decision table with a description column with no entry causes loading the graph in zen engine to fail #116

Open raymondKelly opened 2 days ago

raymondKelly commented 2 days ago

When I create a new decision table a description field is added for each row. When I do not touch the description field it gets set as "_description": null in the graph json. When that graph is then loaded into a zen engine, the zen engine fails to create a decision.

  //Execute
  let decision: ZenDecision;
  try {
    decision = engine.createDecision(rule);
  } catch (error) {
    throw error; // This gets called when the decision table includes rule with "_description": null
  }

Example decision table setup

Screenshot 2024-11-15 at 10 48 54 AM

Notes: Make sure not to enter any value in the description field so that it remains null