4

I am new to drools and java.I want to setup guvnor and use database for storing rules.How should I begin with?

I have been trying to figure it out but haven't clearly understood how to start.

user3505394
  • 315
  • 5
  • 18

1 Answers1

3

If you want to get an idea of the things you can do in workbench, you're best off starting with the videos here:

http://blog.athico.com/2013/12/drools-60-workbench-and-editor-videos.html

It's a web application, so you need a web server first. JBoss AS is the only web server on which it is tested properly, so go and download that if you want to avoid spending your learning time trying to get Guvnor/Workbench working on Tomcat/Jetty/Glassfish/WebSphere/etc.

http://www.jboss.org/jbossas/downloads/

Then go to https://www.jboss.org/drools/downloads and download Workbench (the new name for Guvnor). Deploy it on your web server and browse to it.

And then just follow the instructions in the documentation:

http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html_single/index.html#d0e13220

Note that Workbench does not store rules in a database (earlier versions did); it now uses Git.

Steve
  • 9,270
  • 5
  • 47
  • 61
  • Hey, thanks for your response.Can you please tell me what will fit in my use case, using database will help or something else? Rules in my case are values like if a=5, b='abcd' then c='jkl' and d='asd'. These values needed to be updated in real time. – user3505394 Apr 08 '14 at 09:21
  • If you're looking at ongoing updates to values over time, you should read the section on Complex Event Processing: http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html_single/index.html#DroolsComplexEventProcessingChapter – Steve Apr 08 '14 at 09:26
  • Let me tell you my use case clearly.Based on values of some attributes, values of other attributes are decided.Attributes are not gonna change just their values will change.I want further processing should take place on these updated values.And these values will be added or updated frequently.So I am asking database is good solution to store values and rule engine forming rules fetching those values at run time. – user3505394 Apr 08 '14 at 10:07
  • One more thing when I say I want to store rules in database I mean individual value combination of attributes, not rule files.Like mentioned here: http://stackoverflow.com/questions/4392664/drools-storing-rules-in-database – user3505394 Apr 08 '14 at 10:24
  • Generally the database interactions won't happen in the rules. You need to insert 'facts' into working memory. These facts can be Java classes which have been marshalled from values held in a database if you like. You should really just start at the beginning and work through some tutorials before designing your application any further. – Steve Apr 08 '14 at 10:26