[rules-users] How to use type-safe enums in rule condition

2013-11-12 Thread droolster
Hello, I would like to use type-safe enums in my rules. At the moment I have situation like this: public class Country { private String name; // getter/setters } rule "Country" when Country ( name == "USA" ) then DO SOMETHING end I would like to have something

Re: [rules-users] How to use type-safe enums in rule condition

2013-11-12 Thread Stephen Masters
That rule would work if you added a “name” property to Country. As a general tip on working with countries, always work with their ISO codes, not their names. http://en.wikipedia.org/wiki/ISO_3166-1 … ideally the 2-char codes, which are much more commonly used than the 3-char codes. Feel free

[rules-users] drools camel server execution has result but reponse empty result

2013-11-12 Thread scarlettxu
Hi Expert, I have a strange problem need your kind assistance! I have deployed the drools server 5.5.0 to my tomcat, and I can use the wrapped testing case without problem in the last week when I type http://localhost:8080/camel-client/test.jsp then the response will be Reuqest: "Hello World" R

Re: [rules-users] Out of Mem and thousand threads : Disabling JIT ?

2013-11-12 Thread Raphael
Any help ? A simple hint to turn JIT off would help. Thanks. -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-Out-of-Mem-and-thousand-threads-Disabling-JIT-tp4026694p4026742.html Sent from the Drools: User forum mailing list archive at Nabble.com.

Re: [rules-users] How to use type-safe enums in rule condition

2013-11-12 Thread Wolfgang Laun
Using the same name for a fact class Country and an enum Country will most certainly not be possible unless you use full class names for disambiguation. And, of course, the name property of fact class Country would have to have the enum type. -W On 12/11/2013, Stephen Masters wrote: > That rul

Re: [rules-users] Out of Mem and thousand threads : Disabling JIT ?

2013-11-12 Thread Mario Fusco
Raphael, the option to disable jitting is in the class PermGenThresholdOption and the property name is drools.permgenThreshold. The idea there was that the main problem that jitting could cause is the PermGen occupation, so we decided to provide an option to set the percentage of PermGen space th

Re: [rules-users] How to use type-safe enums in rule condition

2013-11-12 Thread droolster
Thanks Steve for the advice and code! Awesome. -- View this message in context: http://drools.46999.n3.nabble.com/How-to-use-type-safe-enums-in-rule-condition-tp4026739p4026745.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___

[rules-users] Equal shift assignment based on employment form

2013-11-12 Thread ns
Hi, I would like to distribute shifts equally among employees based on their employment form (full time or part time: 100%, 75%, 50%, ...). I have a variable for each employee that holds the employment form. How do I make sure all shifts get distributed equally, so that somebody that works 50% of

Re: [rules-users] Out of Mem and thousand threads : Disabling JIT ?

2013-11-12 Thread Raphael Jolivet
Hi, Thanks for the hint. I have looked around for a generic solution of OutOfMemory, native thread, etc : https://community.jboss.org/thread/164955 It seems actually that Drools uses a thread pool for Jitting and that in my case the thread pool thinks it can create an infinity of threads : and it

Re: [rules-users] Out of Mem and thousand threads : Disabling JIT ?

2013-11-12 Thread Raphael Jolivet
Hi again. I have looked at PermGenThresholdOption but do not find an exmaple of how to set those option porgammatically: KnowledgeBuilder#newKnowledgeBase() does not seem to take any configuration. Thanks for your help. Raphael ___ rules-users mailing l

[rules-users] Business Rules Webinar - we're looking for speakers

2013-11-12 Thread mkasprzyk
Hello everyone! I'm writing to you regarding a Business Rules webinar we are organizing. We are searching for speakers able to deliver 2-hour sessions in topics given below. (All the information below is just a proposition and still can be changed. Your suggestions are welcome!) Event details: B

[rules-users] Problem in writing rule and apply DSL

2013-11-12 Thread braveheart85
Hello guys, I really need your help. I'm writing a DSL file in order to allow my application user to write their simple rules. I have queries of this typology: $a: Data( ) $b: Year( ) from $a.years $c: Person( ) from $b.persons dsl mapping (inline version): there are persons=$a: Data( ) $b: Yea

[rules-users] Calling RuleSet from a Function/Another Rule

2013-11-12 Thread Chakraborty, Ayon (Genworth, Contractor)
Hello All, We are trying to migrate from Blaze to Drools Guvnor. In Blaze Rule Language, we have functions where depending on conditions, we can call one RuleSet or Decision Table. Is there any functionality in Drools where I can call rule inside another rule depending on some conditions. ( Su

Re: [rules-users] Access global functions in Test Scenarios in Guvnor

2013-11-12 Thread Michael Anstis
Guvnor's Test Scenarios do not provide the means to test arbitrary DRL (such as functions, queries etc); only rules. The only real work-around would be to write a dummy rule that invokes the function and then check that the rule is working as expected. With kind regards, Mike On 10 November 20

Re: [rules-users] Calling RuleSet from a Function/Another Rule

2013-11-12 Thread Lance Leverich
Hi Ayon, I'm not personally familiar with Blaze, but I can tell you that in Drools, rules are not something that you "call". In Drools, rules are evaluated whenever the facts in your WorkingMemory change; and the consequences are executed according to agenda/rule-flow group, and salience settings.

Re: [rules-users] How to use type-safe enums in rule condition

2013-11-12 Thread Steven Williams
I use something like the following in rules to good effect: Country( this == Country.USA ) --- Steven Williams On Wed, Nov 13, 2013 at 12:20 AM, droolster wrote: > Thanks Steve for the advice and code! Awesome. > > > > -- > View

Re: [rules-users] drools camel server reponse empty result

2013-11-12 Thread scarlettxu
Hi everyone, Thanks for your attention to my question! I just fixed this problem I fix it by set the log level to info in log4j.properties I have set the log level to trace yesterday, I just thought of it maybe the log level cause it. though the problem is solved, I still cannot understand, w

Re: [rules-users] Scala, Groovy, Clojure, etc. Bindings

2013-11-12 Thread sirinath
We will be interested in the the Scala and Java DSL. More particularly the Scala DSL. This would be a better fit. We like to contribute but being a startup I am not sure how much we will be able to follow through with contributing. -- View this message in context: http://drools.46999.n3.nabble

[rules-users] Nullable Planning Variable

2013-11-12 Thread newbie
According to Drools 5.5 reference doc "Nullable planning variables are not supported for construction heuristics in 5.5.x or lower." I cannot config the planning variable to be null using drools 5.5? -- View this message in context: http://drools.46999.n3.nabble.com/Nullable-Planning-Variable-