[rules-users] Natural Language

2010-02-23 Thread Amit Kumar
Hi All, As you might have understood with my so many questions :) I am looking at the capabilities of Drools and our team is looking at a comparitive analysis between Drools and ILOG One of the feature which is greatly desired is natural language editor. So I am planning to create my own DSL

Re: [rules-users] rules-users Digest, Vol 39, Issue 62

2010-02-23 Thread Nilima R
-- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20100223/ffe4d373/attachment-0001.html -- Message: 2 Date: Mon, 22 Feb 2010 22:15:08 -0800 (PST) From: dhari sdh...@hotmail.com Subject: [rules-users

Re: [rules-users] Process with subprocesses don't continue after finish work items in the subprocesses

2010-02-23 Thread Dirk
Hey Kris, I run the test and had some problems: 1. First I had empty workitems. I fix it by adding this line after creating and loading the session: ksession.getWorkItemManager().registerWorkItemHandler(Human Task, handler); But how could the test passed in your environment without this lines?

Re: [rules-users] Comparing Date with || OR operator

2010-02-23 Thread Swindells, Thomas
If it works fine with an and operator then I’d imagine that startDate $regDate returns false, with an this would abort evaluation immediately but with an or it would mean that startDate endDate is evaluated and so presumably it is this bit that is throwing the NPE. I’d imagine that the most

Re: [rules-users] Comparing Date with || OR operator

2010-02-23 Thread dhari
Hi Thomas Thanks your prompt reply. I am sure all three attributes are NOT null. I have tested them before sending question to mailing list. If you want, I can send complete sample code and you can try it at your end. Regards, Dhari Date: Tue, 23 Feb 2010 02:50:08 -0800 From:

Re: [rules-users] Comparing Date with || OR operator

2010-02-23 Thread Swindells, Thomas
Have you got the stack trace, that may give a clue? Also what are the actual values of start date and end date? Thomas From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of dhari Sent: 23 February 2010 11:30 To: rules-users@lists.jboss.org

Re: [rules-users] Comparing Date with || OR operator

2010-02-23 Thread Wolfgang Laun
Please try this rewrite of the 2nd CE: Segment ( $endDate : endDate, startDate $regDate || startDate $endDate ) and report the outcome to the list, together with the Dools version you are using. Thank you. 2010/2/23 dhari sdh...@hotmail.com: Hi Thomas Thanks your prompt reply. I am sure

[rules-users] Using Collections in LHS

2010-02-23 Thread dhari
In this scenario I do have typical Order and Items data structure. I want to implement various business rules where I want to check both Order attributes and Item attributes together. Order [ Date, Discount, Amount, Customer, Type, Items] Item [ Quantity, Rate, ExpiresDate, Grade ] I am trying

Re: [rules-users] Using Collections in LHS

2010-02-23 Thread Wolfgang Laun
Discount is a field of Order and must not appear in an Item(...). Probably you want: Order ( $discount : Discount 10,... Also, most likely, all your fields need to be written with a lower case initial letter, Order ( $discount : discount 10, $items : items) -W On Tue, Feb 23, 2010 at

Re: [rules-users] AGE problem

2010-02-23 Thread Jason Smith
Hey, I haven't been following this thread, but you can use Joda Time to get much better, easier results. For instance, you can add 1 month to a DateTime by using a new Period(P1M) [that is, a period of 1 month] - all done according to ISO8601 standards, so it works flawlessly, including

Re: [rules-users] Process with subprocesses don't continue after finish work items in the subprocesses

2010-02-23 Thread Dirk
Hey Kris, I created a little demo-process with two subprocesses which covers my problem. The flow should be Start - Super - Sub1 - Sub2 - Sub1 - Super - End. But at runtime it is only Start - Super - Sub1 - End. I think the test case is self-explanatory. Thank you for your efforts! Regards

Re: [rules-users] AGE problem

2010-02-23 Thread Greg Barton
I was about to suggest this. :) And one advantage of using joda time is that version 1.6 is already included as a dependency of drools. --- On Tue, 2/23/10, Jason Smith jsm...@infotrustgroup.com wrote: From: Jason Smith jsm...@infotrustgroup.com Subject: Re: [rules-users] AGE problem To:

Re: [rules-users] memberOf mvel list

2010-02-23 Thread Swindells, Thomas
Am I being blind or are in and not in not actually documented in the drools expert user guide? In particular the fact that the syntax for the list is to put it in round brackets (1,2,3) and not the square brackets [1,2,3] which you would expect from the mvel documentation. Also why can't

[rules-users] Deploying a package to Guvnor

2010-02-23 Thread spamcontrol
Is there a way to import a package file (as built by ant) into Guvnor? I can see how to import rules and jars, but I'd like to upload a complete package (POJO's + rules) in a single step to Guvnor. Is this currently possible? ___ rules-users mailing

Re: [rules-users] Using Collections in LHS

2010-02-23 Thread Shabbir Dhari
Hi W I know about case sensitivity issue. How can I combine both Order and Item in one condition. I tried all possibilities but getting syntax error. For example: Order ($items : items, $discount : discount 10, Item(grade 3) from $items) // gives error Can please code this condition

Re: [rules-users] Comparing Date with || OR operator

2010-02-23 Thread Shabbir Dhari
Segment ( $endDate : endDate, startDate $regDate || startDate $endDate ) even does not work. I am using verstion 5.0.1. All dates are java.util.Date and values in sample fact are: regDate = Fri Aug 01 00:00:00 BST 2008 startDate = Tue Sep 01 00:00:00 BST 2009 endDate = Fri Jul 30 00:00:00

Re: [rules-users] Using Collections in LHS

2010-02-23 Thread Jeffrey Schneller
I think what you are looking for is the following. Someone please correct me if I am incorrect. when Order($discount : discount 10, $items: items) Item(grade 3) from $items then System.err.print(Discount is not allowed with items having grade 3 or higher); This would fire when an

Re: [rules-users] Using Collections in LHS

2010-02-23 Thread dhari
Thanks Jeffery. I'll try this but what if I have more complex condition e.g. Order ($discount : discount, $items : items) Item(grade 3 (quantity 5 || $discount 10)) from $items Date: Tue, 23 Feb 2010 15:14:18 -0800 From: ml-node+412055-2130217977-80...@n3.nabble.com To:

Re: [rules-users] Comparing Date with || OR operator

2010-02-23 Thread Shabbir Dhari
I tried with some thing different and it worked but I don’t want this as I have many collections in my data structure. //this works Membership ( $regDate : regDate) Segment ( $endDate : endDate ) Segment ( startDate $regDate || startDate $endDate ) //this does NOT work

Re: [rules-users] Using Collections in LHS

2010-02-23 Thread 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 sdh...@hotmail.com Thanks Jeffery. I'll try this but what if I have more complex condition e.g. Order ($discount :