Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8152395
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T15:42:06+00:00 2026-06-06T15:42:06+00:00

I am planning on introducing Java rules and currently in the process of evaluating

  • 0

I am planning on introducing Java rules and currently in the process of evaluating Drools to externalize (physically and logically) the business rules from the application.

Since these business rules would be very often by the business, I would want the business to make necessary changes to the rules via GUI.

I have Googled on integrating java web app + Drools + Guvnor and I’m not getting anywhere.

My Questions:

  1. Does Drools support a lightweight GUI for editing the rules?
  2. Is Drools Guvnor a lightweight GUI, or is there are a way to step it down?
  3. How easy to integrate an application to Guvnor to read the rules?

Any other suggestions on the generally a Simple implementation of Integrating Java Application + Drools + Guvnor would be great.

Any pointers to tutorials would also do it for me.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T15:42:07+00:00Added an answer on June 6, 2026 at 3:42 pm

    I’m in the process of doing something akin to what you want to do.

    Since these business rules would be very often by the business, I would want the business to make necessary changes to the rules via GUI.

    WARNING WARNING WARNING!!! It’s a common misconception that as long as there’s a GUI, non-programmers can use it. That’s… not the conclusion I’ve come to. It helps, but the hard part of programming isn’t writing code, it’s coming up with good solutions to the right problems. I’m certain some of the more intelligent and technically inclined business folks can do stuff with Guvnor, but don’t expect it to be some kind of yellow brick road to the Land of Magical Bliss. You still have to provide the business people with a sane data model and API which lets them do what they need but which prevents them from doing by accident what they don’t want to do.

    1. Does Drools support a lightweight GUI for editing the rules?

    2. Is Drools Guvnor a lightweight GUI, or is there are a way to step it down?

    Well, “lightweight” is subject for discussion, but Guvnor works fairly well and doesn’t require more than a browser, so I think it’s OK.

    3. How easy to integrate an application to Guvnor to read the rules?

    Well, once you’ve got Guvnor up and running, wiring up your application to use a KnowledgeAgent to connect to Guvnor and listen for new rule updates isn’t particularly hard.

    Unfortunately, Drools in general and Guvnor in particular has a bunch of quirks which you may have to work around (for instance, you have to explode the Guvnor WAR file and edit files in WEB-INF/beans.xml to set up a non-default configuration…). But once you’ve got that straightened out, I think it works pretty well.

    As for documentation, the Javadocs can be a bit sparse at times, but the web site has some pretty good stuff, and including several books.

    All in all, Drools and Guvnor are powerful tools, but it’s not trivial to get them working. If you really need what they have to offer, they’re worth it, but it might also be worth considering if a simpler scripting solution will suffice.


    Now, if you find yourself actually needing Drools, here’s my top piece of advice – keep separate data models for your database and your rules. It does mean there’s a lot of boring conversion code to write, but it’s well worth it.

    The app I’m working on uses JPA for database matters, and it wouldn’t have been very pleasant to use that data model in our rules. Several reasons:

    What’s fits your data layer doesn’t necessarily fit Drools, and vice versa.

    We have a tree structure, which in JPA naturally is a @OneToMany relation with the children in a list in the parent node. Working with lists in Drools was rather painful, so we flattened it to a structure where we insert one ParentNode object, and a bunch of ChildNode objects, which was far easier to work with.

    Dare to refactor.

    The rule’s data model needs to live inside of Guvnor, too – and that means you could break all rules if you rename an entity class or something like that. A separate data model for rules means you can refactor your database stuff without worries.

    Show them what they need to see.

    Databases can grow fairly complex, but the rules normally don’t need to care about many of these complexities. Exposing these complexities to the people editing rules can cause a lot of unnecessary confusion. For example, we’ve found that for our scenarios, there’s absolutely no need to expose rule writers to many-to-many relationships (which proved very complicated to handle in Drools) – so we make them look like one-to-many instead, and everything becomes more natural.

    Protection.

    We’ve designed most our rules to work like this pseudo-code:

    rule "Say hello to user"
    when 
      user : User
    then
      insert(new ShowMessageCommand("Hello " + user.getName() + "!"))
    end
    

    … and so, for each rule package, it’s clearly defined which response commands you can insert, and what they do. After we’ve run the rules in our app, we pick out the objects inserted into the session by the rules and act upon them (the visitor pattern has proven very useful to avoid long if instanceof/else if instanceof/else chains).

    I’m very happy we did it this way, instead of letting the rule writers do whatever they think they want to do with our JPA objects.

    Anyway, hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Currently planning on making the installation process for a .NET application I'm selling smoother
I planning to split my systems into front-end and back-end. Currently my application directly
im planning to use java/jsp for web application installed on virtual web hosting space
I am planning to ship a CoreData application, but I am unsure if introducing
I am planning to make an application like cPanel/WHM in perl since i never
Our business is planning on building a rather large business application with about 2000
I am planning to use EJBContext to pass some properties around from the application
I planning on reading profile data from a xml file in JSP. Now i
Im planning to learn jdbc topic. I have downloaded the HSQL DB from the
Planning to migrate our existing application to Azure. Our existing architecture with security flow

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.