Hi,<br>I have rules (drl format strings) stored in a database column in a schema like MyRules(rule_id integer, name text, rule text, enabled boolean ... )<br>I query the db to get them and iterate over the rows and add using KnowledgeBuilder.add() using String.getBytes. (I dont want to move to guvnor as of now)<br>
some rules might have compilation errors, hence the KnowledgeBuilder.hasErrors() is set to true.<br>those will not be added to the package by the PackageBuilder.<br><br>My problem is to log the error causing rule_id and the error message.<br>
KnowledgeBuilderErrors dosent expose the internal errors list so that I could see if any new errors are in the arraylist from the last time error seen time and log them.<br>But only solution i could think of is using the low level api of using DrlParser to pre-parse it to check for errors+log and add to the kBuilder if its not failed.<br>
<br>is there any elegant way to do this? <br><br>I am using drools-5.2.0.final<br><br><br><br clear="all"><br>-- <br>Regards,<br>Sandeep Bandela.<br>
<br>