[rules-users] Nullable Planning Variable
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-tp4026757.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] Scala, Groovy, Clojure, etc. Bindings
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.com/Scala-Groovy-Clojure-etc-Bindings-tp4026726p4026756.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] drools camel server reponse empty result
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, why log level will affect the response? I print some log of the response to two log level INFO log level TRACE log level -- View this message in context: http://drools.46999.n3.nabble.com/drools-camel-server-reponse-empty-result-tp4026741p4026755.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] How to use type-safe enums in rule condition
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 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 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] Calling RuleSet from a Function/Another Rule
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. When the consequence of a rule introduces changes (adds a new fact, updates an existing fact, removes/retracts an existing fact) to the WorkingMemory, the rules that may be affected by that change are re-evaluated. Any new consequences are scheduled for execution, based upon the agenda/rule-flow group and/or salience settings. Any previously scheduled consequences may also be removed from the schedule, if the rule which caused them to be scheduled is no longer true. All of that said, if what you are wanting to accomplish is controlling the order of when consequences are executed then you should learn more about agendas, rule-flow groups, and salience. Otherwise, in order to cause a rule's consequences to execute, you should make sure your facts support the rule. Hope this helps, Lance Leverich ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Access global functions in Test Scenarios in Guvnor
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 2013 19:50, franky0517 wrote: > Hi, > > I have written a function in Guvnor. Now I am creating a test scenario > where > I want to call this function. As test scenario doesnt have "Free from DRL" > option, is there an another way to call the function ? > > Thanks, > Asim > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Access-global-functions-in-Test-Scenarios-in-Guvnor-tp4026717.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] Calling RuleSet from a Function/Another Rule
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. ( Suppose I have my DRL file and I want to call another rule in the action of one rule) Is that possible in Drools Guvnor 5.5? Any possible alternative ways in Drools? Thanks, Ayon Chakraborty ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Problem in writing rule and apply DSL
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: Year( ) from $a.years $c: Person( ) from $b.persons now if i would add attribute to person i can't, for example to get persons over 18 years old. If i write: there are persons - age more than 18 drools engine try to add attribute to Data object, probably because it is first object in line. To resolve this problem i should write query something like: $c: Person( ) from ( Year( ).persons from Data( ).years ) In this way i can add attribute to Person instead of Data. Unfortunatly i don't know how can i get it. Someone can help me please. Best Regards -- View this message in context: http://drools.46999.n3.nabble.com/Problem-in-writing-rule-and-apply-DSL-tp4026751.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] Business Rules Webinar - we're looking for speakers
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: Business Rules Applied - From Theory to Business A series of four 2-hour webinars on Business Rules Approach date: 22-23th January 2014 (Wed-Thu) or 12-13th March 2014 (Wed-Thu) language: English Proposed agenda: Day 1 (Wednesday, 22.01.14 or 12.03.14) 15:00-17:00 (CET) - Business Rules Approach - know what your business is doing 17:30-19:30 (CET) - Rules in Action, from requirements to executable rules in examples Day 2 (Thursday, 23.01.14 or 13.03.14) 15:00-17:00 (CET) - Combining Business Rules and Processes 17:30-19:30 (CET) - Different solutions in Business Rules approach* In January/March CET = GMT+1. *BR Solutions session We'd like to dedicate this session of the webinar to specific tools that make implementing BRs easier, so we'd like to offer four 30-minute blocks to 4 different BRMS vendors. Structure of the presentations: (sessions 1-3) 15 min - TED-like speech about your personal story connected to the business rules (e.g. success/failure stories)** 1h 15 min - case study/software use presentation 20 min - Q&A 10 min - your company promotion presentation **TED-like presentation notice I am also a TEDx organizer and I believe in TED-like talk form and spreading ideas. Therefore we would like to make sure that the first 15-30min of the presentation explains the benefits and vision of business rules approach and automation and the way it will impact the world we live in. Why should you do it? -strengthen your personal brand and/or the brand of your company, -your company will have dedicated pag on webinar's website, -have the opportunity to present your company in front of a targeted audience, -expand your business network, -optionally offered presentation coaching to prepare a TED-like speech, -have access to other sessions of the webinar. Final words If you are interested in leading one of the sessions or you have any questions, don't hesitate to write to m...@nobleprog.com. Have a good day! Mike Kasprzyk -- View this message in context: http://drools.46999.n3.nabble.com/Business-Rules-Webinar-we-re-looking-for-speakers-tp4026749.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] Out of Mem and thousand threads : Disabling JIT ?
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 list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Out of Mem and thousand threads : Disabling JIT ?
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 does. But at one point, the System blocks it (based on ulimit -a settings or actual memory issues) It seems to me that Jit compilation requires fine tuning for it to work, and all those configuration magic numbers (JIT_THRESHOLD and so on) should not be hidden to the user and properly documented. In am running Drools in the context of a J2EE environment (JBoss in my case). And thread pool settings is already a critical topic. We definitely need more control (more visible ones) on those issues. I will try to diable JIT in my case in the meantime, but I am waiting forward to be able to use it in the future :) Thanks again, Brgds, Raphael ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Equal shift assignment based on employment form
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 the time only gets half the shifts assigned than someone who works 100%. And how do I make sure shifts that employee need to do are distributed equally over time. So for example we have 20 shifts a month and 5 employees. How do I make sure I get a plan like e1, e2, e3, e4, e5, e1, e2, e3, e4, e5, ... Instead of e1, e1, e1, e1, e1, e2, e2, e2, e2, e2. Thanks. Kind regards, Nick -- View this message in context: http://drools.46999.n3.nabble.com/Equal-shift-assignment-based-on-employment-form-tp4026746.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] How to use type-safe enums in rule condition
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 mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Out of Mem and thousand threads : Disabling JIT ?
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 that can be used before it stops jitting. Of course if you set that value to 0 it will cause to disable jitting completely. As for the problem you're reporting it sounds a bit weird to me because we're using a cached thread pool Executor there. Anyway I'll try to reproduce the problem and check how I could prevent this. Thank you for having reported it, Mario -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-Out-of-Mem-and-thousand-threads-Disabling-JIT-tp4026694p4026744.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] How to use type-safe enums in rule condition
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 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 to steal this: > https://github.com/gratiartis/sctrcd-payment-validation-web/blob/master/src/main/java/com/sctrcd/payments/enums/CountryEnum.java > > … which sets up all countries with ISO codes and full-text names as enums. > Or at least all countries which were included in the ISO spec at the time of > writing. > > Grab it while you can - I’m in the middle of refactoring it into a JPA > entity. :) > > Steve > > > On 12 Nov 2013, at 10:20, droolster wrote: > >> 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 like this: >> >> public enum Country { >>USA () >>// list of all countries in the world >> } >> >> and in the rule I would like to do this: >> >> rule "Country" >>when >>Country ( name == Country.USA ) >>then >>DO SOMETHING >> end >> >> Is that possible? >> >> Thanks in advance for your help. >> >> >> >> >> >> >> -- >> View this message in context: >> http://drools.46999.n3.nabble.com/How-to-use-type-safe-enums-in-rule-condition-tp4026739.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] Out of Mem and thousand threads : Disabling JIT ?
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. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] drools camel server execution has result but reponse empty result
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" Response: "Hello World" Today, I run it normally at first, but later I want to try to use the https so I change the url to https://localhost:8443/camel-client/test.jsp however the result is Reuqest: "Hello World" Response: "" then I change back to use http, still have empty response I have checked the log, there is execution result returned back, but just the response is empty Anybody can kindly check my problem? I have debug it for a whole day, but have not figure out this strange problem. below is the log for reference 19:23:56,015 TRACE CxfRsProducer:183 - Response body = org.apache.cxf.jaxrs.impl.ResponseImpl@26d6466f 19:23:56,016 TRACE DefaultCxfRsBinding:195 - Populate external header Date=[Tue, 12 Nov 2013 11:23:55 GMT] as Date 19:23:56,016 TRACE DefaultCxfRsBinding:195 - Populate external header Content-Length=[268] as Content-Length 19:23:56,016 TRACE DefaultCxfRsBinding:195 - Populate external header Content-Type=[text/plain] as Content-Type 19:23:56,016 TRACE DefaultCxfRsBinding:195 - Populate external header Server=[Apache-Coyote/1.1] as Server 19:23:56,017 TRACE DefaultTypeConverter:88 - Converting org.apache.cxf.jaxrs.impl.ResponseImpl -> java.lang.String with value: org.apache.cxf.jaxrs.impl.ResponseImpl@26d6466f 19:23:56,018 TRACE DefaultTypeConverter:88 - Fallback type converter StaticMethodFallbackTypeConverter: public static java.lang.Object org.apache.camel.component.cxf.converter.CxfConverter.convertTo(java.lang.Class,org.apache.camel.Exchange,java.lang.Object,org.apache.camel.spi.TypeConverterRegistry) converted type from: java.lang.String to: org.apache.cxf.jaxrs.impl.ResponseImpl 19:23:56,018 TRACE InstrumentationProcessor:88 - to: Recording duration: 182 millis for exchange: Exchange[Message: echo:Hello World] 19:23:56,018 TRACE DefaultTypeConverter:82 - Converting org.apache.cxf.jaxrs.impl.ResponseImpl -> java.lang.String with value: org.apache.cxf.jaxrs.impl.ResponseImpl@26d6466f 19:23:56,019 TRACE DefaultTypeConverter:82 - Fallback type converter StaticMethodFallbackTypeConverter: public static java.lang.Object org.apache.camel.component.cxf.converter.CxfConverter.convertTo(java.lang.Class,org.apache.camel.Exchange,java.lang.Object,org.apache.camel.spi.TypeConverterRegistry) converted type from: java.lang.String to: org.apache.cxf.jaxrs.impl.ResponseImpl 19:23:56,019 TRACE AsyncProcessorHelper:82 - Exchange processed and is continued routed synchronously for exchangeId: ID-icilszxnb126-46148-1384255363195-1-1 -> Exchange[Message: ] 19:23:56,019 TRACE DefaultTypeConverter:82 - Converting org.apache.cxf.jaxrs.impl.ResponseImpl -> java.lang.String with value: org.apache.cxf.jaxrs.impl.ResponseImpl@26d6466f 19:23:56,020 TRACE DefaultTypeConverter:82 - Fallback type converter StaticMethodFallbackTypeConverter: public static java.lang.Object org.apache.camel.component.cxf.converter.CxfConverter.convertTo(java.lang.Class,org.apache.camel.Exchange,java.lang.Object,org.apache.camel.spi.TypeConverterRegistry) converted type from: java.lang.String to: org.apache.cxf.jaxrs.impl.ResponseImpl 19:23:56,020 TRACE AsyncProcessorHelper:82 - Exchange processed and is continued routed synchronously for exchangeId: ID-icilszxnb126-46148-1384255363195-1-1 -> Exchange[Message: ] 19:23:56,020 TRACE DefaultTypeConverter:82 - Converting org.apache.cxf.jaxrs.impl.ResponseImpl -> java.lang.String with value: org.apache.cxf.jaxrs.impl.ResponseImpl@26d6466f 19:23:56,021 TRACE DefaultTypeConverter:82 - Fallback type converter StaticMethodFallbackTypeConverter: public static java.lang.Object org.apache.camel.component.cxf.converter.CxfConverter.convertTo(java.lang.Class,org.apache.camel.Exchange,java.lang.Object,org.apache.camel.spi.TypeConverterRegistry) converted type from: java.lang.String to: org.apache.cxf.jaxrs.impl.ResponseImpl 19:23:56,021 TRACE AsyncProcessorHelper:82 - Exchange processed and is continued routed synchronously for exchangeId: ID-icilszxnb126-46148-1384255363195-1-1 -> Exchange[Message: ] 19:23:56,021 TRACE DefaultTypeConverter:82 - Converting org.apache.cxf.jaxrs.impl.ResponseImpl -> java.lang.String with value: org.apache.cxf.jaxrs.impl.ResponseImpl@26d6466f 19:23:56,022 TRACE DefaultTypeConverter:82 - Fallback type converter StaticMethodFallbackTypeConverter: public static java.lang.Object org.apache.camel.component.cxf.converter.CxfConverter.convertTo(java.lang.Class,org.apache.camel.Exchange,java.lang.Object,org.apache.camel.spi.TypeConverterRegistry) converted type from: java.lang.String to: org.apache.cxf.jaxrs.impl.ResponseImpl 19:23:56,022 TRACE AsyncProcessorHelper:82 - Exchange processed and is continued routed synchronously for exchangeId: ID-icilszxnb126-46148-1384255363195-1
Re: [rules-users] How to use type-safe enums in rule condition
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 to steal this: https://github.com/gratiartis/sctrcd-payment-validation-web/blob/master/src/main/java/com/sctrcd/payments/enums/CountryEnum.java … which sets up all countries with ISO codes and full-text names as enums. Or at least all countries which were included in the ISO spec at the time of writing. Grab it while you can - I’m in the middle of refactoring it into a JPA entity. :) Steve On 12 Nov 2013, at 10:20, droolster wrote: > 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 like this: > > public enum Country { >USA () >// list of all countries in the world > } > > and in the rule I would like to do this: > > rule "Country" >when >Country ( name == Country.USA ) >then >DO SOMETHING > end > > Is that possible? > > Thanks in advance for your help. > > > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/How-to-use-type-safe-enums-in-rule-condition-tp4026739.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] How to use type-safe enums in rule condition
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 like this: public enum Country { USA () // list of all countries in the world } and in the rule I would like to do this: rule "Country" when Country ( name == Country.USA ) then DO SOMETHING end Is that possible? Thanks in advance for your help. -- View this message in context: http://drools.46999.n3.nabble.com/How-to-use-type-safe-enums-in-rule-condition-tp4026739.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