[rules-users] WS-Notifications support in Drools

2012-12-14 Thread amit
Hi,

Does Drools provides any support for WS-Notifications specifications.
Does Drools have any implementations for WS-Notification specification e.t.c

Many thanks in advance for any answer Yes or No.





--
View this message in context: 
http://drools.46999.n3.nabble.com/WS-Notifications-support-in-Drools-tp4021200.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] Working with Drools PipelineFactory

2012-11-08 Thread amit
HI,

Does Drools 5.4.0 supports PipelineFactory.

Any sample application regarding the same.

Anu pointers will be useful.

I have gone through link

http://www.kijanowski.eu/index.php?site=articlesarticle=drools_pipelinelang=en



--
View this message in context: 
http://drools.46999.n3.nabble.com/Working-with-Drools-PipelineFactory-tp4020750.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] Leveraging Drools project in JBPM workflow

2012-11-05 Thread amit
Hi,

Can you please provide some high level guidelines how I can use a Drools
Rules Project created in Eclipse in jbpm workflow.

Any pointers or high level guideline will be useful.



--
View this message in context: 
http://drools.46999.n3.nabble.com/Leveraging-Drools-project-in-JBPM-workflow-tp4020691.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] WS-Event support in Drools

2012-11-04 Thread amit
Hi,

My question is does drools fusion supports WS-Event off the shelf.

Are there any samples which I can go through to understand WS-Events through
Drools

Many thanks in advance.



--
View this message in context: 
http://drools.46999.n3.nabble.com/WS-Event-support-in-Drools-tp4020689.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] To expose Rule created in drools expert as a webservice

2012-10-31 Thread amit
I am starting with Drools expertMy usecase is to expose the rule written in
Drools Expert as webservice.This webservice can be consumed by some external
application.My question: Is this feasible.Thanks a lot in advance.



--
View this message in context: 
http://drools.46999.n3.nabble.com/To-expose-Rule-created-in-drools-expert-as-a-webservice-tp4020600.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] rules doesn't run after redeploying my application EAR in Jboss

2011-06-16 Thread Amit Friedman
Hello,
I am running JBoss 5.1.0 GA with drools 5.1.1 (added run-time libraries).
I have several DRL files which resides outside my EAR in a 'rules'
directory.
When the EAR loads, I am loading the DRLs using:
*KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();*
*for(...) {*
* kbuilder.add(ResourceFactory.newFileResource(file), ResourceType.DRL);
*
}
That works fine.
When I do redeploy of the EAR, this code passed successfully, but the rules
won't run anymore.
When I switch to drools 5.0.1 run-time libraries, it returns to work.
I need to work with 5.1.1 since I use some of the new features.

I found an old post that was answered by Mark Proctor suggesting to use a
single drools-all.jar:
http://markmail.org/message/6yzc7c6ejdn6iekc#query:drools%20classloader%20problem+page:1+mid:6yzc7c6ejdn6iekc+state:results
unfortunately, I could find such file in the 5.1.1 release.
 Other ideas that was tested and failed: 1. Tell Tomcat not to lock
resources (configuration properties in context.xml) 2. Put all drools 5.1.1
jars and dependencies in the lib
Any suggestion how to solve this issue?

Thanks,
Amit
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] rules-users Digest, Vol 43, Issue 117

2010-06-19 Thread amit bhardwaj
 




-- 
Amit  Bhardwaj
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Logging and BIRT

2010-04-12 Thread Amit Kumar
Thanks Kris. We were able to log events and now its in BIRT arena to
generate some reports.
Thanks for your help.

-Amit

2010/4/12 Kris Verlaenen kris.verlae...@cs.kuleuven.be

  There is a little bit of documentation about how to create a history log:

 https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/docs/drools-flow/html/ch05.html#d0e1593

 ... and how to do reporting:

 https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/docs/drools-flow/html/ch12.html

 Kris


 - Original Message -
 *From:* Amit Kumar amitku...@gmail.com
 *To:* Rules Users List rules-users@lists.jboss.org
 *Sent:* Thursday, April 08, 2010 6:26 PM
 *Subject:* Re: [rules-users] Logging and BIRT

 Thanks Kris!
 Where are the docs for this module located. Couldn't find them in javadocs
 I downloaded.

 Thanks
 Amit


 2010/4/8 Kris Verlaenen kris.verlae...@cs.kuleuven.be

  File logging is mostly for testing purposes.  If you want to create a
 history log for reporting, take a look at the drools-bam module.  This
 allows you create a logger that will create history information about the
 execution of your processes in a database, so that can be used as a data
 source in your reports.  There are also a few sample reports in that module.

   new WorkingMemoryDbLogger(ksession);

 Kris


   - Original Message -
 *From:* Amit Kumar amitku...@gmail.com
 *To:* Rules Users List rules-users@lists.jboss.org
 *Sent:* Monday, March 29, 2010 5:02 PM
 *Subject:* [rules-users] Logging and BIRT

 Hi Folks,

 I tried simple logging by using this code
 KnowledgeRuntimeLogger logger =
 KnowledgeRuntimeLoggerFactory.newFileLogger(ksession, test);

 It logs only basic stuff.
 How can I log rule runtime, etc.

 Trying to generate a report using BIRT as mentioned here

 http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-flow/html_single/index.html#d0e2353

 Thanks in advance,
 Amit

 --

 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users


 Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm for more
 information.

 ___
 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


 Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm for more
 information.

 ___
 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] Logging and BIRT

2010-04-08 Thread Amit Kumar
Thanks Kris!
Where are the docs for this module located. Couldn't find them in javadocs I
downloaded.

Thanks
Amit


2010/4/8 Kris Verlaenen kris.verlae...@cs.kuleuven.be

  File logging is mostly for testing purposes.  If you want to create a
 history log for reporting, take a look at the drools-bam module.  This
 allows you create a logger that will create history information about the
 execution of your processes in a database, so that can be used as a data
 source in your reports.  There are also a few sample reports in that module.

   new WorkingMemoryDbLogger(ksession);

 Kris


 - Original Message -
 *From:* Amit Kumar amitku...@gmail.com
 *To:* Rules Users List rules-users@lists.jboss.org
 *Sent:* Monday, March 29, 2010 5:02 PM
 *Subject:* [rules-users] Logging and BIRT

 Hi Folks,

 I tried simple logging by using this code
 KnowledgeRuntimeLogger logger =
 KnowledgeRuntimeLoggerFactory.newFileLogger(ksession, test);

 It logs only basic stuff.
 How can I log rule runtime, etc.

 Trying to generate a report using BIRT as mentioned here

 http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-flow/html_single/index.html#d0e2353

 Thanks in advance,
 Amit

 --

 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users


 Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm for more
 information.

 ___
 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] creating .pkg from .drl

2010-04-02 Thread Amit Kumar
Cool.. Thanks folks!

On Fri, Apr 2, 2010 at 3:48 PM, Ansgar Konermann 
ansgar.konerm...@googlemail.com wrote:

 On 03.04.2010 00:40, Amit Kumar wrote:
  Hi Folks,
 
  I am trying to create a .pkg file (for probably faster loading) from a
  .drl file
 
  Does anybody has a code snippet which I can use. Am unable to find it
  in javadocs.

 Hi,

 from what we figured out at work, they're just plain serialized
 knowledge packages (or rather, collections thereof). IIRC, this is also
 described somewhere in the docs.

 So all you need to do is:
 - create the knowledge packages in-memory using the normal
 KnowledgeBuilder api calls (loads of documentation available for this)
 - use java object serialization to write a CollectionKnowledgePackage
 into a file.

 Upon loading these packages, make sure all the classes used/imported in
 the *.drl files are available on the classpath, otherwise you probably
 won't be able to deserialize the packages.

 Kind regards

 Ansgar


 ___
 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] Job opening at Cisco - San Jose, CA

2010-04-01 Thread Amit Kumar
Hi All,
I have put a opening at job board

http://jobs.athico.com/job/software-engineer-iv-san-jose-ca-cisco-systems-c9aab2e6a2/?d=1source=site_home

We are looking for a strong candidate to model and design the new
application for Intellectual Capital Management
Drools experience and good UI skills are desired.

Please apply directly at Cisco.com
Requisition Number:R860990

I am just posting here because I was not sure how many people look at the
job boards.

Thanks,
Amit
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Job opening at Cisco - San Jose, CA

2010-04-01 Thread Amit Kumar
Yes Mark. Its a standard job posting from our group. We are not permitted to
change the job description to provide more specific description as HR is
also involved.
But it is a position in our group and does require a person with prior
Drools experience.

Thank you for posting it on your Blog.

Regards,
Amit


2010/4/1 Mark Proctor mproc...@codehaus.org

  On 01/04/2010 16:59, Amit Kumar wrote:

 Hi All,
 I have put a opening at job board


 http://jobs.athico.com/job/software-engineer-iv-san-jose-ca-cisco-systems-c9aab2e6a2/?d=1source=site_home

 We are looking for a strong candidate to model and design the new
 application for Intellectual Capital Management
 Drools experience and good UI skills are desired.

 Please apply directly at Cisco.com
 Requisition Number:R860990

 I am just posting here because I was not sure how many people look at the
 job boards.

 I just posted the job on the blog, someone noticed though the job advert
 itself does not mention drools?

 Mark


 Thanks,
 Amit


 ___
 rules-users mailing 
 listrules-us...@lists.jboss.orghttps://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 mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Logging and BIRT

2010-03-29 Thread Amit Kumar
Hi Folks,

I tried simple logging by using this code
KnowledgeRuntimeLogger logger =
KnowledgeRuntimeLoggerFactory.newFileLogger(ksession, test);

It logs only basic stuff.
How can I log rule runtime, etc.

Trying to generate a report using BIRT as mentioned here
http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-flow/html_single/index.html#d0e2353

Thanks in advance,
Amit
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Rules categorization/packages

2010-03-18 Thread Amit Kumar
I do have get/set methods for each attribute. There are some extra files
also which have some other functions.
The same model is working fine in 5.0 and 5.1, its only having issue in the
trunk and I wanted to use the trunk code if possible since it has support
for collect and accumulate in guided editor...

Thanks
Amit

2010/3/18 Esteban Aliverti esteban.alive...@gmail.com

 I added a comment to your jira entry. Please take a look.

 2010/3/17 Amit Kumar amitku...@gmail.com

  https://jira.jboss.org/jira/browse/GUVNOR-514
 Model is also there

 :)

 2010/3/17 Esteban Aliverti esteban.alive...@gmail.com

 It would be good too if you could provide us your model (or at least a
 part of it).

 Best,


 On Wed, Mar 17, 2010 at 3:24 AM, Toni Rikkola trikk...@redhat.comwrote:

 You can create a Jira for this and upload the jar file there.
 https://jira.jboss.org/jira/browse/GUVNOR

 We will take a look at it and fix it if it is a bug.

 Toni

 Amit Kumar wrote:
  Sorry for spamming today
  It does seem to be working after I add Any of the following or All
  of the following and then add the attributes to it. So workaround is
  there..
  But when I add There is a Equipment and add a attribute then it
  permits me to assign a variable to it
  like Equipment(eId : entityId)
  but it does not correctly give me that variable assigning capability
  in the Any of  or All of blocks .. so struck issue.
  Thanks,
  Amit
 
 
 
  On Tue, Mar 16, 2010 at 1:58 PM, Amit Kumar amitku...@gmail.com
  mailto:amitku...@gmail.com wrote:
 
  Ok I tried again.  :(
 
  In Equipment I only see manufacturer
  In EquipmentCA I also only see manufacturer
  In Software I do not see anything.
 
  It contains many more classes
 
  Not sure what I am breaking.. but if you want I can send you my
  model files to you (in case you want to try). Do not want to post
  it on alias
 
  Thanks
  Amit
 
 
  2010/3/16 Esteban Aliverti esteban.alive...@gmail.com
  mailto:esteban.alive...@gmail.com
 
  But, which fields didn't appear in guvnor?
 
  2010/3/16 Amit Kumar amitku...@gmail.com
  mailto:amitku...@gmail.com
 
  Probably because of OStype and OSversion. Let me fix that
  and convert to lower case and try. I remember facing this
  issue sometime back with 5.0
  Thanks
  Amit
 
  On Tue, Mar 16, 2010 at 9:17 AM, Amit Kumar
  amitku...@gmail.com mailto:amitku...@gmail.com wrote:
 
  Its coming from a JAR
  Thanks
  Amit
 
  Equipment
entityIdint
partNumber  String
manufacturerString
owningEntityId  int
 
 
 
  Software
entityIdint
OSType  String
OSVersion   String
imageName   String
 
 
 
 
 
 
  EquipmentCA extends Equipment
hostnameString
productName String
productFamily   String
productId   String
 
  2010/3/16 Esteban Aliverti 
 esteban.alive...@gmail.com
  mailto:esteban.alive...@gmail.com
 
  Are you importing your model from a .jar or using
  a Declarative Model?
 
 
  On Tue, Mar 16, 2010 at 6:28 AM, Toni Rikkola
  trikk...@redhat.com mailto:trikk...@redhat.com
 
  wrote:
 
  Hi,
 
  Its possible that there are some bugs in the
  snapshots. Can you tell me
  what your model looks like?
 
  Toni
 
  Amit Kumar wrote:
   The latest builds seem to be no good for
 guvnor
   They do seem rich in features .. especially
  support for
   collect/accumulate in guvnor along with
  inbox and global packages.
  
   But But But.. on adding a fact in the
  when/then clause then all the
   attributes of the facts are not coming ..
  some attributes come.. not
   all of them.
   I am picking it from here
  
 
 https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/
   Any other place I can look :)
  
   Thanks
   Amit
  
   On Mon

Re: [rules-users] Rules categorization/packages

2010-03-16 Thread Amit Kumar
Its coming from a JAR
Thanks
Amit

Equipment   entityId int   partNumber String   manufacturer String
owningEntityId int   Software   entityId int   OSType String   OSVersion
String   imageName String EquipmentCA extends Equipment   hostname
String   productName String   productFamily String   productId String
2010/3/16 Esteban Aliverti esteban.alive...@gmail.com

 Are you importing your model from a .jar or using a Declarative Model?


 On Tue, Mar 16, 2010 at 6:28 AM, Toni Rikkola trikk...@redhat.com wrote:

 Hi,

 Its possible that there are some bugs in the snapshots. Can you tell me
 what your model looks like?

 Toni

 Amit Kumar wrote:
  The latest builds seem to be no good for guvnor
  They do seem rich in features .. especially support for
  collect/accumulate in guvnor along with inbox and global packages.
 
  But But But.. on adding a fact in the when/then clause then all the
  attributes of the facts are not coming .. some attributes come.. not
  all of them.
  I am picking it from here
 
 https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/
  Any other place I can look :)
 
  Thanks
  Amit
 
  On Mon, Feb 22, 2010 at 8:54 AM, Amit Kumar amitku...@gmail.com
  mailto:amitku...@gmail.com wrote:
 
  Thanks Jervis!!
 
  On Sun, Feb 21, 2010 at 7:05 PM, Jervisliu j...@redhat.com
   mailto:j...@redhat.com wrote:
 
  A new feature called Sharable artifacts/Global artifacts will
 be
  available in Drools 5.1. This feature allows you share an
  asset among
  different packages. It also creates a global area (you can
  consider it
  as a global package). Potentially you can promote an asset
  that you
  think is more appropriate to be defined in a global scope from
  your
  current package to the global area, so that this global asset
  can be
  reused by every package. This feature is already on trunk,
  maybe you
  want to give it a try. Any comments or feedbacks will be highly
  appreciated.
 
  Cheers,
  Jervis
 
 
  Amit Kumar wrote:
   Hello All,
  
   I am looking to organize the rules in different categories.
  But for
   distribution purposes We are creating packages for different
   roles/processing phases
  
   So a rule will reside in one pckage but for navigation it
  can belong
   to multiple categories
  
   So packages are like Shirts, Pants, Shoes, Sweaters
   Categories are Color, Material, Size, Gender and those have
 sub
   categories witin them
  
   We have rules which will device the category of the item
   Like red rule, blue rule, cloth rule, leather rule
  
   Now the problem we are facing is for category rules is if I
  define the
   rule in Shirt package .. then I will not be able ot use it
  in Pant
   package.. Will have to redefine it.
  
   The other problem in this scenario is If I have a price rule
  in Shirt
   package and the category is Blue Color and XL Size then
  I will
   have to put it in both categories
   When I put the Blue Rule on Blue Category and XL Rule
  on XL
   Category  and I put the rule in both categories.. will it
  be an and
   relationship or will be an OR
  
   Regards,
   Amit
  
 
 
  
   ___
   rules-users mailing list
   rules-users@lists.jboss.org mailto:
 rules-users@lists.jboss.org
   https://lists.jboss.org/mailman/listinfo/rules-users
  
 
  ___
  rules-users mailing list
  rules-users@lists.jboss.org mailto: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 mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users




 --
 

 Esteban Aliverti

 ___
 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] Rules categorization/packages

2010-03-16 Thread Amit Kumar
Probably because of OStype and OSversion. Let me fix that and convert to
lower case and try. I remember facing this issue sometime back with 5.0
Thanks
Amit

On Tue, Mar 16, 2010 at 9:17 AM, Amit Kumar amitku...@gmail.com wrote:

 Its coming from a JAR
 Thanks
 Amit

 Equipment   entityId int   partNumber String   manufacturer String
   owningEntityId int   Software   entityId int   OSType String
 OSVersion String   imageName String EquipmentCA extends Equipment
   hostname String   productName String   productFamily String   productId
 String
 2010/3/16 Esteban Aliverti esteban.alive...@gmail.com

 Are you importing your model from a .jar or using a Declarative Model?


 On Tue, Mar 16, 2010 at 6:28 AM, Toni Rikkola trikk...@redhat.comwrote:

 Hi,

 Its possible that there are some bugs in the snapshots. Can you tell me
 what your model looks like?

 Toni

 Amit Kumar wrote:
  The latest builds seem to be no good for guvnor
  They do seem rich in features .. especially support for
  collect/accumulate in guvnor along with inbox and global packages.
 
  But But But.. on adding a fact in the when/then clause then all the
  attributes of the facts are not coming .. some attributes come.. not
  all of them.
  I am picking it from here
 
 https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/
  Any other place I can look :)
 
  Thanks
  Amit
 
  On Mon, Feb 22, 2010 at 8:54 AM, Amit Kumar amitku...@gmail.com
  mailto:amitku...@gmail.com wrote:
 
  Thanks Jervis!!
 
  On Sun, Feb 21, 2010 at 7:05 PM, Jervisliu j...@redhat.com
   mailto:j...@redhat.com wrote:
 
  A new feature called Sharable artifacts/Global artifacts will
 be
  available in Drools 5.1. This feature allows you share an
  asset among
  different packages. It also creates a global area (you can
  consider it
  as a global package). Potentially you can promote an asset
  that you
  think is more appropriate to be defined in a global scope from
  your
  current package to the global area, so that this global asset
  can be
  reused by every package. This feature is already on trunk,
  maybe you
  want to give it a try. Any comments or feedbacks will be highly
  appreciated.
 
  Cheers,
  Jervis
 
 
  Amit Kumar wrote:
   Hello All,
  
   I am looking to organize the rules in different categories.
  But for
   distribution purposes We are creating packages for different
   roles/processing phases
  
   So a rule will reside in one pckage but for navigation it
  can belong
   to multiple categories
  
   So packages are like Shirts, Pants, Shoes, Sweaters
   Categories are Color, Material, Size, Gender and those have
 sub
   categories witin them
  
   We have rules which will device the category of the item
   Like red rule, blue rule, cloth rule, leather rule
  
   Now the problem we are facing is for category rules is if I
  define the
   rule in Shirt package .. then I will not be able ot use it
  in Pant
   package.. Will have to redefine it.
  
   The other problem in this scenario is If I have a price rule
  in Shirt
   package and the category is Blue Color and XL Size then
  I will
   have to put it in both categories
   When I put the Blue Rule on Blue Category and XL Rule
  on XL
   Category  and I put the rule in both categories.. will it
  be an and
   relationship or will be an OR
  
   Regards,
   Amit
  
 
 
  
   ___
   rules-users mailing list
   rules-users@lists.jboss.org mailto:
 rules-users@lists.jboss.org
   https://lists.jboss.org/mailman/listinfo/rules-users
  
 
  ___
  rules-users mailing list
  rules-users@lists.jboss.org mailto:
 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 mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users




 --
 

 Esteban Aliverti

 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https

[rules-users] About fusion and collections

2010-03-15 Thread Amit Kumar
Hello All,

Was doing some rule writing and am seeing some issues which I want to
overcome.

In Fusion when we send the facts into working memory.. there seems to be no
way that rules are automatically getting triggered.
We have to call fireAllRules after each fact insertion. Is this the way it
was designed. Its like this in the stocktick example also

This one should be simple for somebody with little more experience than me
In the following rule

rule raise alarm
when
  Event($type : eventType)
  $events: ArrayList (size  10)
from collect (Event(eventType == $type))
then
  raise alarm

In the above rule the raise alarm is getting called 10 times. .. How can I
make it to be called only once.

Thanks
Amit
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] About fusion and collections

2010-03-15 Thread Amit Kumar
Kewl !.. sounds good. Thanks for your help folks. I will try the options
out.

2010/3/15 Edson Tirelli ed.tire...@gmail.com


Amit,

Check fireUntilHalt() docs in order to set the engine to reactive
 mode... although, for most cases I've seen, you still have more control by
 defining the fireAllRules() cycle explicitly.

Regarding your rule, the problem is that the first type is matched for
 multiple events. The simplest way to fix that is by pre-populating the
 working memory with all possible event types. In this case you would use a
 rule like:

 when
 EventType( $type : type )

 $events: ArrayList (size  10)
 from collect (Event(eventType == $type))
 then
 // do something
 end

You can also find the distinct event types using accumulate, but that is
 heavier and more complex than the previous example. Lets say event type is a
 String:

 when
 $types : Set()
  from accumulate( Event($type : eventType),
collectSet( $type ) )
 $type : String() from $types

 $events: ArrayList (size  10)
 from collect (Event(eventType == $type))
 then
 // do something
 end

I don't really recommend the second approach though. An intermediate
 approach is to have a separate rule logically insert all event types, and
 then use the same approach of the first example above:

 declare EventType
 type : String @key
 end

 when
 Event( $type : eventType )
 then
 EventType et = new EventType();
 et.setType( $type );
 logicalInsert( et );
 end

[]s
Edson


  2010/3/15 Amit Kumar amitku...@gmail.com

 Hello All,


 Was doing some rule writing and am seeing some issues which I want to
 overcome.

 In Fusion when we send the facts into working memory.. there seems to be
 no way that rules are automatically getting triggered.
 We have to call fireAllRules after each fact insertion. Is this the way it
 was designed. Its like this in the stocktick example also

 This one should be simple for somebody with little more experience than me
 In the following rule

 rule raise alarm
 when
   Event($type : eventType)
   $events: ArrayList (size  10)
 from collect (Event(eventType == $type))
 then
   raise alarm

 In the above rule the raise alarm is getting called 10 times. .. How can I
 make it to be called only once.

 Thanks
 Amit

 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users




 --
  Edson Tirelli
  JBoss Drools Core Development
  JBoss by Red Hat @ www.jboss.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] Rules categorization/packages

2010-03-15 Thread Amit Kumar
The latest builds seem to be no good for guvnor
They do seem rich in features .. especially support for collect/accumulate
in guvnor along with inbox and global packages.

But But But.. on adding a fact in the when/then clause then all the
attributes of the facts are not coming .. some attributes come.. not all of
them.
I am picking it from here
https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/
Any other place I can look :)

Thanks
Amit

On Mon, Feb 22, 2010 at 8:54 AM, Amit Kumar amitku...@gmail.com wrote:

 Thanks Jervis!!

   On Sun, Feb 21, 2010 at 7:05 PM, Jervisliu j...@redhat.com wrote:

 A new feature called Sharable artifacts/Global artifacts will be
 available in Drools 5.1. This feature allows you share an asset among
 different packages. It also creates a global area (you can consider it
 as a global package). Potentially you can promote an asset that you
 think is more appropriate to be defined in a global scope from your
 current package to the global area, so that this global asset can be
 reused by every package. This feature is already on trunk, maybe you
 want to give it a try. Any comments or feedbacks will be highly
 appreciated.

 Cheers,
 Jervis


 Amit Kumar wrote:
  Hello All,
 
  I am looking to organize the rules in different categories. But for
  distribution purposes We are creating packages for different
  roles/processing phases
 
  So a rule will reside in one pckage but for navigation it can belong
  to multiple categories
 
  So packages are like Shirts, Pants, Shoes, Sweaters
  Categories are Color, Material, Size, Gender and those have sub
  categories witin them
 
  We have rules which will device the category of the item
  Like red rule, blue rule, cloth rule, leather rule
 
  Now the problem we are facing is for category rules is if I define the
  rule in Shirt package .. then I will not be able ot use it in Pant
  package.. Will have to redefine it.
 
  The other problem in this scenario is If I have a price rule in Shirt
  package and the category is Blue Color and XL Size then I will
  have to put it in both categories
  When I put the Blue Rule on Blue Category and XL Rule on XL
  Category  and I put the rule in both categories.. will it be an and
  relationship or will be an OR
 
  Regards,
  Amit
  
  
  ___
  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 mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[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 creator Poor man's version which will
introspect the class and generate some DSLs for our need.
An old Blog
http://blog.athico.com/2007/03/standards-based-approach-to-natural.html points
to an interesting article. Does anybody knows where this item is in the
roadmap.

Another suggestion I had was on the Roles and Permissions for the users.
There is a option in drools to permit access for a user to a package and
category. It would be good to add Status to the mix so that the novide user
is prevented from moving rules to production. Small change.. big gain :)

Does anybody has a pointer to a demo of drools showing its capabilities. Or
a comparitive analysis with ILOG.

We are able to show lot of good use for the tool.. but the data model we
have is causing us big headaches in writing easily understandable rules.
The scenario is that we have a lot of attributes of a fact. And as part of
model extension lot of attributes are constantly added to the fact.
To make this easier so that we do not have to update the model - we have put
a (key value pair) for the attributes.

So the model structure is

MainFact
   mainAttr1 String
   mainAttr2 String
   List additionalAttrsAdditionalAttributes = new
ArrayListAdditionalAttributes();

AdditionalAttributes
   attrName String
   attrValue String


So now in guided editor or DSl editor it becomes a nightmare to write a
rule.. and our rule writers will beat us up if we ask them to write a rule
like
aa: AdditionalAttributes (attrName == var1, val : attrValue)
a: MainFact (mainAttr1 == mainVal, additionalAttrs contains aa)

Any easy solution for this :)


Thanks,
Amit
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Rules categorization/packages

2010-02-22 Thread Amit Kumar
Thanks Jervis!!

On Sun, Feb 21, 2010 at 7:05 PM, Jervisliu j...@redhat.com wrote:

 A new feature called Sharable artifacts/Global artifacts will be
 available in Drools 5.1. This feature allows you share an asset among
 different packages. It also creates a global area (you can consider it
 as a global package). Potentially you can promote an asset that you
 think is more appropriate to be defined in a global scope from your
 current package to the global area, so that this global asset can be
 reused by every package. This feature is already on trunk, maybe you
 want to give it a try. Any comments or feedbacks will be highly
 appreciated.

 Cheers,
 Jervis


 Amit Kumar wrote:
  Hello All,
 
  I am looking to organize the rules in different categories. But for
  distribution purposes We are creating packages for different
  roles/processing phases
 
  So a rule will reside in one pckage but for navigation it can belong
  to multiple categories
 
  So packages are like Shirts, Pants, Shoes, Sweaters
  Categories are Color, Material, Size, Gender and those have sub
  categories witin them
 
  We have rules which will device the category of the item
  Like red rule, blue rule, cloth rule, leather rule
 
  Now the problem we are facing is for category rules is if I define the
  rule in Shirt package .. then I will not be able ot use it in Pant
  package.. Will have to redefine it.
 
  The other problem in this scenario is If I have a price rule in Shirt
  package and the category is Blue Color and XL Size then I will
  have to put it in both categories
  When I put the Blue Rule on Blue Category and XL Rule on XL
  Category  and I put the rule in both categories.. will it be an and
  relationship or will be an OR
 
  Regards,
  Amit
  
  
  ___
  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 mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Rules categorization/packages

2010-02-20 Thread Amit Kumar
Hello All,

I am looking to organize the rules in different categories. But for
distribution purposes We are creating packages for different
roles/processing phases

So a rule will reside in one pckage but for navigation it can belong to
multiple categories

So packages are like Shirts, Pants, Shoes, Sweaters
Categories are Color, Material, Size, Gender and those have sub categories
witin them

We have rules which will device the category of the item
Like red rule, blue rule, cloth rule, leather rule

Now the problem we are facing is for category rules is if I define the rule
in Shirt package .. then I will not be able ot use it in Pant package.. Will
have to redefine it.

The other problem in this scenario is If I have a price rule in Shirt
package and the category is Blue Color and XL Size then I will have to
put it in both categories
When I put the Blue Rule on Blue Category and XL Rule on XL
Category  and I put the rule in both categories.. will it be an and
relationship or will be an OR

Regards,
Amit
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] What is the Best practice of using Drools Fusion in a Load balancing environment (ie temporal reasoning between 2 working memories)??

2010-02-19 Thread Amit Kumar
Currently we work off a database to share events for load balancing and
issues related to restarts
But that takes a hit on performance.
It will also be good to have event type/event content based expiry times
so that we can reduce the size of heap.
-Amit

2010/2/19 Chetan Mahadev mahadev.che...@gmail.com


 Hi

 Can anyone tell me how to Implement temporal based event correlation using
 drools fusion in a load balancing environment.
 What is the best practice in a situation like this??

 Use case : To correlate  events which comes into the system with in a time
 window.

 Scenario1:
 Single System Scenario: that is One working memory

 1.All the events come into the system,
 2.Temporal based rules are written using Drools-Fusion.
 3.Correlations takes place if all the events come with in the time window,
 else the rule expires.
 Note: All these takes place with in a single working memory ( Single
 System)


 Scenario2:
 Two System Scenario in active/active: that is two working memories

 1.All the events come into the system,
 2.Temporal based rules are written using Drools-Fusion.
 3. Same rules are deployed in both the systems (active/active)
 4.Both systems are load-balanced,
 5. Event1 goes to System1,  Event2 goes to System2 and again Event3 goes
 system1. ( load -balanced)

 As a result,   System1 recieves 2 events out of 3 events, and System2 the
 other 1 event.

 Correlation never happens since I dont recieve all the events in a single
 working memory.

 How do we handle this kinda scenario??

 Do we have any best practise that is followed in a clustered or
 load-balanced environment??

 Pls help me.. I am stuck.

 Regds
 Chetan







 In a single system, Fusion/temporal based correlation works completely
 fine.

 Use case:
 I have a situation, where events flow into two active components (both
 running simultaneosly)


 ___
 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] Category Rules - Guvnor

2010-02-11 Thread Amit Kumar
Hi Folks,

I am looking at the category rules and have a scenario to use it. Goes like
this

Person
   Name  String
   City String
   income  int

I want to categorize the rules in states

-US
   -- NewYork
   -- Seatle
   -- SanFrancisco


I have created 3 rules
rule people living in NY
when
   Person(city=NewYork
then
end

 rule people living in Seatle
when
   Person(city=Seatle
then
end

 rule people living in SFO
when
   Person(city=SanFrancisco
then
end

I associated the above rules with appropriate categories


Then I create tax rules

rule ny tax -- category NewYork
when
   Person()
then
  Log .. Tax = 10%
end

 rule WA tax -- category Seatle
when
   Person()
then
  Log .. Tax = 20%
end

 rule ny tax -- category NewYork
when
   Person()
then
  Log .. Tax = 10%
end



When I create a object in test scenario of person type .. then all the rules
get executed..  The category rule is not having any effect

Is there any documentation on how this works??

Thanks
Amit
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Category Rules - Guvnor

2010-02-11 Thread Amit Kumar
Thanks Michael for the quick reply
I don't see that anywhere in the documentation and when I do a view package
source then I do not see any extends keyword.
Can you point me to some documentaion in this regards on how it works.

Thanks
Amit

On Thu, Feb 11, 2010 at 5:00 PM, Michael Rhoden 
mrho...@franklinamerican.com wrote:

 The category rule should just extend all child rules in that category.
 If all is working your generated DRL should have extends in the
 tax (etc) rules.

 -Michael

 On Feb 11, 2010, at 6:33 PM, Amit Kumar amitku...@gmail.com wrote:

  Hi Folks,
 
  I am looking at the category rules and have a scenario to use it.
  Goes like this
 
  Person
 Name  String
 City String
 income  int
 
  I want to categorize the rules in states
 
  -US
 -- NewYork
 -- Seatle
 -- SanFrancisco
 
 
  I have created 3 rules
  rule people living in NY
  when
 Person(city=NewYork
  then
  end
 
  rule people living in Seatle
  when
 Person(city=Seatle
  then
  end
 
  rule people living in SFO
  when
 Person(city=SanFrancisco
  then
  end
 
  I associated the above rules with appropriate categories
 
 
  Then I create tax rules
 
  rule ny tax -- category NewYork
  when
 Person()
  then
Log .. Tax = 10%
  end
 
  rule WA tax -- category Seatle
  when
 Person()
  then
Log .. Tax = 20%
  end
 
  rule ny tax -- category NewYork
  when
 Person()
  then
Log .. Tax = 10%
  end
 
 
 
  When I create a object in test scenario of person type .. then all
  the rules get executed..  The category rule is not having any effect
 
  Is there any documentation on how this works??
 
  Thanks
  Amit
  ___
  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 mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Category Rules - Guvnor

2010-02-11 Thread Amit Kumar
ok it seems to be working.. I can see the extends keyword getting generated.
I will try to simulate a simple scenario again.. thanks folks for your help

Thanks
Amit

On Thu, Feb 11, 2010 at 6:44 PM, Amit Kumar amitku...@gmail.com wrote:

 Thanks Michael for the quick reply
 I don't see that anywhere in the documentation and when I do a view package
 source then I do not see any extends keyword.
 Can you point me to some documentaion in this regards on how it works.

 Thanks
 Amit

   On Thu, Feb 11, 2010 at 5:00 PM, Michael Rhoden 
 mrho...@franklinamerican.com wrote:

 The category rule should just extend all child rules in that category.
 If all is working your generated DRL should have extends in the
 tax (etc) rules.

 -Michael

 On Feb 11, 2010, at 6:33 PM, Amit Kumar amitku...@gmail.com wrote:

  Hi Folks,
 
  I am looking at the category rules and have a scenario to use it.
  Goes like this
 
  Person
 Name  String
 City String
 income  int
 
  I want to categorize the rules in states
 
  -US
 -- NewYork
 -- Seatle
 -- SanFrancisco
 
 
  I have created 3 rules
  rule people living in NY
  when
 Person(city=NewYork
  then
  end
 
  rule people living in Seatle
  when
 Person(city=Seatle
  then
  end
 
  rule people living in SFO
  when
 Person(city=SanFrancisco
  then
  end
 
  I associated the above rules with appropriate categories
 
 
  Then I create tax rules
 
  rule ny tax -- category NewYork
  when
 Person()
  then
Log .. Tax = 10%
  end
 
  rule WA tax -- category Seatle
  when
 Person()
  then
Log .. Tax = 20%
  end
 
  rule ny tax -- category NewYork
  when
 Person()
  then
Log .. Tax = 10%
  end
 
 
 
  When I create a object in test scenario of person type .. then all
  the rules get executed..  The category rule is not having any effect
 
  Is there any documentation on how this works??
 
  Thanks
  Amit
  ___
  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 mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Parsing input text file

2009-04-30 Thread Amit Kumar
Hi All ,
I am new to this drools technology and want to do a prototype for
checking its feasibility for our use.
Most of the places I believe it will work fine.. but I have a use case
of parsing input files recd in different formats.

Scenario:
I have 2 input files
1.
##
Test config Start
100 bytes available 250 bytes total
1000 bytes is my life goal
##
2:
##
Test config Start
200 bytes available 300 bytes used 500 bytes total
2000 bytes is my life goal
##

I have to extract the numbers from here and populate an output
objects.. containing whatever value is possible.. so for the first
instance I will be able to populate 3 values.. but for the second one
I will be able to extract 4 values
I wrote a file to work on the first case but I am unable to get it working.
Can somebody help me to complete this prototype.. (I am very new to
this so please pardon my ignorance.. I just looked at help file and am
trying to build this :) )

Thanks for looking..
- Amit

###
ParsingExample.java
###
package org.drools.examples;

import java.io.InputStreamReader;

import org.drools.FactHandle;
import org.drools.RuleBase;
import org.drools.RuleBaseFactory;
import org.drools.StatefulSession;
import org.drools.audit.WorkingMemoryFileLogger;
import org.drools.compiler.PackageBuilder;
import java.util.*;

public class ParsingExample {

/**
* @param args
*/
public static void main(final String[] args) throws Exception {

final PackageBuilder builder = new PackageBuilder();
builder.addPackageFromDrl( new InputStreamReader(
ParsingExample.class.getResourceAsStream( Parsing.drl ) ) );

final RuleBase ruleBase = RuleBaseFactory.newRuleBase();
ruleBase.addPackage( builder.getPackage() );

final StatefulSession session = ruleBase.newStatefulSession();

final WorkingMemoryFileLogger logger = new WorkingMemoryFileLogger( session );
logger.setFileName( log/OutputObj );

String config = ;
config += Test config Start\n;
config +=  100 bytes available 250 bytes total\n;
config +=  1000 bytes is my life goal;
String[] configA = config.split(\n);
List configL = new ArrayList();
for (int i=0; i  configA.length; i++) {
configL.add(new Row(configA ));
}
final Lines l1 = new Lines( configL );
final InputConfig a = new InputConfig( l1 );

final OutputObj t1 = new OutputObj();

session.insert( a );

session.insert( t1 );


config = ;
config += Test config Start\n;
config +=  200 bytes available 300 bytes used 500 bytes total\n;
config +=  2000 bytes is my life goal;
configA = config.split(\n);
configL = new ArrayList();
for (int i=0; i  configA.length; i++) {
configL.add(new Row(configA ));
}
final Lines l2 = new Lines( configL );
final InputConfig b = new InputConfig( l2 );

final OutputObj t2 = new OutputObj();

session.insert( b );

session.insert( t2 );


session.fireAllRules();

session.dispose();

logger.writeToDisk();
}


public static class Row {
private String val;

public Row() {

}

public Row(final String val) {
this.val = val;
}

public String getVal() {
return this.val;
}

public String toString() {
return [Row  +  :  + this.val + ];
}

}

public static class Lines {
private List rows;

public Lines() {

}

public Lines(final List rows) {
this.rows = rows;
}

public List getRows() {
return this.rows;
}

public String toString() {
return [Lines  +  :  + this.rows.toString() + ];
}

}

public static class InputConfig {
private Lines config;

public InputConfig() {

}

public InputConfig(final Lines config) {
this.config = config;
}

public Lines getConfig() {
return this.config;
}

public String toString() {
return [InputConfig  +  :  + this.config.toString() + ];
}

}

public static class OutputObj {
private String bu = ;
private String ba = ;
private String bt = ;
private String blg = ;

public OutputObj() {
}

public String getBu() {
return this.bu;
}

public void setBu(final String bu) {
this.bu = bu;
}

public String getBa() {
return this.ba;
}

public void setBa(final String ba) {
this.ba = ba;
}

public String getBt() {
return this.bt;
}

public void setBt(final String bt) {
this.bt = bt;
}

public String getBlg() {
return this.blg;
}

public void setBlg(final String blg) {
this.blg = blg;
}

public String toString() {
return [OutputObj  +  used:  + this.bu + avail:  + this.ba + 
total:  + this.bt +  Goal:  + this.blg + ];
}

}

}

###
Parsing.drl
###


package org.drools.examples

import org.drools.examples.ParsingExample.InputConfig;
import org.drools.examples.ParsingExample.OutputObj;
import org.drools.examples.ParsingExample.Lines;
import org.drools.examples.ParsingExample.Row;

rule get Bytes v10
salience 10
when
$o : OutputObj()
$i : InputConfig()
InputConfig( $conf : config)
$row : rows( val

Re: [rules-users] Drools compiler memory stateless sessions?

2008-11-26 Thread Amit Mhatre
hi, I was facing similar issues some time back, though I was using a
ruleflow and had 2 fact objects evaluated daily. The problem I was
facing was that the running time would get significantly slower day by day.
The solution that fixed it was to use a statefulSession and call dispose()
on the session once it is done. This made a single-run slower than before,
but atleast fixed the problem of exponentially increasing the run-time after
several days.

This might not necessarily be the ideal solution, so before you move to a
StatefulSession and call session.dispose() after processing, you might want
to try to increase the memory for the jvm, if is lower than the size of your
facts, this might fix it.

It'd be useful to know if somebody has a better solution to Kris's problem.

Thanks,
- am


On Wed, Nov 26, 2008 at 9:35 AM, Kris Nuttycombe
[EMAIL PROTECTED]wrote:

 Hi, all,

 I'm encountering significant problems with running out of memory when
 executing a small ruleset (only 16 rules,  100 facts). I've run jmap on the
 process (which has previously spawned multiple stateless sessions in
 parallel) and it looks like Drools, and specifically the Eclipse jdt
 compiler, is seriously eating up memory. The code calling the is fairly
 simple; one of the initial facts is an accumulator that I refer to later:

 StatelessSession session = ruleBase.newStatelessSession();
 session.execute(initialFact, accumulator);

 accumulator.doSomething();

 where ruleBase is a shared instance, and initialFact is a base fact that is
 expanded during rules processing. Is there something I should be doing to
 dispose the session after use to release the objects created by the drools
 compiler after use? I'm using a shared RuleBase, and I'm wondering whether
 it is somehow keeping references around. Are these sorts of object counts to
 be expected?

 Thanks,

 Kris
 Instance Counts for All Classes (excluding platform) 104827 
 instanceshttp://carrot.gaiam.com:7000/instances/0x2aaacf5646f8of class
 net.jxta.impl.document.LiteXMLElement$charRangehttp://carrot.gaiam.com:7000/class/0x2aaacf5646f8
 26806 instances http://carrot.gaiam.com:7000/instances/0x2aaacf5631e8 of
 class 
 net.jxta.impl.document.LiteXMLElement$tagRangehttp://carrot.gaiam.com:7000/class/0x2aaacf5631e8
 26733 instances http://carrot.gaiam.com:7000/instances/0x2aaad66ea7f0 of
 class 
 org.eclipse.jdt.internal.compiler.lookup.MethodBindinghttp://carrot.gaiam.com:7000/class/0x2aaad66ea7f0
 17366 instances http://carrot.gaiam.com:7000/instances/0x2aaad66e3c88 of
 class 
 [Lorg.eclipse.jdt.internal.compiler.lookup.TypeBinding;http://carrot.gaiam.com:7000/class/0x2aaad66e3c88
 12412 instances http://carrot.gaiam.com:7000/instances/0x2aaacf032560 of
 class 
 com.sun.enterprise.loader.EJBClassLoader$SentinelInputStreamhttp://carrot.gaiam.com:7000/class/0x2aaacf032560
 10974 instances http://carrot.gaiam.com:7000/instances/0x2aaad5504450 of
 class 
 org.apache.commons.collections.SequencedHashMap$Entryhttp://carrot.gaiam.com:7000/class/0x2aaad5504450
 8683 instances http://carrot.gaiam.com:7000/instances/0x2aaad68c3840 of 
 class
 org.eclipse.jdt.internal.compiler.codegen.CachedIndexEntryhttp://carrot.gaiam.com:7000/class/0x2aaad68c3840
 7708 instances http://carrot.gaiam.com:7000/instances/0x2aaacf55e9d8 of 
 class
 net.jxta.impl.document.LiteXMLElementhttp://carrot.gaiam.com:7000/class/0x2aaacf55e9d8
 7450 instances http://carrot.gaiam.com:7000/instances/0x2aaad5c4b6c0 of 
 class
 org.hibernate.engine.CollectionKeyhttp://carrot.gaiam.com:7000/class/0x2aaad5c4b6c0
 6836 instances http://carrot.gaiam.com:7000/instances/0x2aaaced3c3f8 of 
 class
 org.netbeans.modules.schema2beans.AttrProphttp://carrot.gaiam.com:7000/class/0x2aaaced3c3f8
 6271 instances http://carrot.gaiam.com:7000/instances/0x2aaad6642d18 of 
 class
 org.eclipse.jdt.internal.compiler.lookup.FieldBindinghttp://carrot.gaiam.com:7000/class/0x2aaad6642d18
 5643 instances http://carrot.gaiam.com:7000/instances/0x2aaad6796890 of 
 class
 org.eclipse.jdt.internal.compiler.ast.MessageSendhttp://carrot.gaiam.com:7000/class/0x2aaad6796890
 4928 instances http://carrot.gaiam.com:7000/instances/0x2aaad68a6018 of 
 class
 org.eclipse.jdt.internal.compiler.util.HashtableOfObjecthttp://carrot.gaiam.com:7000/class/0x2aaad68a6018
 4895 instances http://carrot.gaiam.com:7000/instances/0x2aaad66e3fa8 of 
 class
 [Lorg.eclipse.jdt.internal.compiler.lookup.ReferenceBinding;http://carrot.gaiam.com:7000/class/0x2aaad66e3fa8
 4546 instances http://carrot.gaiam.com:7000/instances/0x2aaad669f968 of 
 class
 org.eclipse.jdt.internal.compiler.lookup.LocalVariableBindinghttp://carrot.gaiam.com:7000/class/0x2aaad669f968
 4472 instances http://carrot.gaiam.com:7000/instances/0x2aaad687a0a8 of 
 class
 [Lorg.eclipse.jdt.internal.compiler.lookup.LocalVariableBinding;http://carrot.gaiam.com:7000/class/0x2aaad687a0a8
 4128 instances http://carrot.gaiam.com:7000/instances/0x2aaad6103ff0 of 
 class
 

[rules-users] Performance issues with using RuleFlow with StatelessSession

2008-08-10 Thread Amit Mhatre
Hi,
 this might either be a java-users questions or a drools-users, but I'd like
to try here to see if somebody has any suggestions for me.

 I have observed that the ruleFlow that I am using gets slower and slower
since its initial deployment. It initially started taking like 30mins to
evaluate all the rules, but the run-time goes up to about 4hours in about 4
days.

 I am using a statelessSession. I do a RuleBaseFactory().newRuleBase() and
ruleBase.newStatelessSession() each time I begin an evaluation (I evaluate
about 50k objects, once a day). I have the ruleBase as a private instance in
an EvaluationHandler which does other evaluations as well and is a singleton
which is obtained from a factory.

 Has anyone else too on this forum faced this issue? I found this archive,
but no reply to it:
http://www.nabble.com/Performance-Question-with-Stateless-Session-to14704425.html#a14704425

 Could it be that a new ruleBase is being created each time I do an
evaluation (it obviously is), but a reference to the old ruleBase still
hangs around (and hence the entire WorkingMemory)? I checked the RuleBase
apis and I couldn't find anything that could help me clear the workingMemory
once I am done with evaluating all the rules.

 Would be great if somebody could ched some light into this issue that I am
facing and/or let me know the path I must follow to find the root-cause of
the slowing down of the evaluations.

 Thanks,
- am
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Is there a way to preventing the Agenda to not match against ALL rules when inserting a fact object

2008-06-18 Thread Amit Mhatre
Hi,
 I am migrating one of my projects to using the drools rule-flow. I have a
bunch of RuleFlowGroups and just 1 fact object (where I am iterating over an
external list and hence I execute the RuleFlow tens of thousands times,
inserting a new fact object for each element in my list). Each RuleFlowGroup
is a logical set of rules that would set a certain variable in the
FactObject and eventually after the flow is executed, the last RuleFlowGroup
will return the outcome based on the variable set by the previous
RuleFlowGroups. I am using a statelessSession.

 The problem I am facing is that when I insert the FactObject into the
workingMemory - then the data points needed by ALL the rules across ALL the
RuleFlowGroups are gathered, i.e. the getter beans for all variables used
across all the RuleFlowGroups are invoked. The activations take place
according to the ruleFlow, but the data is gathered for all the rules
(though my flow might not reach certain groups).

 The thing is, this behavior is not ideal for the task I am working with,
since some of the data points are pretty expensive to be gathered (requiring
expensive queries to be executed). What I'd ideally like is that the data be
gathered only for one RuleFlowGroup at a time, since my rules are structured
such a way that only a fraction of the evaluations should actually need the
expensive data points. The data be gathered for the rules in a ruleFlowGroup
only when that group is active. I understand that this might take a hit for
the efficiency of the matching algorithm, but it would be ideal for my task.

 I've dug through the documentation for AgendaGroups, SequentialMode etc,
but nothing seems to be working for me.

 Has somebody faced a similar problem? Could somebody point me in the
direction I should be following to resolve this? Any help would be greatly
appreciated.

 Thanks,
- am
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users