Re: [rules-users] Constants?

2013-02-18 Thread Ansgar Konermann
We use dedicated Java classes named after the kind of constant they represent, like Slack in your case or RetirementAge, LegalAgeThreshold. Most of the time, they contain a single property "value". This makes it easy to use Drools patterns to match them, plus we get rather strong type checking dur

[rules-users] How to determine Drools runtime version?

2012-12-29 Thread Ansgar Konermann
Hi, I'd like to determine at runtime which version of Drools is in use/on the classpath. I cannot use reflection on the Drools classes itself, as this will not work in the intended runtime environment (Google App Engine). The following code works in a normal Java VM, but not in GAE: Package

Re: [rules-users] continuous integration of rule assets via jenkins to guvnor?

2012-10-03 Thread Ansgar Konermann
Hi, we use drools for mortgage risk assessment and use TeamCity for continuous integration of rules. Our source code is *.drl (no DSL or processes yet). Rules get unit tested (TestNG), compiled into binary packages and some integration tests run against each of these packages. If all is good, we

Re: [rules-users] Runtime Analysis and Auditing

2012-09-24 Thread Ansgar Konermann
Please allow me to be curious. Could the same be achieved with a comprehensive suite of automated rules tests, showing that they work as specified? What would a test suite lack in comparison to your desired auditing solution? Best regards Ansgar Am 25.09.2012 00:08 schrieb "dme1" : > Hi, > > I

Re: [rules-users] Drools with rules from database

2012-08-23 Thread Ansgar Konermann
Question: for a single lookup like the one shown in the rule you reference, do you want to add another technology to your stack (or rather code that in Java)? Am 23.08.2012 17:09 schrieb "Michael Anstis" : > You will need to insert both Employee and EmployeeTypeSalary objects into > WM:- > > Emplo

Re: [rules-users] Logical insert and cyclic rules dependences

2012-07-02 Thread Ansgar Konermann
Am 02.07.2012 15:29, schrieb zephyr: > zephyr wrote >> I want to use "magick" of logical insert to keep dynamically changing >> inferred facts up to date. The problem are cyclic dependences: >> >> "a -> b" means "when a than insertLogical( new b()) end" >> >> a -> b >> b -> c >> c -> b >> >> when i

Re: [rules-users] maven drools compiler (plugin)

2012-04-13 Thread Ansgar Konermann
nge > at org.sonatype.aether.impl.internal.DefaultDependencyCollector.process(DefaultDependencyCollector.java:376) > at org.sonatype.aether.impl.internal.DefaultDependencyCollector.process(DefaultDependencyCollector.java:544) > at org.sonatype.aether.impl.internal.DefaultDependencyCollector.collectDe

Re: [rules-users] maven drools compiler (plugin)

2012-04-13 Thread Ansgar Konermann
re >> >> Caused by: org.sonatype.aether.resolution.VersionRangeResolutionException: No versions available for org.easytesting:fest-assert:jar:[1.4, 2.0) within specified range >> at org.sonatype.aether.impl.internal.DefaultDependencyCollector.process(DefaultDependencyCollector.java:376) >> at org.sonatype.aethe

Re: [rules-users] maven drools compiler (plugin)

2012-04-13 Thread Ansgar Konermann
requests to get your >>> changes back into blessed (but I can guarantee I 'll merge any >>> non-conflicting pull requests frequently and won't let them go stale) >>> - We 'd need at least a few lines of documentation in: >>> >>> https://github.c

Re: [rules-users] maven drools compiler (plugin)

2012-04-10 Thread Ansgar Konermann
nd won't let them go > stale) > - We 'd need at least a few lines of documentation in: > > > https://github.com/droolsjbpm/drools/tree/master/drools-docs/drools-expert-docs > > We can worry about the more advanced features (such as aether >

Re: [rules-users] maven drools compiler (plugin)

2012-04-05 Thread Ansgar Konermann
Am 05.04.2012 21:48 schrieb "Sean Su" : > > Hello, guys, > > I did some search online and it seems we do not have any official plugin that allows us to compile Drools rules as part of the maven build. There is already a jira issue for it: https://issues.jboss.org/browse/JBRULES-1273 Result so far

Re: [rules-users] How to include one .drl file from another .drl file

2012-03-09 Thread Ansgar Konermann
Am 09.03.2012 19:16 schrieb "Shur, Bob" : > > Is there something like #include for drl files? That is, something like this: > > rule "1" > when > then > doSomething; > end > > #include "another.drl" > > rule "2" > when > ... > > I know I can load multiple drl files into the knowledge base in Java.

Re: [rules-users] Drools 5.3 on Glassfish

2012-01-14 Thread Ansgar Konermann
Am 14.01.2012 10:42, schrieb Geoffrey De Smet: > The tomcat war also works on jetty. The documentation says to use the > tomcat war if there is no specific war. > Maybe we should rename the tomcat war to "generic" war. +1 on the rename. Was a bit confused when I looked for a WAR to drop into my Je

Re: [rules-users] Running rules from the past

2011-12-26 Thread Ansgar Konermann
only contain the rules associated with it and not a complete > application. > Cheers > > 2011/12/26 Ansgar Konermann : > > > > Am 26.12.2011 18:16 schrieb "Mauricio Salatino" : > > > > > >> > >> Did you try Guvnor? it already store

Re: [rules-users] Running rules from the past

2011-12-26 Thread Ansgar Konermann
. Releases are normally kept forever. Or, at least in my environment, deleting releases is done with extra extra care -if at all-, whereas snapshots older than a week or so get removed automatically on a daily basis. Best regards, Ansgar > Cheers > > > 2011/12/26 Ansgar Koner

Re: [rules-users] Running rules from the past

2011-12-26 Thread Ansgar Konermann
Am 26.12.2011 18:08 schrieb "Celso Junior" : > > Hi folks, > > I work at a bank Me too (sort of) > and I am currently studying the best way to use JBoss Rules so that it fits our needs. Our loan analysis process can take several months depending on the type of the loan. Although our business rule

Re: [rules-users] check if a Enum object is present in condition

2011-10-22 Thread Ansgar Konermann
Am 22.10.2011 20:28 schrieb "Martin A" : > > Hello, > > I try to put a condition in my LHS, such as: > > rule "initial_playground_dialog" > #agenda-group "firstTimeUser" > #salience 99 > when > $gst : GameStateController(!hasEventOccurred("initial_playground_dialog")) >

Re: [rules-users] rule limit

2011-10-06 Thread Ansgar Konermann
Am 06.10.2011 18:48, schrieb slyfox: > thanks for all of the responses, fun to read :) > > Sorry I thought it was pretty strait forward question. I would assume > somehow the parser 'knows' how many rules are in a drl file > > I do not want an over ambitious user to just create rule after rule

Re: [rules-users] rule limit

2011-10-05 Thread Ansgar Konermann
Hi Slyfox, nice to read you. Am 05.10.2011 23:49, schrieb slyfox: > is this something I missed in the doc As you are talking about "the doc", it seems you have a particular part of the solution already in mind (the product/tool you'd like to use to enforce the size limit). Up to now, you did not

Re: [rules-users] rule limit

2011-10-04 Thread Ansgar Konermann
Am 04.10.2011 23:27, schrieb Bobby Richards: > Is it possible to limit the number of rules in a drl file? Yes. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users

[rules-users] Maven Drools Plugin needs proper de-serialization support from DroolsStreamUtils

2011-09-26 Thread Ansgar Konermann
Hi all, I think I've found a bug in DroolsStreamUtils. It does not allow to deserialize a collection of KnowledgePackages with dependencies between the packages. In this case, it fails with ClassNotFoundException. Example: Package A contains a type declaration, package B contains a rule using thi

Re: [rules-users] Ant Build of PKG with Declared Types

2011-09-23 Thread Ansgar Konermann
Am 23.09.2011 20:03 schrieb "TroyL" : > > Thank you for the reply. I have run a number of much simpler applications in > several environments, below are my results: > > My Ant Script remains unchanged. Next things to try could be: - increase verbosity of your ant compile so you can see what is ac

Re: [rules-users] Ant Build of PKG with Declared Types

2011-09-23 Thread Ansgar Konermann
Am 16.09.2011 16:15 schrieb "TroyL" : > > I am attempting to build a PKG utilizing an Ant Script. My DRL includes two > declared types. When the declared types have only one field the PKG will > compile but when the declared types have more than one field I get an error > stating that a class of

Re: [rules-users] Options for rule versioning

2011-08-24 Thread Ansgar Konermann
Hi Rob, another approach we're considering to version rulesets used to perform mortgage risk assessment looks roughly as follows: - each of the rulesets is versioned as a whole (i. e. compile all *.drl pertaining to a ruleset into a *.pkg file and give this *.pkg a version number). - the scoring

Re: [rules-users] counting Facts

2011-07-25 Thread Ansgar Konermann
Am 25.07.2011 19:29, schrieb pamerida: > if I insert int the WM the SegmentGruoup7 (that inside contains the > SegmentGroup8) and then I insert SegmentGroup8 in the WM, wouldnt that be > duplicating the information? or drools just holds a reference to this > classes, IIRC, Drools creates an additio

[rules-users] Compatibility of serialized KnowledgePackages?

2011-06-06 Thread Ansgar Konermann
Hi all, does anyone know if KnowledgePackages which have been compiled and serialized using Drools 5.0.1 can be de-serialized with 5.1.1 or 5.2.0.CR1? What about the other way round, serializing with a more recent version and de-serializing with an older version? Are there any obstacles here due

Re: [rules-users] Reuse of rule

2011-05-30 Thread Ansgar Konermann
Am 30.05.2011 16:45, schrieb Ansgar Konermann: > [...] java beans will belong to different ClassLoaders and thus lead > to problems (AFAICT) at runtime. s/AFAICT/NoClassDefFound/ ___ rules-users mailing list rules-users@lists.jboss.org

Re: [rules-users] Reuse of rule

2011-05-30 Thread Ansgar Konermann
Am 30.05.2011 13:52, schrieb Küng Sabrina: > Hello > > How can I write a rule, that can be used in several other packages > resp. rulesets without copying the code? Hi Sabrina, the basic solution is to pre-compile the rule into a *.pkg file and load this file into any number of KnowledgeBase i

Re: [rules-users] Is there a "extends" for the "declare" of a new type?

2011-05-28 Thread Ansgar Konermann
Am 28.05.2011 18:26, schrieb Edson Tirelli: > >Wolfgang, > >I think Davide's implementation supports extending existing java > classes... did you tried? What is not possible is to implement > interfaces, since you can't define methods in the declare statement. Hi, from a user's point of vi

Re: [rules-users] drools dynamic LHS

2011-05-24 Thread Ansgar Konermann
Am 25.05.2011 00:34, schrieb marunam: > What I was thinking was, creating fact object dynamically with its > attributes being loaded from some properties file dynamically?? > > Any other solution/suggestions? Create pre-compiled rule packages: one for each state and one for the generic rules, and

Re: [rules-users] drools dynamic LHS

2011-05-24 Thread Ansgar Konermann
Am 24.05.2011 21:17, schrieb marunam: > Let's say, if the business > want to modify the rules with more fact values, I want to be able to happen > this dynamically rather than changing the code for fact values and adding it > there. Smells like YAGNI and a lot of accidental complexity. I'd code i

Re: [rules-users] Problem in compiling each rule separately

2011-04-21 Thread Ansgar Konermann
Am 19.04.2011 12:56, schrieb saurabh maheshwari: > Hi sir , > > I have 10 rules . rules are created dynamically .Now if any of them is > causing problem so none of them runs > so I want to compile each rule separately , so that i can create > knowledge base with rules which have no errors > but c

Re: [rules-users] Existing Test Harnesses for Drools?

2011-04-12 Thread Ansgar Konermann
On 12.04.2011 14:46, John Peterson wrote: > I was wondering if anyone out there is aware of any Test Harnesses > that could be used for regression testing Drools applications out there? > > We found this spreadsheet tester from Michael Neale: > _https://github.com/michaelneale/rule-spreadsheet-t

Re: [rules-users] maven-drools-plugin, anyone?

2011-03-10 Thread Ansgar Konermann
cker (also linked from the web page). Best regards Ansgar > Op 09-03-11 22:42, Mauricio Salatino schreef: > >> I will take a look on that right now.. >> I was planning to do the same for some of my example projects. >> I will come back with some feedback! >> Gre

[rules-users] maven-drools-plugin, anyone?

2011-03-09 Thread Ansgar Konermann
Hi, I prepared a tiny drools compiler plugin for Maven 3. It currently contains the smallest feature-set which is potentially useful for my colleagues at work, so up to now it's no more than a starting point for my team. Nevertheless, I invite you to take a look at it, comment on it and sugges

Re: [rules-users] unsolved myth regarding transitive closure using insertlogical...

2011-02-21 Thread Ansgar Konermann
On 21.02.2011 04:11, Mark Proctor wrote: > On 21/02/2011 03:03, Simon Chen wrote: > >> On Sun, Feb 20, 2011 at 8:20 PM, Ansgar Konermann >>wrote: >> >>> On 19.02.2011 16:01, Simon Chen wrote: >>> >>>> The example

Re: [rules-users] unsolved myth regarding transitive closure using insertlogical...

2011-02-20 Thread Ansgar Konermann
On 19.02.2011 16:01, Simon Chen wrote: > The example you gave seems to be the one-hop case. For the two-hop > case, we need something like this > > when > edge(a, b), reach(b, c), not exists reach(a, c) > then > insertLogical( reach(a,c) ) > > So, where do you put your logical around? It sh

Re: [rules-users] Real World Examples Wanted!!!!!!

2011-01-12 Thread Ansgar Konermann
On 12.01.2011 19:06, Mark Proctor wrote: > We often get complaints about not enough real world examples in Drools. > We have a large community now, so surely a few of you must be able to > write up examples based on your work? So please, please, please, please > take the time to help us here. >

[rules-users] Compiling rules using maven?

2011-01-07 Thread Ansgar Konermann
Hi, is there any official support for compiling *.drl files into pre-compiled binary rule packages using a maven plugin? I found reminescents of a maven plugin in the ticket tracking system, but the code seems to be orphaned. Thanks in advance Ansgar __

[rules-users] Can I deploy pre-compiled drools rules as OSGi bundles?

2011-01-07 Thread Ansgar Konermann
Hi, I heard that drools was called "OSGi ready" some time ago. As I am new to OSGi, I'd like to hear some opinions on whether the following scenario would work for rules deployment: For the drools part: - pre-compile all rules into a binary package file - include these file as a resource into a

Re: [rules-users] "Negative" Rules

2010-12-16 Thread Ansgar Konermann
On 15.12.2010 10:01, Diego San Esteban wrote: Greetings, How is itpossible to implement a "rollback"in theKB? Suppose that when retracting a fact,I want toundo the changes made. A very simple, yet effective solution would be to exclusively use insertLogical(). No updates to f

Re: [rules-users] I'd like to get Drools 5.0

2010-09-01 Thread Ansgar Konermann
On 31.08.2010 18:30, Mauricio Salatino wrote: > probably you can build the old version using some branch. > http://anonsvn.jboss.org/repos/labs/labs/jbossrules/branches/5.0.x/ No need to build drools yourself, see here: https://repository.jboss.org/nexus/ It's in the public JBoss maven repo, bene

Re: [rules-users] Call for Vote: Drools support in IntelliJ IDEA

2010-05-21 Thread Ansgar Konermann
> This is about pushing the *IDEA* core team to implement Drools support, not the Drools core team. Just vote for this feature in their issue tracking system and then let's see what happens... Ansgar > Mark > > On 21/05/2010 22:41, Ansgar Konermann wrote: > >> H

[rules-users] Call for Vote: Drools support in IntelliJ IDEA

2010-05-21 Thread Ansgar Konermann
Hi everyone, I'm wondering whether there are any Drools users on this list using IntelliJ IDEA to do their regular development work. As you might know, there is currently no Drools support in IntelliJ IDEA. However, it would be nice to have this support. Switching between your Java / Groovy /

Re: [rules-users] Java Enums in Guvnor

2010-05-19 Thread Ansgar Konermann
Hi Ian, I tried using Enums with Guvnor twice: once back in the 4.0 times of Drools, once again when we got the 5.0 update. My experience: Java enums and Guvnor simply don't work together. Stick with writing DRL rule files in a text editor, or even better, using the Eclipse plugin. This way,

[rules-users] Rules packaging and (binary?) reuse: searching for best practices

2010-05-11 Thread Ansgar Konermann
Hi all, I'm in search of a better way to package rules into a binary format before they get deployed - one that eases rules reuse more than the technique currently in use at my employer. We're using drools expert to perform risk assessment and feasibility checks for mortgage loans of a signifi

Re: [rules-users] Double Handling

2010-04-12 Thread Ansgar Konermann
Ade Timi wrote: > > Thanks guys for your responses. This should be as simple as it gets, > which adds to my frustration. See the following code below: > > *Java classes:* > > *Individual* – > > *public* *class* Individual { > > *private double assetCost;* > > * * > > *public* *void* set

Re: [rules-users] Guvnor Testing Scenarios and Enums Instantiations

2010-04-09 Thread Ansgar Konermann
blinton wrote: > Hello, > > Using the following imported enum: > > public enum Status { > INCOMPLETE, > COMPLETE > } > > And the following rule: > > when > status : Status(this == Status.COMPLETE) > then > // ... > > We're attempting to write a guvnor test scenario for this

Re: [rules-users] creating .pkg from .drl

2010-04-02 Thread Ansgar Konermann
On 03.04.2010 00:40, Amit Kumar wrote: > Hi Folks, > > I am trying to create a .pkg file (for probably faster loading) from a > .drl file > > Does anybody has a code snippet which I can use. Am unable to find it > in javadocs. Hi, from what we figured out at work, they're just plain serialized

Re: [rules-users] Importing Fact model in Eclipse

2010-04-02 Thread Ansgar Konermann
On 02.04.2010 22:48, Shailesh Hedaoo wrote: Hi I have created a Drools project and trying to create a guided rule in Eclipse 3.5 and Drools 5.0.x. I have my own domain objects in another java project to be used by Drools project. I want to use the java domain model as the "fact model" in my D

Re: [rules-users] rules-users Digest, Vol 40, Issue 55

2010-03-15 Thread Ansgar Konermann
On 15.03.2010 13:46, Nilima R wrote: Can someone tell me how to use create enums with Dynamic values in Guvnor. For example I need enum which does not contain static value like A,B,C rather these A,B,C values come from database. Hi, if the set of allowable enum literals/values is altogether d

Re: [rules-users] Accumulator function

2010-03-10 Thread Ansgar Konermann
On 10.03.2010 17:52, Glenn Macgregor wrote: What configuration file is this referring to and/or what system property can I set to make this work. This might be helpful: http://blog.athico.com/2009/06/how-to-implement-accumulate-functions.html Regards Ansgar ___

[rules-users] Call for Vote: Drools support in IntelliJ IDEA

2010-02-24 Thread Ansgar Konermann
Hi everyone, I'm wondering whether there are any Drools users on this list using IntelliJ IDEA to do their regular development work. As you might know, there is currently no Drools support in IntelliJ IDEA. However, it would be nice to have this support. Switching between your Java / Groovy /

Re: [rules-users] Using Collections in LHS

2010-02-24 Thread Ansgar Konermann
Am 24.02.2010 08:37, schrieb Wolfgang Laun: You really ought to read all the pertaining sections in the Drools Expert manual and experiment. Nobody can write complex rules without some exercise. 2010/2/24 dhari mailto:sdh...@hotmail.com>> Thanks Jeffery. I'll try this but what if I have

Re: [rules-users] memberOf mvel list

2010-02-21 Thread Ansgar Konermann
Hi Adam, try operator "in" instead of "memberOf". AFAIK, "in" deals with list literals (which is what you want) whereas "memberof" can be used to check whether some value is part of a collection given as variable reference. Kind regards Ansgar Am 21.02.2010 23:14, schrieb deaddowney: > I'm u

Re: [rules-users] Can I do a Collection contains Collection?

2010-02-19 Thread Ansgar Konermann
EdenAEL20 schrieb: > when I replace Zipcode with type "int" as that is my type drools throws me an > error saying it doesn't recognize the class. Is there some special way to > declare primitive types? > Use the wrapper classes, i. e. Integer instead of int. Since java does autoboxing/unboxing,

Re: [rules-users] Can I do a Collection contains Collection?

2010-02-19 Thread Ansgar Konermann
Hi, untested guess (replace ZipCode by actual type name of your ZIP code data): rule "example" when $validZipCodes: Set() from RefData.getValidZipCodes() Example( $actualZips: zips ) exists( ZipCode( this not memberof $validZipCodes ) from $actualZips ) then error() end