Re: [rules-users] Upload POJO model, no facts are imported
by rjr201
When you upload the Jar file you have to then go to 'File'->'Save' and check
it in. If the objects still don't appear, try going to the edit tab on the
package and looking at the list under "Configuration: Imported types". If
there is nothing in this list, click on the green cross and see if you can
add your objects from there. If you can't then there is probably something
wrong with the Jar file you've uploaded. Make sure that's it's a non
compressed jar file, this has caused me problems in the past.
Hope that helps,
Rich.
--
View this message in context: http://drools.46999.n3.nabble.com/Upload-POJO-model-no-facts-are-imported...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 11 months
Re: [rules-users] Importing existing drl into Guvnor
by droolist
"I have some requirement of building specific rules from same package , Can
we achieve this by maintaining guvnor repository from external RDBMS ?"
When you say build, I assume you mean packaging. Yes, Guvnor provides
selectors - built in selector using status and categories. And there is
custom selector where you can provide your selection logic.
"how can we achieve this requirement of firing specific rules under specific
conditions when I am using guvnor for managing rules"
Besides salience and agenda-group as mentioned by Abhinay, take a look at
AgendaFilters. You can use some custom metadata and use that in your custom
AgendaFitler to accept firing of certain rules.
--
View this message in context: http://drools.46999.n3.nabble.com/Importing-existing-drl-into-Guvnor-tp40...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 11 months
Issue with parallel StatelessKnowledgeSession
by Marc Mährländer
Hi,
I just tested the performance of Drools Expert for a scenario with a
number of Knowledbases most of them in sequential mode. I experienced
a strange behaviour when executing separated
StatelessKnowledgeSessions in parallel within different threads. In my
testcase, a queue is filled with 20 work items, each containing
indentical data objects approx. 10.000 objects. Consumers are taking
the work items from the queue and executing twelve
StatelessKnowledgeSessions with that input data in a row. The
Knowledgebases for each Thread are created independently. So the
different Threads do not share the same KnowledgeBase (but the
knowledge is created from the same drl files) nor do they share the
same input objects. (but the objects are created from one template as
deep copies).
I'm running on windows with a quad intel i7 cpu. When performing the
test with only one Thread, I need around 31s to empty the queue. When
starting the test with two consumer Threads I would expect the queue
to be emptied within nearly half of the time. But instead, it takes
28s, so only saving 2 seconds. So I start the same test in two
separated processes (virtual machines). I then get a calculated time
of around 17 second to process the 20 work items. So this is more or
less what I would expect.
I have the feeling, that there is some kind of synchronization between
two StatelessKnowledgeSessions, even if they are created independently
from each other. Observing the processes with VirtualVM in sample mode
shows method DefaultAgenda.notifyHalt() on top. That method is
synchronized, but on a local member which should normally not be a
problem
I'm using Drools Version 5.5.0 Final with Oracle JDK 7. There are
several hundert rules within the .drl files. Consumer threads are
created like this:
for (int i=0;i<consumerCount;i++)
{
GroupConsumer consumer = new
GroupConsumer((List<KnowledgeBase>)deepCopy(buildKnowledge()),queue,
"Consumer"+i);
consumers.add(consumer);
}
This is the code to execute the Sessions (Sessions are currently
cached within implementation of the consumers, but creating new
session for every work item does not change behaviour)
for (StatelessKnowledgeSession ksession : sessions)
{
long t1 = System.nanoTime();
ksession.setGlobal("annual_sales", 200000.0);
ksession.setGlobal("annual_assets", 10000000.0);
ksession.setGlobal("FLAG_31_4_INSTITUTE",1);
ksession.setGlobal("RW_INTRA_GROUP", 0.5);
ksession.setGlobal("REPDATE", repdate);
ksession.setGlobal("T3M", t3m);
ksession.setGlobal("T1M", t1m);
ksession.setGlobal("T2W", t2w);
ksession.setGlobal("T6M",t6m);
ksession.setGlobal("T12M", t12m);
ksession.setGlobal("T24M", t24m);
ksession.setGlobal("T60M", t60m);
ksession.setGlobal("DEFAULT_FSA_B825", defaultRating);
ksession.setGlobal("jcalF001","10-xxx-x-xx-xxxx");
ksession.setGlobal("NEW_OBJS", newObjs);
ksession.execute(group);
totalDroolsTime = totalDroolsTime + System.nanoTime() - t1;
group.addAll(newObjs);
newObjs.clear();
}
Is there anything I may have made wrong?
Regards,
--
Marc Mährländer
------------------------------------------------------------------------------------------------------------------------
Sifena Ltd - Dalkeith - Nursery Close - Woking - GU21 4UQ United Kingdom
email: marc.maehrlaender(a)sifena.com
tel: +49 (89) 420 957 312
mobile: +49 (177) 766 2008
12 years, 11 months
ClassCastException: MVELDialectConfiguration cannot be cast to DialectConfiguration
by Peach Wyss
Hy
I get the following error:
...
Caused by: org.drools.RuntimeDroolsException: Unable to load dialect 'org.drools.rule.builder.dialect.mvel.MVELDialectConfiguration:mvel:org.drools.rule.builder.dialect.mvel.MVELDialectConfiguration'
at org.drools.compiler.PackageBuilderConfiguration.addDialect(PackageBuilderConfiguration.java:313)
...
... 42 more
Caused by: java.lang.ClassCastException: org.drools.rule.builder.dialect.mvel.MVELDialectConfiguration cannot be cast to org.drools.compiler.DialectConfiguration
at org.drools.compiler.PackageBuilderConfiguration.addDialect(PackageBuilderConfiguration.java:308)
... 51 more
I'm using drools in a maven project, pom.xml:
...
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-compiler</artifactId>
<version>5.5.0.Final</version>
</dependency>
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-core</artifactId>
<version>5.5.0.Final</version>
</dependency>
...
What could cause this error?
Thanks for your help.
Kind regards,
Peter
12 years, 11 months
UnsupportedOperationException intermitently
by erolagnab
We've upgraded Drools 5.1 to 5.4.0.Final. Everything is great with new
incremental build change-set.However, occasionally we get this error (so
far, 2 different stack trace)java.lang.UnsupportedOperationException
at org.drools.reteoo.BaseLeftTuple.getObject(BaseLeftTuple.java:589)
at
org.drools.reteoo.RuleTerminalNode.modifyLeftTuple(RuleTerminalNode.java:273)
at
org.drools.reteoo.LeftTupleSource.doModifyLeftTuple(LeftTupleSource.java:297)
at
org.drools.reteoo.AbstractTerminalNode.modifyLeftTuple(AbstractTerminalNode.java:104)
at
org.drools.reteoo.CompositeLeftTupleSinkAdapter.doPropagateModifyObject(CompositeLeftTupleSinkAdapter.java:260)
at
org.drools.reteoo.CompositeLeftTupleSinkAdapter.propagateModifyObject(CompositeLeftTupleSinkAdapter.java:275)
at
org.drools.reteoo.LeftInputAdapterNode.modifyObject(LeftInputAdapterNode.java:170)
at
org.drools.reteoo.SingleObjectSinkAdapter.propagateModifyObject(SingleObjectSinkAdapter.java:68)
at org.drools.reteoo.AlphaNode.modifyObject(AlphaNode.java:157) at
org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateModifyObject(CompositeObjectSinkAdapter.java:507)
at
org.drools.reteoo.CompositeObjectSinkAdapter.propagateModifyObject(CompositeObjectSinkAdapter.java:432)
at org.drools.reteoo.AlphaNode.modifyObject(AlphaNode.java:157) at
org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateModifyObject(CompositeObjectSinkAdapter.java:507)
at
org.drools.reteoo.CompositeObjectSinkAdapter.propagateModifyObject(CompositeObjectSinkAdapter.java:421)
at org.drools.reteoo.ObjectTypeNode.modifyObject(ObjectTypeNode.java:314)
at org.drools.reteoo.EntryPointNode.modifyObject(EntryPointNode.java:265)
at org.drools.common.NamedEntryPoint.update(NamedEntryPoint.java:470)
at org.drools.common.NamedEntryPoint.update(NamedEntryPoint.java:370)
at
org.drools.base.DefaultKnowledgeHelper.update(DefaultKnowledgeHelper.java:317)
at
org.drools.base.DefaultKnowledgeHelper.update(DefaultKnowledgeHelper.java:312)AND
java.lang.UnsupportedOperationException at
org.drools.reteoo.BaseLeftTuple.getPrevious(BaseLeftTuple.java:478)
at org.drools.core.util.LeftTupleList.remove(LeftTupleList.java:84)
at org.drools.core.util.LeftTupleList.removeAdd(LeftTupleList.java:65)
at org.drools.reteoo.JoinNode.modifyLeftTuple(JoinNode.java:302) at
org.drools.reteoo.LeftTupleSource.doModifyLeftTuple(LeftTupleSource.java:297)
at
org.drools.reteoo.LeftTupleSource.modifyLeftTuple(LeftTupleSource.java:271)
at org.drools.reteoo.JoinNode.modifyLeftTuple(JoinNode.java:429) at
org.drools.reteoo.CompositeLeftTupleSinkAdapter.doPropagateModifyObject(CompositeLeftTupleSinkAdapter.java:260)
at
org.drools.reteoo.CompositeLeftTupleSinkAdapter.propagateModifyObject(CompositeLeftTupleSinkAdapter.java:275)
at
org.drools.reteoo.LeftInputAdapterNode.modifyObject(LeftInputAdapterNode.java:170)
at
org.drools.reteoo.SingleObjectSinkAdapter.propagateModifyObject(SingleObjectSinkAdapter.java:68)
at org.drools.reteoo.AlphaNode.modifyObject(AlphaNode.java:157) at
org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateModifyObject(CompositeObjectSinkAdapter.java:507)
at
org.drools.reteoo.CompositeObjectSinkAdapter.propagateModifyObject(CompositeObjectSinkAdapter.java:432)
at org.drools.reteoo.AlphaNode.modifyObject(AlphaNode.java:157) at
org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateModifyObject(CompositeObjectSinkAdapter.java:507)
at
org.drools.reteoo.CompositeObjectSinkAdapter.propagateModifyObject(CompositeObjectSinkAdapter.java:421)
at org.drools.reteoo.ObjectTypeNode.modifyObject(ObjectTypeNode.java:314)
at org.drools.reteoo.EntryPointNode.modifyObject(EntryPointNode.java:265)
at org.drools.common.NamedEntryPoint.update(NamedEntryPoint.java:470)
at org.drools.common.NamedEntryPoint.update(NamedEntryPoint.java:370)
at
org.drools.base.DefaultKnowledgeHelper.update(DefaultKnowledgeHelper.java:317)
at
org.drools.base.DefaultKnowledgeHelper.update(DefaultKnowledgeHelper.java:312)I've
searched around and saw https://issues.jboss.org/browse/JBRULES-3713. I've
downloaded the test program and load our rules but can't reproduce the
issue. The similarity between our rules and rules in the test case is that
we do have a rule matched and perform an update on the fact.With my limited
knowledge of drools and how it works internally, i've run out of ideas.SOS,
please help!!!Regards,Trung
--
View this message in context: http://drools.46999.n3.nabble.com/UnsupportedOperationException-intermite...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 11 months
Accessing my Drools rules as a web service in Drools 5.5?
by lamenramen
Hello,
I have built a few simple rules, and I would like to enable access of these
rules as a RESTful service. Smartphones, and non-java clients are going to
call them, pass in some JSON, and then get an answer back in JSON. (Or XML,
that's fine too).
Could someone tell me how to, the general sense (or specific sense if you're
feeling generous), how to start?
I am using Drools 5.5; I saw this thing called a Drools Execution Server
that is a war file in the Drools 5.4 documentation, but in 5.5 has that been
deprecated? I do not see anything in the 5.5 docs about this, so what is
the new way of doing this?
Thanks!
--
View this message in context: http://drools.46999.n3.nabble.com/Accessing-my-Drools-rules-as-a-web-serv...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 12 months