Split in rule flow in drools
by bjs
Hello everyone,
I have doubt about the use of split in the rule-flow.
I created a split with constraint1 and constraint2.
But even if condition in constraint2 is fulfilled by a fact it fires the
rules under constraint1 branch if the rules fulfill the when clause under
constraint1 branch.
This should not be the case cause the split should mean the rules in the
branch under constraint2 should be fired.
--
View this message in context: http://drools.46999.n3.nabble.com/Split-in-rule-flow-in-drools-tp4030378....
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 5 months
Caching in Drools 5.5.0
by Rajeswari
We are using Drools 5.5.0 and have created Models and Rules via the
Workbench.
>From our application code, we create model classes and the models are then
modified depending on the rules configured and the modified objects are used
further in our code.
Example:
RuleModel - is a model containing fieldName and resultList.
Several rules are written to return an appropriate resultList depending on
the value of the fieldName.
We would like to implement Caching here. At several points within our
application, we create these RuleModel with sometimes the values of the
fieldName being the same - How can we cache the RuleModel (after it gets
modified by applying the rules for the first time)
Eg: RuleModel with value of fieldName as F1
RuleModel with value of fieldName as F2
all needs to be in cache. Anytime the application needs the object with F1
for the next time, we would use that insteading of having to apply the rules
again.
We will further put it in a feature to refresh this cache at regular
intervals.
--
View this message in context: http://drools.46999.n3.nabble.com/Caching-in-Drools-5-5-0-tp4030374.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 5 months
Evaluations are increasingly slower
by sumantp
Hi,
I have a rule that looks for 2 consecutive events for the same entity. To
stress test it, I inserted 10K consecutive events. I'm calling
fireAllRules() after each event is inserted. I'm printing out timestamps
after every 100 events. I'm noticing that insertions/evaluations are
increasingly slower. Here's the rule :
rule "Consecutive events"
when
$latest : Event($id : id) // newest event
not Event(id == $id, this after $latest) // no events after the newest
$previous : Event(id == $id, this before $latest) // event before the
newest
not Event(id == $id, this before $latest, this after $previous) // no
events between $latest and $previous
then
//System.out.println($latest.toString());
end
It is my understanding that the above rule should only match the latest 2
events and automatic memory management should remove older events. If so,
why are insertions progressively slower? Interestingly,
ksession.getObjects() returns all the events inserted and not just the
latest 2 events. Is my understanding of the rule incorrect? Does the rule
somehow force all events to stay in memory?
Thanks,
Sumant
--
View this message in context: http://drools.46999.n3.nabble.com/Evaluations-are-increasingly-slower-tp4...
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 5 months
Drools installation issues
by kylekg93 .
Hello,
I'm having some issues starting up drools within Eclipse. I am running
windows 8 with the Luna version of Eclipse. I have installed the GEF plugin
and installed the DROOLS plugin using the update site. However, when I try
and load examples, it appears I am missing dependencies/plugins. When I
import anything in regards to KieServices, it fails. I also get an error
that says 1.8 is not a valid language. Maybe I am just missing a big step,
but I did follow the documentation. I would really appreciate some
assistance. Like I said, maybe I've just missed a step...
Thank you,
Kyle Gillen
10 years, 5 months
conditions getting removed from Guided Rule
by Sumit Dhaniya
I'm creating a rule in which I'm comparing properties of two objects. All
works well I'm able to compare their properties and rule gets validated as
well and then I close the rule, but when I open the rule again properties of
second object in condition don't show up in guided editor however they are
present if I check the source of the guided rule.
Moreover it also doesn't allows me to use _id variable which is present in
my class whereas there is no issue if I use any other variable name id this
due to "_"?
--
View this message in context: http://drools.46999.n3.nabble.com/conditions-getting-removed-from-Guided-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 5 months
check list size
by Sumit Dhaniya
I have a class which contains some lists, I want to apply rules on size of
list and want to use functions like first(), last() but list objects which
are in my class are identified as collections and only collection related
functions are shown.
For eg.
class A {
java.util.List bList = new ArrayList();
}
now it shows bList as collection type and it doesn't shows size and related
list function instead shows collection functions like contains etc.
Can't I use it like both a collection as well as List?
I tried importing java.util.List but it still don't recognize my List
objects as List
--
View this message in context: http://drools.46999.n3.nabble.com/check-list-size-tp4030303.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 5 months
drools-wb 6.1.0.CR1-wildfly - error when upload jar M2 Repo
by jps
Hello,
I've installed kie-drools-wb-distribution-wars-6.1.0.CR1-wildfly with all
the defaults - i.e m2 repo is in WIDLFLY_HOME/bin/repositories/kie) and
everything works fine so, except that I can't manage to upload a JAR.
The JAR I'm trying to upload is a mavenized JAR, it has no dependencies but
a parent pom. I get this Exception in the logs :
16:33:54,459 ERROR [io.undertow.request] (default task-9) UT005023:
Exception handling request to
/kie-drools-wb-distribution-wars-6.1.0.CR1-wildfly/org.kie.workbench.drools.KIEDroolsWebapp/m2repo/file:
java.lang.LinkageError:
com/ning/http/client/providers/netty/NettyAsyncHttpProvider
at
org.sonatype.maven.wagon.AhcWagon.openConnectionInternal(AhcWagon.java:150)
[wagon-ahc-1.2.1.jar:]
at
org.apache.maven.wagon.AbstractWagon.openConnection(AbstractWagon.java:105)
[wagon-provider-api-1.0.jar:1.0]
at
org.apache.maven.wagon.AbstractWagon.connect(AbstractWagon.java:207)
[wagon-provider-api-1.0.jar:1.0]
at
org.sonatype.aether.connector.wagon.WagonRepositoryConnector.connectWagon(WagonRepositoryConnector.java:345)
[aether-connector-wagon-1.13.1.jar:]
at
org.sonatype.aether.connector.wagon.WagonRepositoryConnector.pollWagon(WagonRepositoryConnector.java:385)
[aether-connector-wagon-1.13.1.jar:]
at
org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:571)
[aether-connector-wagon-1.13.1.jar:]
at
org.sonatype.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:60)
[aether-util-1.13.1.jar:]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
[rt.jar:1.7.0_11]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
[rt.jar:1.7.0_11]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_11]
16:33:54,463 ERROR [stderr] (pool-14-thread-1) Exception in thread
"pool-14-thread-1" java.lang.LinkageError:
com/ning/http/client/providers/netty/NettyAsyncHttpProvider
16:33:54,464 ERROR [stderr] (pool-14-thread-1) at
org.sonatype.maven.wagon.AhcWagon.openConnectionInternal(AhcWagon.java:150)
16:33:54,464 ERROR [stderr] (pool-14-thread-1) at
org.apache.maven.wagon.AbstractWagon.openConnection(AbstractWagon.java:105)
16:33:54,471 ERROR [stderr] (pool-14-thread-1) at
org.apache.maven.wagon.AbstractWagon.connect(AbstractWagon.java:207)
16:33:54,472 ERROR [stderr] (pool-14-thread-1) at
org.sonatype.aether.connector.wagon.WagonRepositoryConnector.connectWagon(WagonRepositoryConnector.java:345)
16:33:54,473 ERROR [stderr] (pool-14-thread-1) at
org.sonatype.aether.connector.wagon.WagonRepositoryConnector.pollWagon(WagonRepositoryConnector.java:385)
16:33:54,473 ERROR [stderr] (pool-14-thread-1) at
org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:571)
16:33:54,474 ERROR [stderr] (pool-14-thread-1) at
org.sonatype.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:60)
16:33:54,474 ERROR [stderr] (pool-14-thread-1) at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
16:33:54,474 ERROR [stderr] (pool-14-thread-1) at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
16:33:54,475 ERROR [stderr] (pool-14-thread-1) at
java.lang.Thread.run(Thread.java:722)
I also try to upload my parent pom ... but I get an error message "The JAR
does not contain a valid pom" ... of course it's not a JAR, it's just a
pom.xml
Can someone give me some hints on how to do this ?
Can I workaround and do a "mvn install" to put the JAR in the REPO under
WIDLFLY_HOME/bin/repositories/kie ?
Any help or hint would be appreciated.
Regards
-JPS
--
View this message in context: http://drools.46999.n3.nabble.com/drools-wb-6-1-0-CR1-wildfly-error-when-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 5 months