Load Call Multiple Drools File

Load Call Multiple Drools File

In previous example you saw how to install Drools plugin in eclipse and write simple hello world application. To move one more step up today you will see how to load multiple Drools rules file, call method of java class to print pizza price.

  • Sample maven project final structure:

Load Call Multiple Drools File

  • pom.xml:

  • Sample.drl:

  • printPizzaPrice.drl:

  • Sample.java:

  • printPizzaPrice.java:

  • Test class to load multiple Drools file, execute rules and print message on console:

  • Output:

Load Call Multiple Drools File

download  Download project:  DroolsHelloWorld

Leave a Reply

Your email address will not be published. Required fields are marked *