Re: [rules-users] How to handle generics in Drools?

2011-10-17 Thread Wolfgang Laun
2011/10/17 Martin A wml...@gmail.com: Hello, In my rules file I'd like to set something like this: rule mayThrowDice     when         $user : User($gp : gameplay)         $gameplay(this == $gp)     then         exists ListBoost() {             . some business logic         } This

Re: [rules-users] How to handle generics in Drools?

2011-10-17 Thread Geoffrey De Smet
Java's generics are implemented by erasure, which implies that there no information available at runtime that a instance of a List is of a certain generic type, for example Boost. So I don't think this is possible. Note that some things do work in erasure IIRC, like the generic type of a

Re: [rules-users] How to handle generics in Drools?

2011-10-17 Thread Martin A
Thanks for the prompt response! Best regards, Martin 2011/10/17 Geoffrey De Smet ge0ffrey.s...@gmail.com ** Java's generics are implemented by erasure, which implies that there no information available at runtime that a instance of a List is of a certain generic type, for example Boost. So

Re: [rules-users] [planner] Problem setting configuration file

2011-10-17 Thread Guilherme Kunigami
Hi, 2011/10/14 Geoffrey De Smet ge0ffrey.s...@gmail.com ** I was wondering now if I can achieve the same with the drools rule file. That's a bit harder, but not that hard. Look in the Drools Planner manual for setRuleBase() (as an alternative to using scoreDrl's in your SolverConfig.xml)

Re: [rules-users] How to handle generics in Drools?

2011-10-17 Thread Edson Tirelli
Geoffrey is correct. Java erasure makes it impossible to match objects based on generic types. It is also a best practice anyway to not use general purpose collections as your business entities in your business model. Best to use a properly defined business entity and then the generics issue is

Re: [rules-users] Drools Guvnor -- Not seeing Model Correctly

2011-10-17 Thread Zink, John
Thanks for the advice Mike. I did a quick read of the user manual and was able to setup a rule based on some of the fields I created in the POJO. My next thing to try was to test a rule. So thru Guvnor I setup a Test Scenario. When I click the Run Scenario I get a [package configuration

[rules-users] Does Quartz-calendar work with Drools 5.1.1 ?

2011-10-17 Thread eskomk
Hi all, Does Quartz-Calendar work with Drools 5.1.1 ? See Drools-expert user guide: http://docs.jboss.org/drools/release/5.2.0.Final/drools-expert-docs/html/ch05.html#d0e3921 We have configured Drools server as a web service with xml-files (knowledge-services.xml, camel-server.xml,

Re: [rules-users] [planner] The presumed score is corrupted

2011-10-17 Thread Guilherme Kunigami
2011/10/14 Geoffrey De Smet ge0ffrey.s...@gmail.com ** In your doMove you're doing: crew.addActivity(activity); remainingActivities.remove(activity); If crew and/or remainingActivities are used by your score rules, the working memory should be notified of their changes. That's causing

Re: [rules-users] Does Quartz-calendar work with Drools 5.1.1 ?

2011-10-17 Thread Mark Proctor
On 17/10/2011 16:44, eskomk wrote: Hi all, Does Quartz-Calendar work with Drools 5.1.1 ? See Drools-expert user guide: http://docs.jboss.org/drools/release/5.2.0.Final/drools-expert-docs/html/ch05.html#d0e3921 We have configured Drools server as a web service with xml-files

Re: [rules-users] Drools Guvnor -- Not seeing Model Correctly

2011-10-17 Thread Michael Anstis
I assume Vehicle is in your POJO model? I also assume your import statements (in your package configuration) also include Vehicle (if it is in a different package to that in which your QA Test is being defined)? 2011/10/17 Zink, John jz...@plymouthrock.com Thanks for the advice Mike. I did a