drools-expert: Log atomic assertions !?
by bholzer
Is wonder how to log atomic assertions (i.e. the results of the Rete-Nodes -
visits ) ?
I tried the three Debug*EventListeners, but they're too coarse-grained.
As a workaround, I patched org.drools.reteoo.AlphaNode.assertObject(...) as
follows:
public void assertObject(...) {
final AlphaMemory memory = (AlphaMemory)
workingMemory.getNodeMemory( this );
boolean allowed = this.constraint.isAllowed(factHandle,
workingMemory, memory.context );
*log("Eval of " + this.constraint + " on " + factHandle.getObject()
+ ":" + allowed);*
if ( allowed ) {
this.sink.propagateAssertObject(factHandle, context,
workingMemory);
}
}
Is there a better way to archieve my goal ?
--
View this message in context: http://drools.46999.n3.nabble.com/drools-expert-Log-atomic-assertions-tp4...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 2 months
Drools Planner - split and join parallelism
by Willem van Asperen
Hi All,
I have an idea that I would like to bounce of the list.
As far as I understand, Drools Planner does not do any parallel
searching. It uses a single solver thread that does all the work.
What if I would forage not only the best solution so far, but a couple
of "promising" solutions and split these off to run on a separate
thread. I would split these itteratively down to a given level of iteration.
When these threads return I would then pick the best solution from the
returned values.
Using a multi-core box or even a server farm I could massively increase
the searched problem space and do it without loosing too much time (some
parallel management overhead).
Has anyone thought of such scheme before? Any luck in implementing?
Do you see any flaws?
Just a thought.
Regards,
Willem
13 years, 2 months
Rules with variable timers
by Shannon Hastings
Is there a way to write a rule in DRL that uses a timer or something that is dynamic. I.E. I want the time that rule waits to fire to be dependent on a variable such as below:
rule "CheckDoseMissed"
no-loop
timer(int: $eventA.sleepTime)
when
$eventA : MyEvent()
………..
----------
Shannon Hastings
Inventrio
shannon.hastings(a)inventrio.com
(614) 389-2795 ext: 101
http://www.inventrio.com
13 years, 2 months
help with designing / implementing a way for users to write their own rules
by kurrent93
Dear drools experts
Can I get some ideas on how best to do the following.
I would like users of my app to be able to write their own rule(s). For
example, if Joe User buys an item that is more that $200 then he uses XYZ
shipping. If he does not select shipping the he uses ABC shipping.
More precisely, how can I offer the ability, using Guvnor, for the end user
to write a rule, that does not give him the ability to modify a rule
condition regaring user id. The example above, of coures, has a condition
that if user is 'Joe User'.
There are very many places in the app where users should be able to write
rules, so it would be nice to use (embed) guvnor, rather than writing a
special UI for each situation.
Any suggestions welcome.
Br
Anton
--
View this message in context: http://drools.46999.n3.nabble.com/help-with-designing-implementing-a-way-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 2 months