Migrating InsertLogical() to RuleUnit and OOPath

31 views
Skip to first unread message

aas...@gmail.com

unread,
Mar 24, 2023, 7:47:53 AM3/24/23
to Drools Usage
I'm migrating my Drools rules from Drools 7 syntax to OOPath syntax and for this, I have created a RuleUnit. I can't determine what to do with the insertLogical() statements.

I'm following the migration guide:

It says that the insert statements:
   ... then
      insert(new Measurement("monochrome", "false"));
   end

need to be replaced with adding the facts to a DataSource in RuleUnit:
   .... then
      measurements.add(new Measurement("monochrome", "false"));
   end
But what to do with the insertLogical() statements?

Can I bring these facts to RuleUnit or do I need to leave them as is? I cannot select them using OOPath syntax when I go them as is.

Thanks!
Juhan

Toshiya Kobayashi

unread,
Apr 12, 2023, 2:23:49 AM4/12/23
to Drools Usage
Reply all
Reply to author
Forward
0 new messages