0

I am using KnowledgeAgent and change-set.xml to keep track of any changes to rules in run-time.

With standard configuration from JBoss docs it generally works fine. I have also set knowledgeAgentConfiguration.setProperty("drools.agent.newInstance", "false"); So KnowledgeBase is updated with every change.

Problems start when some change in rules cause KnowledgeBuilder errors. E.g. If I change System.out.println( message ); to System.out.println( message it will of course cause some error messages from Agent.

But then even If I fix the rule Agent won't notice that, as well as any further change. It will remain using last correct build before error.

Is that desired behavior?

Is there way to force Agent to keep tracking rule after such error?

I am using version 5.1.1

Thanx!

Purple
  • 711
  • 2
  • 10
  • 19
  • 1
    Try a later 5.x version. - But it would appear that the "Agent" feature has never reached its goals: in 6.x there is no KnowledgeAgent any more. - Java has (in java.nio.file) sufficient resources to implement (in combination with Drools' own Builder API) to write an agent that does what you think it ought to do. (But, permit me to say, using an Agent to update a rule base via trial and error is not a good strategy.) – laune Nov 18 '15 at 10:39
  • Thank you. It appears that in 5.6.0.Final version it works as I wanted. I agree that it's not a good strategy, but without it small typo could force me to restart whole app. – Purple Nov 18 '15 at 11:03
  • One can always use an offline syntax check before deploying a DRL file. Writing elaborate code to guard against flawed deployment seems to me as putting the cart before the horse. – laune Nov 18 '15 at 12:56

1 Answers1

0

As @laune suggested I tried newer version and it appears to not be an issue in 5.6.0.Final (maybe in some previous to, but I didn't check it).

Purple
  • 711
  • 2
  • 10
  • 19