Re: [rules-users] Download repository.xml?
When? Where? For what purpose? sent on the move On 4 May 2011 02:13, boy18nj boy1...@gmail.com wrote: Have anyone thought of providing repository.xml instead of zip files? -- View this message in context: http://drools.46999.n3.nabble.com/Download-repository-xml-tp2886238p2896839.html Sent from the Drools: User forum 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
[rules-users] configuring drools timers (and persistence)
Hello, I am involved in a project in which we are using Drools Flow 5.1.1. as the underlying BPM. We have drools integration with Spring. We are using JPA+Spring+Drools integration, and have setup the knowledge base and stateful session as indicated in the drools spring integration documentation. Our BPM has external clients that call adaptor methods for Drools. That is, drools is never used in a direct way from an external client. We use this strategy in order to provide some additional behaviour and also in order to provide transactional behaviour as it is usually made with Spring. We needed to partially apply the patch reported at the end of: http://drools.46999.n3.nabble.com/5-1-0-CR1-Drools-Spring-Configuration-Changed-td997130.html 3. Interesting thing is that I have to recreate Environment now every time before reloading the Session, otherwise the entityManager is closed, and it does not respond to a simple Spring AOP TM wrapping... But that is another issue.. We still have some persistence problems when using drools Timers. The problems arise when drools creates the transaction itself (the timers execution is the only situation in our scenario where this happens). We do have some listeners which persist some information in our own tables. These listeners are not prepared to use drools-created transaction (a different entity manager is used). For this reason and also some others (as reported in http://drools.46999.n3.nabble.com/Drools-5-1-Flow-in-a-quot-Clustered-quot-environment-td1780463.html), we would like to configure the timer service used internally by Drools. Looking at drools source code, it seems that it should be possible, since a defult implementation is provided by drools ( JDKTimerService and JpaJDKTimerService if persistence is used). For example, class KnowledgeStoreServiceImpl seems to define a set of default services (which could pressumably be overriden someway). Nevertheless, after looking to that for a while we have found no specific documentation and no clear way to do that for our Spring integration. Is there a way to change the TimerService implementation provided by Drools? Any help is appreciated. Thanks very much in advance! Jordi Alvarez ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Using constant for salience instead of hardcoded values?
Hi all, Is it possible to use a constant for salience instead of hardcoded value? It have a sence when you have many rules and only several salience level. They maybe more descriptive like START, VALIDATION, etc and easier to maintain in the future. If it not possible right now, then maybe it worth to request like feature request in the future? ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Looping through a vector object in a rule
I am new to drools I am inserting into a ksession a single claim POJO + vector of previous claims Like this ksession.insert(claim); // single claim ksession.insert(historyClaims); // vector of claims ksession.startProcess(com.dur.claim); ksession.fireAllRules(); I want to compare single claim variable values with all the claims in the vector how do I loop through the vector objects and compare the values in the Rule (.drl) file? Can someone help me out? -- View this message in context: http://drools.46999.n3.nabble.com/Looping-through-a-vector-object-in-a-rule-tp2897872p2897872.html Sent from the Drools: User forum 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] Using constant for salience instead of hardcoded values?
One way to achieve this (with a little extra effort) would be to use a DSL where you define START etc. as keywords with an expansion to salience 100 etc. -W On 4 May 2011 10:09, alebu ale...@gmail.com wrote: Hi all, Is it possible to use a constant for salience instead of hardcoded value? It have a sence when you have many rules and only several salience level. They maybe more descriptive like START, VALIDATION, etc and easier to maintain in the future. If it not possible right now, then maybe it worth to request like feature request in the future? ___ 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] Looping through a vector object in a rule
You'd be better off inserting the individual claim history objects:- when $c : Claim( $a : aField ) $ch : ClaimHistory( aField == $a ) then ... end IIRC you can achieve the same by inserting the Vector by providing another rule to expand it first:- VectorClaimHistory claimHistory = getClaimHistory(); ksession.insert( claimHistory ); salience A value hIgher than your other rules when $v : Vector( ) $ch : ClaimHistory( ) from $v then insert( $ch ); end You can also achieve the latter example using a global. With kind regards, Mike On 4 May 2011 09:17, sdinoo sdi...@gmail.com wrote: I am new to drools I am inserting into a ksession a single claim POJO + vector of previous claims Like this ksession.insert(claim); // single claim ksession.insert(historyClaims); // vector of claims ksession.startProcess(com.dur.claim); ksession.fireAllRules(); I want to compare single claim variable values with all the claims in the vector how do I loop through the vector objects and compare the values in the Rule (.drl) file? Can someone help me out? -- View this message in context: http://drools.46999.n3.nabble.com/Looping-through-a-vector-object-in-a-rule-tp2897872p2897872.html Sent from the Drools: User forum 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] Using constant for salience instead of hardcoded values?
Salience can be defined using expressions - so have you tried it? If referencing a static constant (perhaps in a java class) doesn't work you could try a global, if that doesn't work try defining a function call which returns the desired value, if that doesn't work you could add an extra fact containing the value, bind the value to the variable and then use that variable for the salience. Once you've tried it let us know which ways do/don't work! Thomas -Original Message- From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of alebu Sent: Wednesday, May 04, 2011 9:10 AM To: rules-users@lists.jboss.org Subject: [rules-users] Using constant for salience instead of hardcoded values? Hi all, Is it possible to use a constant for salience instead of hardcoded value? It have a sence when you have many rules and only several salience level. They maybe more descriptive like START, VALIDATION, etc and easier to maintain in the future. If it not possible right now, then maybe it worth to request like feature request in the future? ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ** This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmas...@nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary. NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00 ** ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Looping through a vector object in a rule
I assumed claimHistory is not related to Claim in your example, if it is however you can also do this:- when $c : Claim( $a : aField ) $ch : ClaimHistory( aField == $a ) from $c.claimHistory then ... end Or, assuming bidirectional references:- when $c : Claim( $a : aField ) $ch : ClaimHistory( claim == $c, aField == $a ) then ... end On 4 May 2011 10:27, Michael Anstis michael.ans...@gmail.com wrote: You'd be better off inserting the individual claim history objects:- when $c : Claim( $a : aField ) $ch : ClaimHistory( aField == $a ) then ... end IIRC you can achieve the same by inserting the Vector by providing another rule to expand it first:- VectorClaimHistory claimHistory = getClaimHistory(); ksession.insert( claimHistory ); salience A value hIgher than your other rules when $v : Vector( ) $ch : ClaimHistory( ) from $v then insert( $ch ); end You can also achieve the latter example using a global. With kind regards, Mike On 4 May 2011 09:17, sdinoo sdi...@gmail.com wrote: I am new to drools I am inserting into a ksession a single claim POJO + vector of previous claims Like this ksession.insert(claim); // single claim ksession.insert(historyClaims); // vector of claims ksession.startProcess(com.dur.claim); ksession.fireAllRules(); I want to compare single claim variable values with all the claims in the vector how do I loop through the vector objects and compare the values in the Rule (.drl) file? Can someone help me out? -- View this message in context: http://drools.46999.n3.nabble.com/Looping-through-a-vector-object-in-a-rule-tp2897872p2897872.html Sent from the Drools: User forum 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
[rules-users] Fw: Regarding Drools - Expert and Fusion
Hi , I had posted this earlier : Could somebody please let me know about any link or document for Best Practices regarding JBoss Rules(Expert) and Fusion. Also any link or document regarding Technical Architecture of JBoss Rules (Expert) and JBoss Fusion Stack. Also I have a query as how can Drools - Expert and Fusion coexist in an Application. I have just started learning about Drools Fusion. What can qualify to go as a event driven system as opposed to rules based system ? It would be very helpful if somebody could let me know about the few things. Thanks Regards, Sumeet Karawal Mailto: sumeet.kara...@tcs.com From: Sumeet Karawal/MUM/TCS To: rules-users@lists.jboss.org Date: 05/03/2011 07:09 PM Subject:Regarding Drools - Expert and Fusion Hi, Could somebody please let me know about any link or document for Best Practices regarding JBoss Rules(Expert) and Fusion. Also any link or document regarding Technical Architecture of JBoss Rules (Expert) and JBoss Fusion Stack. Thanks Regards, Sumeet Karawal Mailto: sumeet.kara...@tcs.com =-=-= 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
Re: [rules-users] Fw: Regarding Drools - Expert and Fusion
I don't know of any such links. Fusion depends upon Expert so they must coexist if you are to use Fusion. Fusion is really the CEP aspect of Expert, I don't believe it possible to install Expert without Fusion's extensions. An event based system would be one where you need to make temporal decisions relating to your facts; e.g. there have been 3 alarms in the last 5 minutes etc. Such a system would still use rules; however they would have temporal constraints. With kind regards, Mike On 4 May 2011 11:20, Sumeet Karawal sumeet.kara...@tcs.com wrote: Hi , I had posted this earlier : Could somebody please let me know about any link or document for Best Practices regarding JBoss Rules(Expert) and Fusion. Also any link or document regarding Technical Architecture of JBoss Rules (Expert) and JBoss Fusion Stack. Also I have a query as how can Drools - Expert and Fusion coexist in an Application. I have just started learning about Drools Fusion. What can qualify to go as a event driven system as opposed to rules based system ? It would be very helpful if somebody could let me know about the few things. Thanks Regards, Sumeet Karawal Mailto: sumeet.kara...@tcs.com From: Sumeet Karawal/MUM/TCS To: rules-users@lists.jboss.org Date: 05/03/2011 07:09 PM Subject:Regarding Drools - Expert and Fusion Hi, Could somebody please let me know about any link or document for Best Practices regarding JBoss Rules(Expert) and Fusion. Also any link or document regarding Technical Architecture of JBoss Rules (Expert) and JBoss Fusion Stack. Thanks Regards, Sumeet Karawal Mailto: sumeet.kara...@tcs.com =-=-= 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] Question on modeling facts
How many train stops are you talking about? If it is only a few it might not matter if you don't have the many trains. When you are writing your rule if you narrow down by matching schedule first and then comparing all the stops that might help. An alternative to comparing two collections in drools would be to write a custom function that could do some simple checks first like make sure that the size of both lists are the same. Another option if the list of train stops is a POJO itself is to make its hashkey so that two lists with the same values will have matching hashkeys. Wendy From: Brett Bergquist br...@thebergquistfamily.com To: rules-users@lists.jboss.org Sent: Tue, May 3, 2011 3:20:52 PM Subject: [rules-users] Question on modeling facts I am trying to write rules to distill down a minimal train schedule from a set of overlapping train schedules. A train schedule contains a train identifier, a schedule that it runs on, and a set of train stops. A rule that I would like to write is to combine one or more train schedules if more than one train runs on the same day (ie has the same schedule) and stops at the same stops. This ignores the train identifier and will discard all other train schedules that have a different train identifier but have the same schedule and stops. I am wondering how to model the equality test for the same set of stops. Can I have my Train fact contain a collection of stops and then compare the collections for equality? Will this be efficient? Is there a better way to model this? Any and all help will be greatly appreciated. Brett -- View this message in context: http://drools.46999.n3.nabble.com/Question-on-modeling-facts-tp2895595p2895595.html Sent from the Drools: User forum 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] Question on modeling facts
Stops would be in some ordered collection; the equals for AbstractList is efficient enogh; it does check sizes before iterating in parallel. Perhaps the 2 termini should be checked first (if there's a wide range of lines), then (as Wendy proposes) the day; then the stations. -W 2011/5/4 Wendy Mungovan w.mungo...@yahoo.com: How many train stops are you talking about? If it is only a few it might not matter if you don't have the many trains. When you are writing your rule if you narrow down by matching schedule first and then comparing all the stops that might help. An alternative to comparing two collections in drools would be to write a custom function that could do some simple checks first like make sure that the size of both lists are the same. Another option if the list of train stops is a POJO itself is to make its hashkey so that two lists with the same values will have matching hashkeys. Wendy From: Brett Bergquist br...@thebergquistfamily.com To: rules-users@lists.jboss.org Sent: Tue, May 3, 2011 3:20:52 PM Subject: [rules-users] Question on modeling facts I am trying to write rules to distill down a minimal train schedule from a set of overlapping train schedules. A train schedule contains a train identifier, a schedule that it runs on, and a set of train stops. A rule that I would like to write is to combine one or more train schedules if more than one train runs on the same day (ie has the same schedule) and stops at the same stops. This ignores the train identifier and will discard all other train schedules that have a different train identifier but have the same schedule and stops. I am wondering how to model the equality test for the same set of stops. Can I have my Train fact contain a collection of stops and then compare the collections for equality? Will this be efficient? Is there a better way to model this? Any and all help will be greatly appreciated. Brett -- View this message in context: http://drools.46999.n3.nabble.com/Question-on-modeling-facts-tp2895595p2895595.html Sent from the Drools: User forum 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 ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Guvnor service to compile part of a package ?
Hi all, I am looking for a clever way to compile only parts of a Guvnor package according to some criteria on items (categories, metadata ...), but outside Guvnor if possible. The main idea starts by the fact that it is a little bit complex for a business user to manage packages and compilations, and even more if he has to manage conditional compilations (using selectors) of a single package to produce multiple KB compiled according to business criterions. I want to compile automatically some KB according to categories (more generally asset's fields) with something external to Guvnor. Thus I need a way to query Guvnor repository with criterion to get either : - the corresponding ressources (DRL) - the filtered compiled KB (PKG ressource) Filtering with DRL (like custom selectors in Guvnor) will be perfect, using a custom class too. Is there such service ? Does the KnowledgeAgent allow filtering (did not see anything in docs) ? Or do I need to add a new service in Guvnor war directly ? Thanks! ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Guvnor service to compile part of a package ?
Other than custom selectors, as you have already discovered, I don't believe there is anything that fits your description out of the box. Those clever chaps at Plugtree often have something up their sleeves; perhaps they know of something? There have also been a lot of changes for 5.2 but I'm unsure if this is covered there either. org.drools.guvnor.server.RepositoryPackageOperations.buildPackage would be a good starting point if you want to write your own (and contribute back?) With kind regards, Mike On 4 May 2011 15:57, Vincent Legendre vincent.legen...@eurodecision.comwrote: Hi all, I am looking for a clever way to compile only parts of a Guvnor package according to some criteria on items (categories, metadata ...), but outside Guvnor if possible. The main idea starts by the fact that it is a little bit complex for a business user to manage packages and compilations, and even more if he has to manage conditional compilations (using selectors) of a single package to produce multiple KB compiled according to business criterions. I want to compile automatically some KB according to categories (more generally asset's fields) with something external to Guvnor. Thus I need a way to query Guvnor repository with criterion to get either : - the corresponding ressources (DRL) - the filtered compiled KB (PKG ressource) Filtering with DRL (like custom selectors in Guvnor) will be perfect, using a custom class too. Is there such service ? Does the KnowledgeAgent allow filtering (did not see anything in docs) ? Or do I need to add a new service in Guvnor war directly ? Thanks! ___ 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] addpackagefromdrl removed and multiple DSL functionality lost?
Several posts refer to a pre-5.0 addpackagefromdrl method that builds a rule file for an associated DSL file. This let multiple DRL files be associated to a specific DSL file for compilation. KnowledgeBuilder.add(...) lets you add multiple DRL and DSL files, but it seems as if the expander keyword (as noted in the list) is used by Eclipse - not KnowledgeBuilder - to compile the DRL with the correct DSL. Also the DSL file used to compile the DRL is now dependent on the .add statement sequence with DSL's hiding other DSL's. Is there an equivalent API call to addpackagefromdrl? While one could have mutiple KnowledgeBuilder's, each with a StatefulKnowledgeSession, this would push orchestra of many applications (like my BPM application) to Java - instead of Drools. -- View this message in context: http://drools.46999.n3.nabble.com/addpackagefromdrl-removed-and-multiple-DSL-functionality-lost-tp2899261p2899261.html Sent from the Drools: User forum 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] SPREADSHEET DECISION TABLE: Can I use functions into CONDITIONS?
HI!, I need to check if a given date is between two dates. So, I would like to call a function that calculates if the given date is between other two(specifically, between current date and current date plus some months, and the variable months changes dynamically). I tried to write a function(inside spreadsheet) that receives the date and the variable months but does not compile. I have found not samples about functions used into condition part so I am wondering if that is the problem. If it is the case, what can i do? Thanks. -- View this message in context: http://drools.46999.n3.nabble.com/SPREADSHEET-DECISION-TABLE-Can-I-use-functions-into-CONDITIONS-tp2899330p2899330.html Sent from the Drools: User forum 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] SPREADSHEET DECISION TABLE: Can I use functions into CONDITIONS?
Can you provide the function and the error messages you get? -W On 4 May 2011 17:38, zeta zoraidahida...@gmail.com wrote: HI!, I need to check if a given date is between two dates. So, I would like to call a function that calculates if the given date is between other two(specifically, between current date and current date plus some months, and the variable months changes dynamically). I tried to write a function(inside spreadsheet) that receives the date and the variable months but does not compile. I have found not samples about functions used into condition part so I am wondering if that is the problem. If it is the case, what can i do? Thanks. -- View this message in context: http://drools.46999.n3.nabble.com/SPREADSHEET-DECISION-TABLE-Can-I-use-functions-into-CONDITIONS-tp2899330p2899330.html Sent from the Drools: User forum 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] addpackagefromdrl removed and multiple DSL functionality lost?
As an update, I am testing getting this functionality by having two KnowledgeBuilder that both add to the same KnowledgeBase and to a single StatefulKnowledgeSession. So far so good. -- View this message in context: http://drools.46999.n3.nabble.com/addpackagefromdrl-removed-and-multiple-DSL-functionality-lost-tp2899261p2899493.html Sent from the Drools: User forum 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] Problems with Drools 5.2.0.M1 and IE7?
Has anyone experienced problems running with the graphic layout of Guvnor with Drools 5.2.0.M1 on Internet Explorer 7? It appears to be okay with IE8. Thanks. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] SPREADSHEET DECISION TABLE: Can I use functions into CONDITIONS?
Hi Zeta, Just to confirm: You'll find that writing an Excel VBA macro will not work, as they are neither MVEL nor Java. How I've handled it is created a Helper class with public static methods. Then in the Import section at the top of the file, I link to the functions I use, prefixed with the function keyword, eg: RuleSet myRuleSet Import nz.co.bnz.projectname.common.factmodel.*, function nz.co.bnz.projectname.helpers.HelperClass.methodName Functions dialect mvel ... Of course the main advantage of using helper classes like this is you can reuse them - no need to rewrite your methods everywhere you want to use them. Of course this isn't particularly helpful if you're not coding in Java. Note: Under mvel you seem to need to specify each function name separately, when using Java you can use HelperClass.* - This applies to any rules file-type (.drl / .dslr / .xls / .csv / etc) Hope some of this helps, -Trav Travis Smith Analyst Programmer Development Centre BNZ DDI: +644 4746356 (Or Ext 76356) zeta zoraidahida...@gmail.com Sent by: rules-users-boun...@lists.jboss.org 05/05/2011 03:38 a.m. Please respond to Rules Users List rules-users@lists.jboss.org To rules-users@lists.jboss.org cc Subject [rules-users] SPREADSHEET DECISION TABLE: Can I use functions into CONDITIONS? HI!, I need to check if a given date is between two dates. So, I would like to call a function that calculates if the given date is between other two(specifically, between current date and current date plus some months, and the variable months changes dynamically). I tried to write a function(inside spreadsheet) that receives the date and the variable months but does not compile. I have found not samples about functions used into condition part so I am wondering if that is the problem. If it is the case, what can i do? Thanks. -- View this message in context: http://drools.46999.n3.nabble.com/SPREADSHEET-DECISION-TABLE-Can-I-use-functions-into-CONDITIONS-tp2899330p2899330.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users CAUTION - This message may contain privileged and confidential information intended only for the use of the addressee named above. If you are not the intended recipient of this message you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. This email was sent by the Bank of New Zealand. You can contact us on 0800 ASK BNZ (0800 275 269). Any views expressed in this message are those of the individual sender and may not necessarily reflect the views of Bank of New Zealand. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] JBRULES-2796 - NullPointerException in FromNode.destroyCreatedHandles
Hello, I think I am getting the same/similar problem as described in JBRULES-2796. I am using Drools 5.1.1 with Expert and Flow, here is the stack trace: Caused by: java.lang.NullPointerException at org.drools.reteoo.FromNode.destroyCreatedHandles(FromNode.java:336) at org.drools.reteoo.FromNode.retractLeftTuple(FromNode.java:326) at org .drools .reteoo .CompositeLeftTupleSinkAdapter .doPropagateRetractLeftTuple(CompositeLeftTupleSinkAdapter.java:238) at org .drools .reteoo .CompositeLeftTupleSinkAdapter .propagateRetractRightTuple(CompositeLeftTupleSinkAdapter.java:155) at org.drools.reteoo.JoinNode.retractRightTuple(JoinNode.java:151) at org.drools.reteoo.ObjectTypeNode.retractObject(ObjectTypeNode.java: 232) at org.drools.reteoo.EntryPointNode.retractObject(EntryPointNode.java: 231) at org .drools .common.AbstractWorkingMemory.retract(AbstractWorkingMemory.java:1288) at org .drools .base.DefaultKnowledgeHelper.retract(DefaultKnowledgeHelper.java:201) at org .drools .base.DefaultKnowledgeHelper.retract(DefaultKnowledgeHelper.java:214) at procs .Rule_my_business_rule_0 .defaultConsequence(Rule_my_business_rule_0.java:8) at procs .Rule_my_business_rule_0DefaultConsequenceInvoker .evaluate(Rule_my_business_rule_0DefaultConsequenceInvoker.java:29) at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java: 917) The stack trace is different to the one in JBRULES-2796 in that mine is caused by a retract rather than an update. We've created several Flows and associated rules and this issue has only just come up with a recently created one. Firstly, is this the same issue? If it is, where could I find previous releases of Drools so that I may try to downgrade? Alternatively is there some 5.1 - 5.2 migration documentation? I have tried rewriting the rule that triggers this as there was a comment on rules-dev that this made the error go away though I am having trouble coming up with different ways to write it as it is quite a simple rule. Is there something specific I should try to avoid? -- Gareth Evans Application Developer Geneoz Pty Ltd http://www.geneoz.com gev...@geneoz.com +61 8 9212 2200 (Phone) +61 8 9212 2299 (Fax) PO Box 1128 Bentley DC, WA 6983 AUSTRALIA Now Introducing... geneoz VMS The Vivarium Management Solution http://www.geneoz.com This email contains information that is private and confidential and must be read only by the person to whom it is addressed. This email is not a contract and does not give rise to a legally binding agreement. Prices quoted are valid for 30 days and are subject to exchange rate fluctuations. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Guvnor service to compile part of a package ?
On 2011/5/4 22:57, Vincent Legendre wrote: Hi all, I am looking for a clever way to compile only parts of a Guvnor package according to some criteria on items (categories, metadata ...), but outside Guvnor if possible. The main idea starts by the fact that it is a little bit complex for a business user to manage packages and compilations, and even more if he has to manage conditional compilations (using selectors) of a single package to produce multiple KB compiled according to business criterions. I want to compile automatically some KB according to categories (more generally asset's fields) with something external to Guvnor. Thus I need a way to query Guvnor repository with criterion to get either : - the corresponding ressources (DRL) - the filtered compiled KB (PKG ressource) Filtering with DRL (like custom selectors in Guvnor) will be perfect, using a custom class too. Is there such service ? Does the KnowledgeAgent allow filtering (did not see anything in docs) ? Not sure about KnowledgeAgent, I ll leave this question to someone more familiar with KnowledgeAgent. At the same time, you can probably use Guvnor REST service to achieve same goal. Check this example: http://community.jboss.org/wiki/PublishDroolsartifactsfromaproductionenvironment. This example polls package feed periodically to check if there is a new version of package available. If there is a new version created, it will download the package compiled binary. Package binary is compiled against selectors, so it is filtered as you need. Cheers, Jervis Or do I need to add a new service in Guvnor war directly ? Thanks! ___ 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] Unable to create DSL properly?
I'm trying to create DSL and DSLR out of DRL but so far unsuccessfull with this small example- DRL (Working OK)- #created on: Apr 30, 2011 package com.fire #list any import classes here. import com.fire.*; #declare any global variables here rule When there is a fire turn on the sprinkler when #conditions Fire( $room : room ) $sprinkler : Sprinkler( room == $room, on == false ) then #actions modify($sprinkler){setOn(true)}; System.out.println( Turn on the sprinkler for room + $room.getName() ); end DSL- [condition][]There is fire in {room}=Fire( {room} : room ) [condition][]{sprinkler} is in same {room} and sprinkler is {off}={sprinkler} : Sprinkler( room == {room}, on == {off} ) [consequence][]Turn on the {sprinkler}=modify({sprinkler}){setOn(true)}; DSLR- (Error message when compiling mismatched input) #created on: Apr 30, 2011 package com.fire expander fireAlarm.dsl #list any import classes here. import com.fire.*; rule When there is a fire turn on the sprinkler when #conditions There is fire in {room} {sprinkler} is in same {room} and sprinkler is {off} then #actions Turn on the {sprinkler} log; end Can somebody point out what I am doing wrong? -- View this message in context: http://drools.46999.n3.nabble.com/Unable-to-create-DSL-properly-tp2901873p2901873.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users