Re: [rules-users] Two instances of drools-guvnor can point to same database?
Sartaj, You can have two nodes of Guvnor in a clustered configuration. Note that there are significant changes to your repository configuration that need to be made to fully support a clustered deployment. Please refer to http://wiki.apache.org/jackrabbit/Clustering for more information. Good luck! David Faulkner david.faulk...@amentra.com From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Sartaj Shaik Sent: Friday, March 04, 2011 3:13 PM To: rules-users@lists.jboss.org Subject: [rules-users] Two instances of drools-guvnor can point to same database? Hi, Can we deploy guvnor in two instances of jboss server pointing to same oracle database? Do we need to modify any settings to use same database by all the instances? =-=-= Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Can not download Drools binaries
I'm new to drools and I would like to download the binaries and try some of the examples. However, when I click on the download like of the Drools binaries the screen goes dim and nothing happens. Would someone please explain to me what is going on and what I should do to get the binaries. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Two instances of drools-guvnor can point to same database?
Drools-ant also supports setting up multiple Guvnor instances in a jackrabbit cluster. Give it a test and let us know if you run into any issues: http://blog.athico.com/2011/01/configuring-multiple-guvnor-instances.html. Thanks. Tihomir On 3/7/11 6:34 AM, David Faulkner wrote: Sartaj, You can have two nodes of Guvnor in a clustered configuration. Note that there are significant changes to your repository configuration that need to be made to fully support a clustered deployment. Please refer to http://wiki.apache.org/jackrabbit/Clustering for more information. Good luck! David Faulkner david.faulk...@amentra.com *From:*rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] *On Behalf Of *Sartaj Shaik *Sent:* Friday, March 04, 2011 3:13 PM *To:* rules-users@lists.jboss.org *Subject:* [rules-users] Two instances of drools-guvnor can point to same database? Hi, Can we deploy guvnor in two instances of jboss server pointing to same oracle database? Do we need to modify any settings to use same database by all the instances? =-=-= Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Guvnor and drools implementation - questions
Thanks for your help Vincent. To be sure i have understood all well. I've just created 2 class like you show me with some changes to fit and test all (timestamp are long in fact, i have put int, double and string as well) : First class : import java.util.HashMap; public class MapPojo extends HashMap { public Object getId() { return this.get("id"); } @Override public boolean equals(Object o) { return (o instanceof MapPojo) && ((MapPojo)o).getId().equals(getId()); } public long getTimeStamp() { return (Long) this.get("timeStamp"); } public boolean isBefore(MapPojo other) { if (this.getTimeStamp() < other.getTimeStamp()) return true; else return false; } } Second class : public class MapTest1 extends MapPojo { private String Att1String; private String id; private doubleAtt2Double; private int Att3Int; private long timeStamp; public String getId() { return (String)this.get("id"); } public void setId(String val) { this.put("id",val); } public String getAtt1String() { return (String)this.get("Att1String"); } public void setAtt1String(String val) { this.put("Att1String",val); } public double getAtt2Double() { return (Double)this.get("Att2Double"); } public void setAtt2Double(double val) { this.put("Att2Double",val); } public int getAtt3Int() { return Integer.parseInt((String)this.get("Att3Int")); } public void setAtt3Int(int val) { this.put("Att3Int",val); } public long getTimeStamp() { return (Long)this.get("timeStamp"); } public void setTimeStamp(Long val) { this.put("timeStamp",val); } } Then i have imported this in Guvnor. I have made 2 categories. I have put the model (jar) in the 2 categories. I have created 2 simple rules playing with the attributes id, timestamp... Then i get some code like this (when i clic on view code or get the drl file) : 1.|rule "Rule1InCat1" 2.|dialect "mvel" 3.|when 4.|$m1 : MapTest1( att1String == "value1" ) 5.|$m2 : MapTest1( att1String == "value1" ) 6.|MapTest1( att2Double == 3.5 )7. |then8.| MapTest1 fact0 = new MapTest1();9.| fact0.setId( "id4" );10.| insert(fact0 ); 11.|end 1) For the condition Map $m1 different then Map $m2. I suppose i have to use the function define in MapPojo? I have to write it by hand using "free from drl" : eval($m1 != $m2) ? or is there a better way? The same for testing that $m1 timestamp (Long) is befor $m2. I have to write it by hand : eval($m1.isBefore($m2))? So they have to know it exist a method isBefore if not said by the gui? 2) In the code It's written MapTest1(..) instead of Map(...) so i suppose drools has to do it with the precompiled package .pkg to know about the MapPojo and MapTest1.. If i take only the .drl, drools won't know about class MapTest1. I think it could be for the biggest file about 100+ rules. And the smallest about 2-3 only. I can have : MapTest1, MapTest2, MapTest3, MapTest4 for example with each their own attributes. And For now if i have 4 drl files (file1.drl go for MapTest1 objects, file2.drl go for MapTest2 objects...) with their own rules, i know when to use which file. Yes i can set a category to each of my rule. Do you mean create 4 categories (cat1, cat2, cat3, cat4) and for rules of file1.drl, put them it cat1, for file2.drl, put them in cat2... ? Set a first condition in the rules? Am i obliged to create a package per file and filter by category or is it possible to make a package with all and filtering when creating the knowledgeBase or something like that? Thanks again for your precious help. On Fri, Mar 4, 2011 at 7:35 PM, Vincent Legendre < vincent.legen...@eurodecision.com> wrote: > > > I just tried to make a pojo. But i will have to do a single Pojo > > called "Map" with all the properties? Right now i had 4 Enum. Here i > > will have to have all in the same POJO with name "Map". > No. Don't name the Pojo "Map" ... And create as much Pojo that you have > different enums. Make them extend a common class where are defined > common behaviour. > To make that clear once for all, see this code : > > public class MapPojo extends HashMap { > > public Object getId() { > return this.get("id"); > } > > @Override > public boolean equals(Object o) { > return (o instanceof MapPojo) > && ((MapPojo)o).getId().equals(getId()); > } > > public Date getTimeStamp() { > return (Date) this.get("timeStamp"); > } > > public boolean isBefore(MapPojo other) { > return this.getTimeStamp().before(other.getTimeStamp()); > } > } > > // for enum 1 > public class MapPojoGroup1 extends MapPojo { > > public String getAtt1() { > return (String)this.get("att1"); >
Re: [rules-users] Can not download Drools binaries
That happened to me recently too. Using Internet Explorer browser instead of Chrome fixed it. Try downloading through a different browser. Regards, Faisal Shafique On Mar 7, 2011, at 6:55 AM, "Billy Buzzard" wrote: > I’m new to drools and I would like to download the binaries and try some of > the examples. However, when I click on the download like of the Drools > binaries the screen goes dim and nothing happens. Would someone please > explain to me what is going on and what I should do to get the binaries. > > ___ > rules-users mailing list > rules-users@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Agenda group in excel
Hi all, Let me tune in on this old post. Is AGENDA-GROUP still unavailable in excel decision tables (V5.1)? The user manual suggests it should be possible, but when I try it, it doesn't seem to work. In the same row as CONDITION, PRIORITY and ACTION, I named one of the columns AGENDA-GROUP. Then, I filled up the column with names for the groups. In another decision table, I called drools.setFocus("$param"); underneath ACTION to switch agendagroups. Moreover, the spreadsheetcompiler returns priority as a salience attribute in each rule, agenda-group can't be found in the outputs. Regards, Frank -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Agenda-group-in-excel-tp49967p2646355.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Agenda group in excel
This is a bug in 5.1.1 and earlier. It's been fixed (with other things) for 5.2. If you are willing to hack the source of 5.1.1, it's in org.drools.decisiontable.parser.DefaultRuleSheetListener lines 520-540, insert another one like this: } else if ( actionType.type == ActionType.AGENDAGROUP ){ this._currentRule.setAgendaGroup( value ); } -W On 7 March 2011 15:39, FrankVhh wrote: > Hi all, > > Let me tune in on this old post. > > Is AGENDA-GROUP still unavailable in excel decision tables (V5.1)? The user > manual suggests it should be possible, but when I try it, it doesn't seem > to > work. > > In the same row as CONDITION, PRIORITY and ACTION, I named one of the > columns AGENDA-GROUP. Then, I filled up the column with names for the > groups. > > In another decision table, I called drools.setFocus("$param"); underneath > ACTION to switch agendagroups. > > Moreover, the spreadsheetcompiler returns priority as a salience attribute > in each rule, agenda-group can't be found in the outputs. > > Regards, > Frank > > -- > View this message in context: > http://drools-java-rules-engine.46999.n3.nabble.com/Agenda-group-in-excel-tp49967p2646355.html > Sent from the Drools - User mailing list archive at Nabble.com. > ___ > rules-users mailing list > rules-users@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Can not download Drools binaries
It's being looked into and hopefully resolved soon: https://issues.jboss.org/browse/ORG-990 -W 2011/3/7 Faisal Shafique > That happened to me recently too. Using Internet Explorer browser instead > of Chrome fixed it. Try downloading through a different browser. > > Regards, > > Faisal Shafique > > On Mar 7, 2011, at 6:55 AM, "Billy Buzzard" < > billy.buzz...@bnsflogistics.com> wrote: > > I’m new to drools and I would like to download the binaries and try some > of the examples. However, when I click on the download like of the Drools > binaries the screen goes dim and nothing happens. Would someone please > explain to me what is going on and what I should do to get the binaries. > > ___ > rules-users mailing list > rules-users@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > > > ___ > rules-users mailing list > rules-users@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > > ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] ActivationFiredEventImpl errors.
I am getting following error on console with every rule trigger. If 2 conditions met I got following lines twice. 2011-03-03 20:39:26,358 ERROR [STDERR] (http-127.0.0.1-80-2) org.drools.event.rule.impl.BeforeActivationFiredEventImpl@1f8c9e8 2011-03-03 20:39:26,359 ERROR [STDERR] (http-127.0.0.1-80-2) org.drools.event.rule.impl.AfterActivationFiredEventImpl@6d4f31 -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/ActivationFiredEventImpl-errors-tp2646784p2646784.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Guvnor and drools implementation - questions
I've just created 2 class like you show me with some changes to fit and test all (timestamp are long in fact, i have put int, double and string as well) In the second class you don't need the attributes as members, because Drools uses get / set methods to deduce them, and anyway you never use them as they are stored in the map. Then i have imported this in Guvnor. I have made 2 categories. I have put the model (jar) in the 2 categories. That is non-sense. Jars are not linked to a category but to a package. I have created 2 simple rules playing with the attributes id, timestamp... With Guided editor ? 1) For the condition Map $m1 different then Map $m2. I suppose i have to use the function define in MapPojo? I have to write it by hand using "free from drl" : eval($m1 != $m2) ? or is there a better way? Its a way. You can also test the id directly in conditions (in Guided editor, bind the id of the first instance to a var, then compare it in the second condition. The same for testing that $m1 timestamp (Long) is befor $m2. I have to write it by hand : eval($m1.isBefore($m2))? So they have to know it exist a method isBefore if not said by the gui? Same. Add the test directly in the condition. Another solution is to use a custom operator (search this mailing list for samples). 2) In the code It's written MapTest1(..) instead of Map(...) so i suppose drools has to do it with the precompiled package .pkg to know about the MapPojo and MapTest1.. If i take only the .drl, drools won't know about class MapTest1. It is MapTest1, because this is the class used and drools knows it because it uses it ... You don't use Map directly anymore Yes i can set a category to each of my rule. Yes you can ! Do you mean create 4 categories (cat1, cat2, cat3, cat4) and for rules of file1.drl, put them it cat1, for file2.drl, put them in cat2... ? Yes Set a first condition in the rules? Choose between categories and first condition. Don't use both Am i obliged to create a package per file and filter by category or is it possible to make a package with all and filtering when creating the knowledgeBase or something like that? You certainly can filter your KB afterwards, but this is not really an out-of-the-box function. To me you have two options. For both options, you have only one Guvnor package :* First option* : categories set categories for your rules as you said compile by filtering one category, do a snapshot. Redo the same for other categories (in other snapshots). Use these 4 snapshots in your code *Second option *: First filtering condition create a new POJO having only one field to handle the task asked (or category or group or file or whatever you call that) add a condition to all your rules testing this fact according to their group (as described in one of my previous mail) create a single package (or use DRL) for all your rules. when calling your rules, insert the suitable POJO according to tehexec you want. The second is my favorite because it is less work to deploy, and your number of rules are quite small. The second option can be change to use a RuleFlow instead of a control fact. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Process instance status not completing when using JPA.
Hi, I'm seeing some odd behavior in Drools Flow 5.1.1. When using JPA and creating a StatefulKnowledgeSession using JPAKnowledgeService.newStatefulKnowledgeSession(), processes look like they run to completion, but calling RuleFlowProcessInstance.getState() on process instances created froim this knowledge session returns 1 (STATE_ACTIVE). Calling getActiveNodeIds() throws a NullPointerException. If I get a StatefulKnowledgeSession without JPA by calling KnowledgeBase.newStatefulKnowledgeSession(), getState() returns 2 (STATE_COMPLETED). I added KnowledgeRuntimeLoggerFactory.newConsoleLogger(knowledgeSession) and can see in both cases that the process is complete. Has this been seen before? Is it a known bug? Am I doing something wrong? Regards, Dan Nathanson ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] not sure if this is a bug of drools or my bad usage...
Hi all, An interesting finding: I have three simple rules: rule "A2B" when A() then insertLogical(new B()); end rule "B2C" when B() then insertLogical(new C()); end rule "C2B" when C() then insertLogical(new B()); end Basically, once we have an A(), we'll logically insert a B(). Once we have a B(), we'll logically insert a C(). Once we have a C(), we'll logically insert a B(). So, I first insert an A(), print all the objects. Retract A(), and print all the objects. Here's what I got: com.sample.B@42 com.sample.C@43 com.sample.A@548997d1 after retract! com.sample.B@42 com.sample.C@43 So, B() and C(), which should be logically depend on A(), somehow are not retracted. The problem I see is the truth maintenance system allow B() and C() to depend on each other, thus not affected by losing A(). Is this a bug or my bad usage? Thanks. -Simon ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Drools Logging
Hello There, I'm using Drools as a part of my current project and have a few questions. I subscribed to the forums and posted a new question but it keeps showing up as pending. Do I need to do anything else from my side? Thanks! ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Drools Logging
I have an application that processes rules on every request. Basically, the application creates a stateless session for every request and fires the rules. My question is how to integrate drools logging into this application. KnowledgeLoggerRuntimeFactory takes a string for filename instead of a logger. As a result, the log file gets overwritten for every request. Is there a way to get around this issue? Thanks! ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] How to specify relative URL in chagenset.xml file
Hi Pradeep, Please explain in detail about how you could make relative path working. -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/How-to-specify-relative-URL-in-chagenset-xml-file-tp120226p2647899.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] How to validate literal values on the LHS of rules.
Ok - I managed to get this to work. Now the main question - I've used ExternalSpreadsheetCompiler. This is still considered 'Experimental' per the 5.1.1 documentation ! And when I look at some history it looks like RuleTemplates have been around since August of 2008. Is there a road map of when RulesTemplates will be considered mainstream and a first class citizen of drools ? Also are there plans to change this API ? What's the future of RulesTemplates ? I can a lot of uses of this feature in our use case. But before I get ahead of myself here, I'd like to know what the risk is of basing my solution on this feature. Thanks in advance, G -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/How-to-validate-literal-values-on-the-LHS-of-rules-tp2638081p2648092.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Drools Logging
You can create your own logger implementation using the method: ksession.addEventListener(listener); This listener can be one of these three types: ProcessEventListener AgendaEventListener WorkingMemoryEventListener Take a look at those interface and after that you can implement and bind your custom listeners to plug your own logger. Greetings. 2011/3/7 Laks Sundararajan > I have an application that processes rules on every request. Basically, > the application creates a stateless session for every request and fires the > rules. > > My question is how to integrate drools logging into this application. > > KnowledgeLoggerRuntimeFactory takes a string for filename instead of a > logger. As a result, the log file gets overwritten for every request. Is > there a way to get around this issue? > > Thanks! > > ___ > rules-users mailing list > rules-users@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > > -- - CTO @ http://www.plugtree.com - MyJourney @ http://salaboy.wordpress.com - Co-Founder @ http://www.jbug.com.ar - Salatino "Salaboy" Mauricio - ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Problem persisting human tasks
Hi, When I started to using drools flow persistence, I was getting the same error "java.lang.IllegalStateException: EntityManager is closed". After a lot of time I figured out that I was using the command "ksession.dispose();" and when I removed this command everything worked fine. Regards, Anderson 2010/11/23 raic > > Hi, > > I'm having problems using drools flow persistance with human tasks. I'm > using drools server. > > On one hand, I have my test application, which starts a MinaTaskServer for > registering human tasks, and then, the application generates JSON commands > for executing a flow with human tasks on the execution server. > > Without using flow persistence, this is working ok, i'm able to retrieve > the > pending tasks and completing them without problems. > > When I try to configure flow persistence on the execution server, i can > start the process, the tasks are registered ok and drools flow tables are > generated in my database (processinstanceinfo,sessioninfo,workiteminfo...) > with the correct flow information. The problem appears when i retrieve a > pending task, and then, i want to complete it. It seems that the > communication between MinaTaskServer and ExecutionServer is not ok. > > The error i'm getting is the following: > > > [2010:11:327 18:11:661:debug] Message receieved on client : > EventTriggerResponse > > [2010:11:327 18:11:661:debug] Arguments : > [org.drools.task.event.EventPayload@1b2df13] > Task completed 1 > [2010:11:327 18:11:661:debug] Message receieved on client : > EventTriggerResponse > [2010:11:327 18:11:661:debug] Arguments : > [org.drools.task.event.EventPayload@1f7c6e1] > Task completed 1 > [2010:11:327 18:11:770:debug] Message receieved on client : GetTaskResponse > [2010:11:327 18:11:770:debug] Arguments : [org.drools.task.Task@d17fbb51] > [2010:11:327 18:11:770:exception] Uncaught exception on client > java.lang.IllegalStateException: EntityManager is closed > at org.hibernate.ejb.EntityManagerImpl.getSession(EntityManagerImpl.java > :66) >at > > org.hibernate.ejb.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:182) >at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) >at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) >at java.lang.reflect.Method.invoke(Unknown Source) >at > > org.springframework.orm.jpa.ExtendedEntityManagerCreator$ExtendedEntityManagerInvocationHandler.invoke(ExtendedEntityManagerCreator.java:358) >at $Proxy132.find(Unknown Source) >at > > org.drools.persistence.processinstance.JPAWorkItemManager.completeWorkItem(JPAWorkItemManager.java:88) >at > > org.drools.process.workitem.wsht.WSHumanTaskHandler$GetCompletedTaskResponseHandler.execute(WSHumanTaskHandler.java:250) >at > > org.drools.task.service.TaskClientHandler.messageReceived(TaskClientHandler.java:80) >at > > org.drools.task.service.mina.MinaTaskClientHandler.messageReceived(MinaTaskClientHandler.java:47) >at > > org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:713) >at > > org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434) >at > > org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46) >at > > org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793) >at > > org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolDecoderOutputImpl.flush(ProtocolCodecFilter.java:375) >at > > org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:229) >at > > org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434) >at > > org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46) >at > > org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793) >at > > org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:119) >at > > org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434) >at > > org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:426) >at > > org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:638) >at > > org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:598) >at > > org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:587) >at > > org.apache.mina.core.polling.AbstractPollingIoProcessor.access$400(AbstractPollingIoProcessor.java:61)
[rules-users] drools-server - resource change scanner/notifier
There have been previous posts on this problem: http://drools-java-rules-engine.46999.n3.nabble.com/Starting-resource-change-scanner-and-notifier-in-drools-server-td1528921.html but I was unable to find a resolution, or issue in Jira. Looking at the code in 5.1.1 (and trunk), I could not find where the polling and notifier services are started. To overcome the problem I have modified the following: drools-spring-1.0.0.xsd (added a start attribute to resource-change-scanner) xsd:attribute name="start" use="optional" type="xsd:boolean" ResourceChangeScannerBeanFactory (started service in afterPropertiesSet()) if (isStart()) { ResourceFactory.getResourceChangeNotifierService().start(); ResourceFactory.getResourceChangeScannerService().start(); } ResourceChangeScannerDefinitionParser (added start attribute) factory.addPropertyValue( START, element.getAttribute( START ) ); It seems to be working quite nicely. Just wondering if this is the right way to go about it, or whether there is a better method. Regards RossH -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/drools-server-resource-change-scanner-notifier-tp2649325p2649325.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] not sure if this is a bug of drools or my bad usage...
Hi Simon, Could you tell me a bit more about your logic below in code level? I can't imagine how it goes. So, I first insert an A(), print all the objects. Retract A(), and print all the objects. Here's what I got: com.sample.B@42 com.sample.C@43 com.sample.A@548997d1 after retract! com.sample.B@42 com.sample.C@43 Benson On Tue, Mar 8, 2011 at 3:33 AM, Simon Chen wrote: > Hi all, > > An interesting finding: > > I have three simple rules: > rule "A2B" > when > A() > then > insertLogical(new B()); > end > rule "B2C" > when > B() > then > insertLogical(new C()); > end > rule "C2B" > when > C() > then > insertLogical(new B()); > end > > Basically, once we have an A(), we'll logically insert a B(). Once we > have a B(), we'll logically insert a C(). Once we have a C(), we'll > logically insert a B(). > > So, I first insert an A(), print all the objects. Retract A(), and > print all the objects. Here's what I got: > com.sample.B@42 > com.sample.C@43 > com.sample.A@548997d1 > after retract! > com.sample.B@42 > com.sample.C@43 > > So, B() and C(), which should be logically depend on A(), somehow are > not retracted. The problem I see is the truth maintenance system allow > B() and C() to depend on each other, thus not affected by losing A(). > > Is this a bug or my bad usage? > > Thanks. > -Simon > ___ > rules-users mailing list > rules-users@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] not sure if this is a bug of drools or my bad usage...
Simon, The behavior seems correct to me as B is justified by either A or C (or both). Of course, from the initial state, A is required for C to first exist, but once it starts to exist, your rules say that B and C justify each other and so both remain in memory. This is design as intended, but do you think that is wrong? Edson 2011/3/7 Simon Chen > Hi all, > > An interesting finding: > > I have three simple rules: > rule "A2B" >when >A() >then >insertLogical(new B()); > end > rule "B2C" >when >B() >then >insertLogical(new C()); > end > rule "C2B" >when >C() >then >insertLogical(new B()); > end > > Basically, once we have an A(), we'll logically insert a B(). Once we > have a B(), we'll logically insert a C(). Once we have a C(), we'll > logically insert a B(). > > So, I first insert an A(), print all the objects. Retract A(), and > print all the objects. Here's what I got: > com.sample.B@42 > com.sample.C@43 > com.sample.A@548997d1 > after retract! > com.sample.B@42 > com.sample.C@43 > > So, B() and C(), which should be logically depend on A(), somehow are > not retracted. The problem I see is the truth maintenance system allow > B() and C() to depend on each other, thus not affected by losing A(). > > Is this a bug or my bad usage? > > Thanks. > -Simon > ___ > rules-users mailing list > rules-users@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > -- Edson Tirelli JBoss Drools Core Development JBoss by Red Hat @ www.jboss.com ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] not sure if this is a bug of drools or my bad usage...
What I had is a very simplified version of how calculating transitive closure could go wrong... Let's say we have two rules: rule 1 when link(a,b) then insertLogical(new reachable(a,b)) rule 2 when link(a,b) reachable(b,c) then insertLogical(new reachable(a,c)) Let's say, I have link(a,b), link(b,c), link(b,a), link(c,b). So, we'll have reachable(a,b), reachable(b,c), reachable(a,c), etc. But, after I retract link(a,b) and link(b,a), guess what, reachable(c,a) still exists! This doesn't sound right to me. But in Drools, this is possible, because we have: reachable(c,a) <- link(c,b), reachable(b,a) reachable(b,a) <- link(b,c), reachable(c,a) The problem here is that we actually inserted reachable(b,a) multiple times: first supported by link(b,a) and rule 1, and secondly by link(b,c) and reachable(c,a) and rule 2. When reachable(b,a) was inserted the second time, link(b,c) and reachable(c,a) become the additional supporting condition - maintained by the truth maintenance system. So, even if link(b,a) is retracted, reachable(b,a) still exists further supporting reachable(c,a). Is it clearer? Thanks. -Simon 2011/3/7 Edson Tirelli : > > Simon, > The behavior seems correct to me as B is justified by either A or C (or > both). Of course, from the initial state, A is required for C to first > exist, but once it starts to exist, your rules say that B and C justify each > other and so both remain in memory. > This is design as intended, but do you think that is wrong? > Edson > > 2011/3/7 Simon Chen >> >> Hi all, >> >> An interesting finding: >> >> I have three simple rules: >> rule "A2B" >> when >> A() >> then >> insertLogical(new B()); >> end >> rule "B2C" >> when >> B() >> then >> insertLogical(new C()); >> end >> rule "C2B" >> when >> C() >> then >> insertLogical(new B()); >> end >> >> Basically, once we have an A(), we'll logically insert a B(). Once we >> have a B(), we'll logically insert a C(). Once we have a C(), we'll >> logically insert a B(). >> >> So, I first insert an A(), print all the objects. Retract A(), and >> print all the objects. Here's what I got: >> com.sample.B@42 >> com.sample.C@43 >> com.sample.A@548997d1 >> after retract! >> com.sample.B@42 >> com.sample.C@43 >> >> So, B() and C(), which should be logically depend on A(), somehow are >> not retracted. The problem I see is the truth maintenance system allow >> B() and C() to depend on each other, thus not affected by losing A(). >> >> Is this a bug or my bad usage? >> >> Thanks. >> -Simon >> ___ >> rules-users mailing list >> rules-users@lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/rules-users > > > > -- > Edson Tirelli > JBoss Drools Core Development > JBoss by Red Hat @ www.jboss.com > > ___ > rules-users mailing list > rules-users@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > > ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Need clarifications on business rules
Hello, I have a requirement to migrate some business rules from WebSphere Process Server (WPS) to the equivalent product of JBoss . The current functionality implemented on WPS is 1. Execute appropriate conditions like if-else and decision tables based on the content in the request message 2. The business rules can invoke an internal/external SOAP/HTTP web service based on the rule logic 3. The business rules can invoke an email adapter which in turn fires emails as needed 4. Eventually expose the business rules to external world as a SOAP/HTTP web service. This enables clients to invoke the business rules from a remote machine via SOAP/HTTP. There are many products in JBoss suite like JBos Rules, JBoss Enterprise SOA Platform, JBoss Enterprise BRMS, JBoss Enterprise Middleware Suite etc. Could anyone please suggest me what is the right product in JBoss suite using which I can build the same logic that I have built on WPS? Kindly let me know if you need any further details from my end for you to understand the requirement better. Thanks & Regards Kishore DISCLAIMER: This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] How to modify changeset.xml in guvnor
I have a similar problem. Looking at the drools-guvnor 5.1.1 src it appears that the change set is hard coded in PackageDeploymentServlet. Essentially it takes the URL request, chops off the /ChangeSet.xml and returns that url in a changeset xml which does not have the authentication parameters, hence the 401. As a quick and dirty fix you could change this to embed a username/passwd of your preference, but this is a little fragile. As the source code says //here be dragons ! You need to be very careful about hardcoding/exposing usernames/passwds. I'm hoping there is a more elegent solution, and maybe a kind soul will inform us. I will keep digging. RossH -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/How-to-modify-changeset-xml-in-guvnor-tp1404619p2649876.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] not sure if this is a bug of drools or my bad usage...
I think there is some fundamental error in deriving truths from givens and other derived facts that are then interpreted as given truths, and, moreover, with subtly varying semantics. In terms of graph theory: reachability is based on (directed) edges, but it does not establish additional edges. Deriving Reachability should be done by: rule deriveLink when Link( $a: a, $b: b ) then insertLogical(new Reachable($a,$b)); System.out.println( "ins reach " + $a + " " + $b ); end rule deriveReachReach no-loop true when Reachable( $a: a, $b: b ) Reachable( a == $b, $c: b != $a ) then insertLogical(new Reachable($a,$c)); end Ideally, I would like to use not Reachable(a == $a, b == $c) instead of the (last resort) no-loop in the second rule, but Drools' truth maintenance is incomplete: it does not let your define the logical dependency on part of the condition (i.e., excluding the CE "not" in this case). -W On 8 March 2011 05:49, Simon Chen wrote: > What I had is a very simplified version of how calculating transitive > closure could go wrong... > > Let's say we have two rules: > rule 1 > when > link(a,b) > then > insertLogical(new reachable(a,b)) > > rule 2 > when > link(a,b) reachable(b,c) > then > insertLogical(new reachable(a,c)) > > Let's say, I have link(a,b), link(b,c), link(b,a), link(c,b). So, > we'll have reachable(a,b), reachable(b,c), reachable(a,c), etc. But, > after I retract link(a,b) and link(b,a), guess what, reachable(c,a) > still exists! This doesn't sound right to me. > > But in Drools, this is possible, because we have: > reachable(c,a) <- link(c,b), reachable(b,a) > reachable(b,a) <- link(b,c), reachable(c,a) > > The problem here is that we actually inserted reachable(b,a) multiple > times: first supported by link(b,a) and rule 1, and secondly by > link(b,c) and reachable(c,a) and rule 2. When reachable(b,a) was > inserted the second time, link(b,c) and reachable(c,a) become the > additional supporting condition - maintained by the truth maintenance > system. So, even if link(b,a) is retracted, reachable(b,a) still > exists further supporting reachable(c,a). > > Is it clearer? > > Thanks. > -Simon > > 2011/3/7 Edson Tirelli : > > > >Simon, > >The behavior seems correct to me as B is justified by either A or C > (or > > both). Of course, from the initial state, A is required for C to first > > exist, but once it starts to exist, your rules say that B and C justify > each > > other and so both remain in memory. > >This is design as intended, but do you think that is wrong? > >Edson > > > > 2011/3/7 Simon Chen > >> > >> Hi all, > >> > >> An interesting finding: > >> > >> I have three simple rules: > >> rule "A2B" > >>when > >>A() > >>then > >>insertLogical(new B()); > >> end > >> rule "B2C" > >>when > >>B() > >>then > >>insertLogical(new C()); > >> end > >> rule "C2B" > >>when > >>C() > >>then > >>insertLogical(new B()); > >> end > >> > >> Basically, once we have an A(), we'll logically insert a B(). Once we > >> have a B(), we'll logically insert a C(). Once we have a C(), we'll > >> logically insert a B(). > >> > >> So, I first insert an A(), print all the objects. Retract A(), and > >> print all the objects. Here's what I got: > >> com.sample.B@42 > >> com.sample.C@43 > >> com.sample.A@548997d1 > >> after retract! > >> com.sample.B@42 > >> com.sample.C@43 > >> > >> So, B() and C(), which should be logically depend on A(), somehow are > >> not retracted. The problem I see is the truth maintenance system allow > >> B() and C() to depend on each other, thus not affected by losing A(). > >> > >> Is this a bug or my bad usage? > >> > >> Thanks. > >> -Simon > >> ___ > >> rules-users mailing list > >> rules-users@lists.jboss.org > >> https://lists.jboss.org/mailman/listinfo/rules-users > > > > > > > > -- > > Edson Tirelli > > JBoss Drools Core Development > > JBoss by Red Hat @ www.jboss.com > > > > ___ > > rules-users mailing list > > rules-users@lists.jboss.org > > https://lists.jboss.org/mailman/listinfo/rules-users > > > > > > ___ > rules-users mailing list > rules-users@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users