Re: [rules-users] Drools function not working with Javassist facts

2012-05-22 Thread Ayush
Thanks a million Laune, but I'm still getting the same error I created a new project and copied the same code you posted but still the same error. I'm attaching my complete project (without jar files, they can be referenced in .classpath file), please help me kill my desperation to know what I'm

Re: [rules-users] Drools function not working with Javassist facts

2012-05-22 Thread Ayush
Does this mean that this problem is due to running this program in Eclipse? I already tried it running in application server as well but it's throwing same error. -- View this message in context:

Re: [rules-users] Drools function not working with Javassist facts

2012-05-22 Thread Ayush
Thanks Laune, I'm using java version 1.6.0_29 -- View this message in context: http://drools.46999.n3.nabble.com/Drools-function-not-working-with-Javassist-facts-tp3996584p4006368.html Sent from the Drools: User forum mailing list archive at Nabble.com.

Re: [rules-users] Drools function not working with Javassist facts

2012-05-18 Thread Ayush
Thanks Laune, I tried executing it after adding msgCtClass.writeFile(); but it's still throwing the same exception. If you could please share the version of lib files you are using along with the file with the changes? -- View this message in context:

[rules-users] Drools function not working with Javassist facts

2012-05-16 Thread Ayush
Hello, I'm trying to build a rule which accepts the dynamic facts. The dynamic facts are created using the javassist API. The rule works fine when I'm adding a single rule but as soon as I declare any function in the drl file the rule doesn't compile. *Following is the code sample for creating

Re: [rules-users] Drools function not working with Javassist facts

2012-05-16 Thread Ayush
Thanks a million for your reply. Yes this is a sample code because the one I'm actually working on is much complex. The actual flow is - create dynamic object and keep it in map - create session and load drl - insert all the dynamically created object in drools session - fire all rules. Yes,

Re: [rules-users] Drools function not working with Javassist facts

2012-05-16 Thread Ayush
Laune, Thank you a lot for your reply. Here I go explaining the code. *I'm generating dynamic java objects. In this the class file is made once and on each request we make a new instance and insert it in drools session* public Object getFact () throws CannotCompileException,

Re: [rules-users] Challenge! Using javassist and drools presents an issue with drl

2012-05-15 Thread Ayush
' is the function name. I will appreciate if someone can help me resolve it. Thanks! BR Ayush -- View this message in context: http://drools.46999.n3.nabble.com/Challenge-Using-javassist-and-drools-presents-an-issue-with-drl-tp763086p3987828.html Sent from the Drools: User forum mailing list

Re: [rules-users] Challenge! Using javassist and drools presents an issue with drl

2012-05-15 Thread Ayush
Folks, It's a burning issue for me, I would appreciate if someone can help me solving it. -- View this message in context: http://drools.46999.n3.nabble.com/Challenge-Using-javassist-and-drools-presents-an-issue-with-drl-tp763086p3994285.html Sent from the Drools: User forum mailing list

Re: [rules-users] Problem implementing multiple evals

2011-01-28 Thread Ayush
I'm afraid is there no solution to this problem? -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Problem-implementing-multiple-evals-tp2365761p2369105.html Sent from the Drools - User mailing list archive at Nabble.com.

[rules-users] Error using multiple evals

2011-01-27 Thread Ayush
Hi All, When I'm trying to execute multiple evals I'm getting errors. Below is what I'm trying to do MyEvent(prop1=XYZ) over window:time(1m) from entry-point MyStream or (MyEvent() over window:time(1m) from entry-point MyStream and

Re: [rules-users] Error using multiple evals

2011-01-27 Thread Ayush
Hi, I even tried using below approach AlertReceivedEvent() over window:time(1m) from entry-point NotificationStream $I1 : Double() from getIsgNodeCount() Number(doubleValue $I1) from accumulate(

Re: [rules-users] Error using multiple evals

2011-01-27 Thread Ayush
pls avoid this is just to make my post ACCEPTABLE -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Error-using-multiple-evals-tp2362605p2363456.html Sent from the Drools - User mailing list archive at Nabble.com.

Re: [rules-users] Error using multiple evals

2011-01-27 Thread Ayush
Hi, I even tried using below approach AlertReceivedEvent() over window:time(1m) from entry-point NotificationStream $I1 : Double() from getIsgNodeCount() Number(doubleValue $I1) from accumulate(

[rules-users] Problem implementing multiple evals

2011-01-27 Thread Ayush
When I'm trying to execute multiple evals I'm getting errors. Below is what I'm trying to do MyEvent(prop1=XYZ) over window:time(1m) from entry-point MyStream or (MyEvent() over window:time(1m) from entry-point MyStream and

Re: [rules-users] how to import rules from a drl to another drl file

2011-01-26 Thread Ayush
Is not there any way using which we can keep rules in say different files and just import them in a single file. This will make the rule management an easy process. Please help me doing this? I don't want to keep all my rules in a single/long file. -- View this message in context:

[rules-users] Implementing multiple 'and' 'or' conditions

2011-01-25 Thread Ayush
Hi, I've to write a rule in which there are multiple and, or conditions. Like ( MyEvent(prop = 1) or MyEvent(prop = 2) or MyEvent(prop = 3) ) and MyEvent(prop = 4) and MyEvent(prop = 5) I tried to implement it like $E: ( MyEvent(prop = 1) or

Re: [rules-users] Implementing multiple 'and' 'or' conditions

2011-01-25 Thread Ayush
Hi, Thanks for your reply. Actually it is lot more complex. Let me present it this way ( (MyEvent(id == 83020402)) or MyEvent() (Number( doubleValue = $numberofISGCDBnodes*.50 ) from accumulate( MyEvent( id ==

Re: [rules-users] Implementing multiple 'and' 'or' conditions

2011-01-25 Thread Ayush
Thank you. This worked -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Implementing-multiple-and-or-conditions-tp2328123p2329175.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users

[rules-users] Problem implementing dynamic regular expression

2011-01-24 Thread Ayush
Hi, I'm trying to implement regular expression using matches. The regular expression is dynamic and retrieved from a java function. In my first approach I'm tried to call the java function for matches like MyEvent(prop1 matches This event is for+getPropName()+ and is sent to blah blah blah) Now

Re: [rules-users] Problem implementing dynamic regular expression

2011-01-24 Thread Ayush
Thank you all. I solved it by using eval((myprop matches ...+) == true). I used eval because though without eval it was not throwing any error but it was not running either -- View this message in context:

[rules-users] Problem with or condition

2011-01-24 Thread Ayush
Hi, I'm getting problem while executing rule with or condition. My rule is like MyEvent () from entry-point MyStream Number($objCountForOne : doubleValue) from accumulate( MyEvent(prop1 == One) over window:time(1m) from entry-point MyStream,count()) eval($objCountForOne getMyNodeCount()*0.35)

Re: [rules-users] Problem with or condition

2011-01-24 Thread Ayush
Formatting the rule in above post MyEvent () from entry-point MyStream Number($objCountForOne : doubleValue) from accumulate( MyEvent(prop1 == One) over window:time(1m) from entry-point MyStream,count()) eval($objCountForOne getMyNodeCount()*0.35) or MyEvent () from entry-point MyStream

Re: [rules-users] Is there any way to find out last two events with some common properties

2011-01-16 Thread Ayush
Hi, I'm also facing the same problem...I've to get latest 3 drools events which can be received at anytime say within 10 minutes. I tried using sliding window wherein the window will rotate on the complete expiry time of drools events. $E1 : MyEvent(prop1 = MyProp) from entry-point MyStream

Re: [rules-users] Removing facts from statefulknowledgeSession's memory

2010-11-12 Thread Ayush
Thanks for replies. Actually what I did now is I declared my fact into drl file and then I'd added an @expires to it. It works fine but now the problem is that for every fact inserted I'd also inserted an event for it. Now as the drl file can be updated by user so say he'd defined expiry time

Re: [rules-users] Removing facts from statefulknowledgeSession's memory

2010-11-12 Thread Ayush
Thanks. Actually I did it in different way what I did is I declared my fact into drl file as declare MyFact and then I'd added an @expires to it. It works fine but now the problem is that for every fact inserted I'd also inserted an event for it. Now as the drl file can be updated by user so

Re: [rules-users] Removing facts from statefulknowledgeSession's memory

2010-11-12 Thread Ayush
oh yes Thanks this rule will solve my problem. I'm wondering is there any way I can actually verify the business logic of my rules. I'd read about drools-verifier but I've not found enough information for it to be used with drl. I want that in some way I can check the business logic from java

Re: [rules-users] Removing facts from statefulknowledgeSession's memory

2010-11-11 Thread Ayush
Ok so drools will not be garbage collecting the facts (as I'm not calling dispose()) and I've to retract them manually. I was wondering cannot there be any way in which I can define expiry time for facts in the same way I declare for events i.e. @expiry -- View this message in context:

[rules-users] Removing facts from statefulknowledgeSession's memory

2010-11-10 Thread Ayush
Hi, In my drools implementation I'm inserting all my facts into working memory and for every fact received I'm also inserting events into notification stream. Now the StatefulKnowledgeSession I'm using is static and it is neither initialized nor disposed after being initialized for first time.

Re: [rules-users] Removing facts from statefulknowledgeSession's memory

2010-11-10 Thread Ayush
Thanks for your reply. Also let me know about facts which are loaded into working memory (Keeping in mind that I'm not calling session.dispose()). Where should I define their expiry time or how should I retract them after 5 minutes? -- View this message in context:

Re: [rules-users] Error Inserting events into drools fusion stream

2010-10-22 Thread Ayush
Thanks for the reply. Can you please elaborate on it? Well we are facing issues keeping same session and entry point alive through out the application. As each event will be received as a new thread in my application so when I'm calling the class which inserts into session and fire-all rules

Re: [rules-users] Error Inserting events into drools fusion stream

2010-10-22 Thread Ayush
-- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Error-Inserting-events-into-drools-fusion-stream-tp1746213p1750917.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list

Re: [rules-users] Error Inserting events into drools fusion stream

2010-10-22 Thread Ayush
Thank you for your reply. I think I was heading into the wrong direction. Now when I've synchronized the function which is creating session, session is static and is only called once, and firing the rules it's working fine. I'm planning to use JMS wherein consumer will be syncronized. Is this

Re: [rules-users] Error Inserting events into drools fusion stream

2010-10-22 Thread Ayush
Thank you for your reply. I think I was heading into the wrong direction. Now when I've synchronized the function which is creating session, session is static and is only called once, and firing the rules it's working fine. I'm planning to use JMS wherein consumer will be syncronized. Is this

Re: [rules-users] Error Inserting events into drools fusion stream

2010-10-22 Thread Ayush
Thanks a lot Wolfgang for your prompt reply. I'm able to move forward now -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Error-Inserting-events-into-drools-fusion-stream-tp1746213p1751531.html Sent from the Drools - User mailing list archive at Nabble.com.

[rules-users] Error Inserting events into drools fusion stream

2010-10-21 Thread Ayush
Hi All, I'm trying to implement drools fusion into my app. The scenario of my app is as follows: - Facts will be received continuosly. - On receving fact I'm generating a new event and adding it into a new working memory entry point stream. Also I'm adding facts into session coz I'll be