droolsfiddle / drools-fiddle

The fiddle for Drools
Apache License 2.0
30 stars 25 forks source link

[BUG] Changing DRL after build and submit #15

Open AmielPouzat opened 6 years ago

AmielPouzat commented 6 years ago

If you Declare a fact in you DRL, and you build and submit at least one fact. If you change the attribute you instantiated into you fact, into your DRL, and then you build and submit without checking what you are submitting, then you will encounter the bug. Example :

declare Fact
  i : int
  s : String
end

Then you Submit a fact, new Fact(0, "test") via the submitting button of drools-fiddle. After it, you change the declaration, by deleting the attribute s

declare Fact
  i : int
end

Then you build and submit without checking the Drools Fact windows. As the JSON will construct a fact based on `Fact(0, "test") , drools-fiddle will add a item String with the value "test", and try to submit it. You will encounter the bug.