Introduction

Drools is a set of projects focusing on intelligent automation and decision management, most notably providing a forward-chaining and backward-chaining inference-based rule engine, DMN decisions engine and other projects. A rule engine is a fundamental building block to create an expert system which, in artificial intelligence, is a computer system that emulates the decision-making ability of a human expert.

Drools is part of KIE (Knowledge Is Everything) open source community, which consists of various related projects, or groups of projects, that complete a portfolio of solutions for business automation and management. The most important other KIE projects or groups of projects are:

  1. Kogito is a cloud-native business automation for building intelligent applications, backed by battle-tested capabilities. It consists of multiple components, including Drools, UI modelling tools, like VS Code editors extensions, etc.

  2. OptaPlanner is a fast, easy-to-use, open source AI constraint solver for software developers. It is a lightweight, embeddable planning engine.

  3. jBPM is a toolkit for building business applications to help automate business processes and decisions.

Additional resources

Getting involved

We are often asked - "How do I get involved?" The answer is simple, just write some code and submit it :) Below is a general overview of the things we request, along with some general advice. If you contribute some good work, please consider blogging about it :)

Requirements

To contribute, you need to have:

  1. A JIRA account. If you are not registered, please create an account in JIRA.

  2. A GitHub account. Drools source code is on GitHub. To submit code contributions, you need to have a GitHub account.

Submitting an issue or enhancement request

We use JIRA to track new feature requests, bugs etc. If you find a problem in Drools, please file a ticket in JIRA under the DROOLS JIRA project. For code contributions, you could create a JIRA ticket for yourself, so your contribution gets tracked. This ensures that all requests are logged and allocated to a release schedule and all discussions are captured in one place. Bug reports, bug fixes, feature requests and feature submissions should all go here. General questions should be undertaken at the mailing lists. Minor code submissions, like format or documentation fixes do not need an associated JIRA issue created.

Submitting a source code contribution

We accept source code contributions in the form of GitHub pull requests. Steps to create a pull request with your contribution are:

  1. Fork the Drools source code repository.

  2. Clone your forked repository.

  3. Create a new git branch on your forked repository.

  4. Create a new JIRA to track your work in the DROOLS JIRA project.

  5. Do and commit the code changes on the new branch.

    • Please don’t forget to cover your changes with tests. We require each code change to be covered by tests.

    • The commit(s) need to start with the JIRA issue ID, such as DROOLS-1946. This ensures the commits are cross-referenced in JIRA, so we can see all commits for a given issue there.

    • In general, please try to avoid combining unrelated issues or changes into the same commit or pull request. If you want to contribute multiple contributions, please split them into separate pull requests.

    • Please make sure your changes don’t break other parts of the project or tests. To run all tests, please refer to Building the Drools source code.

  6. Push the new branch to your GitHub forked repository. It is usually a good thing to sync your local branch with the latest changes from the main Drools source code repository before pushing your new branch.

  7. Create a pull request to the main Drools source code GitHub repository. When creating the pull request, there is a description template. Please fill the description based on the template. The setting "Allow edits and access to secrets by maintainers" should be left as enabled by default, to allow maintainers to collaborate on your PR as needed.

  8. Your pull request will get a review from the maintainers, so please be prepared to provide answers if something will not be clear, or updates to the code, if there are some code requirements raised during the review. Please be patient, the maintainers may take some time to get to your pull request as there may be a queue of pull request to review.

  9. If you get an approval from the maintainers, the pull request will get merged into the main Drools source code repository.

Building the Drools source code

Drools is mainly a Java based set of projects that uses Maven as a build system. To build the Drools repository:

  1. Install Java JDK, at least version 11.

  2. Install Maven, at least version 3.8.6. There are rules during the build, that enforce the version of Maven, so please try to use the most current Maven version possible.

  3. Clone the Drools source code repository.

  4. Run the Maven build on command line.

Maven build executed with tests:

mvn clean install

Maven build executed without tests:

mvn clean install -Dquickly