Creating and deploying rules to Drools and JRules
by Varnit Khanna
Hi,
What will be the best way to achieve the following: We are trying to
create a simple web based interface which will allow our marketing
team to create rules and then deploy them to either jrules or drools
(depending on the client).
Is there some standard "rules language" or library available to achieve this?
Thanks,
VK
14 years, 5 months
Web Service interaction with Guvnor
by Vignesh
Hi,
I am using a Web service which will invoke Guvnor to validate the data that
is being passed as parameter to the rules, but i am not able to do so and I
got some information that we can use Execution Server to use web service to
interact with Guvnor.
If anyone had used this functionality previously, please provide pointers on
how to do this interaction or provide details regarding this.
Thanks,
Viki
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Web-Service-interacti...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 5 months
Bug in Eclipse Download Script
by Lawrence Terrill
There is a little bug in the Eclipse Download Script related to Drools plugin build that I've been meaning to mention. The bug is in the source tree, drools-eclipse/drools-eclipse-build in the file setupEclipse.xml. The target 'checkEclipseJar' mistakenly checks for a hard-coded '.zip' file extension. This target should use the symbolic '${download.extension}'. This only a problem on OSX and Linux machines where the Eclipse archive is a '.tar..gz' file.
Very low priority issue since the subsequent unnecessary 'getEclipseJar' target actually checks to see if the file has changed before actually downloading it again. And so a duplicate download is avoided anyway. But that bug nags me whenever I build Drools.
Thanks! Wasn't sure the 'right way' to report that. I hope this list was OK.
14 years, 5 months
Persistence issue using Oracle
by ramram
Hi All,
I have been using the H2 in memory database to test all my Drools Flow
scenarios using Guvnor and Gwt Console provided. And I have some questions
to ask and was wondering if someone can help. The main plan now is to switch
from using the H2 in memory database to Persist using the Oracle database.
1- What are the files that should be affected in this switch? or where
should I be looking into?
2- Are the tables created dynamically? and under which schema?
3- is there any test case implemented using this technology?
Thnx in advance for your help
Regards,
Ram
--
View this message in context: http://n3.nabble.com/Persistence-issue-using-Oracle-tp417257p417257.html
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 5 months
Re: [rules-users] Dynamic Loading of Rules from BRMS
by Fnu Mahalakshmi
Hi,
I did try to do what you suggested:
My change-set.xml is in my main project folder and I set the URL to point to that file.
kagent.applyChangeSet( ResourceFactory.newUrlResource("change-set.xml"));
But still the file does not get parsed or detected.
I change set has to be in the project folder right as per my understanding?
Thanks.
------------------------------
Message: 3
Date: Sun, 27 Jun 2010 19:03:38 -0300
From: Esteban Aliverti <esteban.aliverti(a)gmail.com>
Subject: Re: [rules-users] Dynamic Loading of Rules from BRMS
To: Rules Users List <rules-users(a)lists.jboss.org>
Message-ID:
<AANLkTikXFyHlZhuOHnvz53rGoJ24TlFAjAoZ-PEV5IM8(a)mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
Hi,
When you execute:
kagent.applyChangeSet( ResourceFactory.newUrlResource("
http://localhost:8280/jboss-brms/org.drools.guvnor.Guvnor/Guvnor.html"));
you need to point to your change-set.xml file and not to guvnor.
Inside you change-set you need to point to each resource you want the agent
take care of. In your example the first two resources have the same URL. It
doesn't look right.
Best,
2010/6/27 jillika iyer <jillika(a)gmail.com>
> hi guys,
>
> I am trying to upload my rules from jboss-brms to my eclipse in order to
> run it against the working memory.
> The following is my code and change-set.xml file and I am getting the
> following error stack ( which is a java error but just attaching it for
> giving more info).
>
>
> I have started the jboss-server and it is connected correctly.
>
> I am getting a java based error which says that it is unable to parse
> change-set.xml and unable to connect to the server.
>
> I just want to know if I am not the right path for creating the required
> change-set.xml file due to which I am getting the java connection error.
>
>
> I have just specified the url path in my change-set file and the types of
> files it should be looking out for.
>
> What else do I need to incorporate for it to connect to the server???
>
> Please help me. I am relatively new to Drools.
>
> Code in my Runner class:
>
> KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
> ResourceFactory.getResourceChangeScannerService().start();
> ResourceFactory.getResourceChangeNotifierService().start();
>
> // creating a knowledge agent
> KnowledgeAgentConfiguration aconf =
> KnowledgeAgentFactory.newKnowledgeAgentConfiguration();
>
> KnowledgeAgent kagent = KnowledgeAgentFactory.newKnowledgeAgent(
> "MyAgent", kbase,aconf );
> kagent.applyChangeSet( ResourceFactory.newUrlResource("
> http://localhost:8280/jboss-brms/org.drools.guvnor.Guvnor/Guvnor.html"));
> StatefulKnowledgeSession ksession =
> kagent.getKnowledgeBase().newStatefulKnowledgeSession();
>
> // StatelessSession workingMemory = ruleBase.newStatelessSession();
> ArrayList<Ip> ipList = new ArrayList<Ip>();
>
> ksession.setGlobal("ipList", ipList);
> ksession.insert(al);
> ksession.fireAllRules();
> ksession.dispose();
>
>
>
> my change-set.xml file:
>
> <change-set xmlns='http://drools.org/drools-5.0/change-set'
> xmlns:xs='http://www.w3.org/2001/XMLSchema-instance'
> xs:schemaLocation='
> http://drools.org/drools-5.0/change-set.xsd' >
> <add>
> <!-- Add for specifying URLs-->
> <resource source='http://localhost:8280/jboss-brms' type='DRL' />
> <resource source='http://localhost:8280/jboss-brms' type='DSLR' />
> <resource source='http://localhost:8280/jboss-brmss/sample-dsl.dsl'
> type='DSL' />";
> <resource source='http://localhost:8280/jboss-brms' type='BRL' />
> </add>
> </change-set>
>
>
>
>
> error stack:
>
> java.lang.RuntimeException: Unable to parse ChangeSet
> at
> org.drools.agent.impl.KnowledgeAgentImpl.getChangeSet(KnowledgeAgentImpl.java:223)
> at
> org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:109)
> at com.org.RuleRunner.runStatelessRules(RuleRunner.java:156)
> at com.org.RulesTest.main(RulesTest.java:38)
> Caused by: java.net.SocketException: Network is unreachable: connect
> at java.net.PlainSocketImpl.socketConnect(Native Method)
> at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
> at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
> at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
> at java.net.Socket.connect(Socket.java:524)
> at java.net.Socket.connect(Socket.java:474)
> at sun.net.NetworkClient.doConnect(NetworkClient.java:157)
> at sun.net.www.http.HttpClient.openServer(HttpClient.java:388)
> at sun.net.www.http.HttpClient.openServer(HttpClient.java:523)
> at sun.net.www.http.HttpClient.<init>(HttpClient.java:231)
> at sun.net.www.http.HttpClient.New(HttpClient.java:304)
> at sun.net.www.http.HttpClient.New(HttpClient.java:321)
> at
> sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:839)
> at
> sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:791)
> at
> sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:716)
> at
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:960)
> at
> com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:973)
> at
> com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(XMLEntityManager.java:905)
> at
> com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntity(XMLEntityManager.java:872)
> at
> com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.setInputSource(XMLDTDScannerImpl.java:282)
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(XMLDocumentScannerImpl.java:1021)
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
> at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
> at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
> at
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
> at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
> at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
> at
> org.drools.xml.ExtensibleXmlParser.read(ExtensibleXmlParser.java:255)
> at
> org.drools.xml.ExtensibleXmlParser.read(ExtensibleXmlParser.java:170)
> at org.drools.xml.XmlChangeSetReader.read(XmlChangeSetReader.java:48)
> at
> org.drools.agent.impl.KnowledgeAgentImpl.getChangeSet(KnowledgeAgentImpl.java:221)
> ... 3 more
>
> Please help me.
>
> Thank you
> Jill
>
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
--
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Esteban Aliverti
14 years, 5 months
Possible bug
by Pavel Tavoda
Hello,
we are using official 5.0 release and sometimes (very rarely) we get
following error:
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
at java.util.HashMap$ValueIterator.next(HashMap.java:822)
at org.drools.reteoo.ClassObjectTypeConf.getMatchingObjectTypes(ClassObjectTypeConf.java:171)
at org.drools.reteoo.ClassObjectTypeConf.getObjectTypeNodes(ClassObjectTypeConf.java:163)
at org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:143)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:1046)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:1001)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:788)
at org.drools.process.command.InsertObjectCommand.execute(InsertObjectCommand.java:22)
at org.drools.process.command.InsertObjectCommand.execute(InsertObjectCommand.java:7)
at org.drools.runtime.impl.BatchExecutionImpl.execute(BatchExecutionImpl.java:23)
at org.drools.runtime.impl.BatchExecutionImpl.execute(BatchExecutionImpl.java:9)
at org.drools.impl.StatelessKnowledgeSessionImpl.execute(StatelessKnowledgeSessionImpl.java:225)
at org.fornax.cartridges.sculptor.framework.drools.DroolsAdvice.applyCompanyPolicy(DroolsAdvice.java:150)
We are using AspectJ advice for starting rule evaluation for every
service call. Hope we are doing everything right in code. Full source
code of advice can be found at:
http://fisheye3.atlassian.com/browse/fornax/trunk/cartridges/sculptor/for...
Regards
Pavel
14 years, 5 months
needed clarification on decr API
by Sudhir M
Hi,
We have a requirement where we need to have our own rule builder and
we use drools as our runtime engine. We are using drools descr API to
create the drl's as we find it more convenient than using a template
engine. In the new release there is warning that ' usage of the descr
package is discouraged '. Is this package bound to change in the
future releases? or will this package be removed completely?
Please clarify us in this regard to maintain compatibility with future
drools releases.
Thanks,
sudhir.
14 years, 5 months
Re: [rules-users] Possible bug
by Greg Barton
That will not guarentee that the exception will not be thrown:
http://java.sun.com/javase/6/docs/api/java/util/ConcurrentModificationExc...
Single thread modification can throw it.
GreG
On Jun 28, 2010, at 8:34 AM, "PAYET, Manuel" <manuel.payet(a)capgemini.com> wrote:
You should insert
Collections.synchronizedMap(new HashMap());
Instead of new HashMap()
This error is a java error, not a drools one, it only means that two threads are, at the same time, accessing/modifying the same Map.
The reason for this depends of your project
-----Message d'origine-----
De : rules-users-bounces(a)lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] De la part de Pavel Tavoda
Envoyé : lundi 28 juin 2010 15:29
À : Rules Users List
Objet : [rules-users] Possible bug
Hello,
we are using official 5.0 release and sometimes (very rarely) we get following error:
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
at java.util.HashMap$ValueIterator.next(HashMap.java:822)
at org.drools.reteoo.ClassObjectTypeConf.getMatchingObjectTypes(ClassObjectTypeConf.java:171)
at org.drools.reteoo.ClassObjectTypeConf.getObjectTypeNodes(ClassObjectTypeConf.java:163)
at org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:143)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:1046)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:1001)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:788)
at org.drools.process.command.InsertObjectCommand.execute(InsertObjectCommand.java:22)
at org.drools.process.command.InsertObjectCommand.execute(InsertObjectCommand.java:7)
at org.drools.runtime.impl.BatchExecutionImpl.execute(BatchExecutionImpl.java:23)
at org.drools.runtime.impl.BatchExecutionImpl.execute(BatchExecutionImpl.java:9)
at org.drools.impl.StatelessKnowledgeSessionImpl.execute(StatelessKnowledgeSessionImpl.java:225)
at org.fornax.cartridges.sculptor.framework.drools.DroolsAdvice.applyCompanyPolicy(DroolsAdvice.java:150)
We are using AspectJ advice for starting rule evaluation for every service call. Hope we are doing everything right in code. Full source code of advice can be found at:
http://fisheye3.atlassian.com/browse/fornax/trunk/cartridges/sculptor/for...
Regards
Pavel
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is
intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to
read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message
in error, please notify the sender immediately and delete all copies of this message.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
14 years, 5 months
Some Fusion clarification
by djb
Hi all,
I'm trying my hand at CEP for fraud detection (analysing incoming claims to
determine whether they are suspicious), and have 2 question/clarifications.
1.
Is the only difference between a fact and an event that an event has a
timestamp/duration?
I have medical claims coming in, and basically, that is my only event type;
say, ClaimReceivedEvent.
Now, I've got my rule engine working, where Claims are facts. Will I now
just insert my facts as events, and continue as normal, using accumulate and
sliding window syntax?
2.
Most of my rules will have to do with comparing complex variables from the
incoming claims to historical averages. (I assume this is the main use of
Drools Fusion, in general)
Should I just compute these averages in java and insert them into the WM?
If I want to compare monthly averages, (lets say, this month a provider
claims 50% more than last month), am I meant to calculate this beforehand?
Or, do I use pseudo-time to pump through historical events, all the while
firing rules to update the average, until I have processed all of the
historical data into these running average variables, and then switch to
real-time?
I'm having trouble with this big picture.
Thanks,
Daniel
Thanks,
Daniel
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Some-Fusion-clarifica...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 5 months