Decision table -1 java file per rule - optimization
by jalex
Hi,
I noticed that each row in the decision table speadsheet is converted to a
separate java file during runtime (ex:
Rule_Pricing_bracket_352_941a618e0e72407d89d04664d5809e7f.java) . This will
lead to the number of classes increasing as the number of rules grow. Is
there a way to optimize such that all rules in 1 spreadsheet gets converted
to a single java file?
Sample logs during runtime, each "rule applied" log corresponds to firing
of a single row
04/29/2013 15:33:22,434 DEBUG [http-9080-1]
(Rule_Pricing_bracket_352_941a618e0e72407d89d04664d5809e7f.java:8)
aa410236-727c-4d48-8761-79088dca9b31 Rule applied: Default_A_rule40
04/29/2013 15:33:22,435 DEBUG [http-9080-1]
(Rule_Pricing_bracket_201_e2c74982a30d4e8eb128f07fbba73803.java:8)
aa410236-727c-4d48-8761-79088dca9b31 Rule applied: Default_B_rule40
04/29/2013 15:33:22,436 DEBUG [http-9080-1]
(Rule_Pricing_bracket_50_5de087aa5a3345adbc06748474dc53b3.java:8)
aa410236-727c-4d48-8761-79088dca9b31 Rule applied: Default_C_rule40
--
View this message in context: http://drools.46999.n3.nabble.com/Decision-table-1-java-file-per-rule-opt...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years
having trouble using accumulate to create a list of non null objects
by burmanator
I have 2 objects, Foo and Bar. Foo can store an instance of Bar. I am trying
to create a list of all the Bar objects that correspond to all the Foo
objects with a given name.
the line in my rule I am using is:
Foo($name : Name)
$list : List() from accumulate( Foo( Name == $name, $b : Bar != null),
collectList($b))
Yet when I print out the list, it includes null elements. But if I instead
make the rule:
$list : List() from accumulate( Foo( Name == $name, $b : Bar != null),
collectList($b!=null))
I get false for all the null Bar objects.
Am I missing something?
--
View this message in context: http://drools.46999.n3.nabble.com/having-trouble-using-accumulate-to-crea...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years
KnowledgeAgent to update knowledge base built with Guvnor pkg
by riri
Hello everyone,
I am trying to take advantage of the automatic uploading that the
KnowledgeAgent provides and am using the 5.5.Final Drools version. The
Drools Expert documentation states that one can use an existing knowledge
base to create an agent, and the agent will subscribe to the resources that
it finds (Example 3.26. Using an existing KnowledgeBase).
I am at first creating the knowledge base using a set of .drl files defined
in a change-set file and also a Guvnor url :
http://127.0.0.1:8080/guvnor/org.drools.guvnor.Guvnor/package/<package-name>/LATEST.
I then create the knowledge agent as shown in Example 3.26 of the
documentation. The problem is that if I modify the Guvnor package (add or
remove a rule) and then rerun a stateful knowledge session, the knowledge
base is not updated. I thought that I needed to build the package in Guvnor
every time I modify it but doing so does not solve the problem. Modifying
the rules in the change-set files seems to update the knowledge base.
I start the ResourceChangeScanner and ResourceChangeNotifier and if I call
isMonitorChangeSetEvents() and isScanResources() they return true. And also,
whenever I create a session, I use the getKnowledgeBase() method and am not
caching it somewhere in my program. Should I not be creating the agent with
an existing knowledge base and instead use the applyChangeSet() method? If
so, how would I be able to configure the knowledge base to use
AssertBehaviorOption.EQUALITY?
Thany you very much for any help or tips to point me in the right direction.
Best regards
--
View this message in context: http://drools.46999.n3.nabble.com/KnowledgeAgent-to-update-knowledge-base...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years