<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://training-course-material.com/index.php?action=history&amp;feed=atom&amp;title=Drools_environment_preparation</id>
	<title>Drools environment preparation - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://training-course-material.com/index.php?action=history&amp;feed=atom&amp;title=Drools_environment_preparation"/>
	<link rel="alternate" type="text/html" href="https://training-course-material.com/index.php?title=Drools_environment_preparation&amp;action=history"/>
	<updated>2026-05-13T23:44:28Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://training-course-material.com/index.php?title=Drools_environment_preparation&amp;diff=68880&amp;oldid=prev</id>
		<title>Fstachecki at 09:46, 14 September 2018</title>
		<link rel="alternate" type="text/html" href="https://training-course-material.com/index.php?title=Drools_environment_preparation&amp;diff=68880&amp;oldid=prev"/>
		<updated>2018-09-14T09:46:24Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Category:Drools Filip|0999]]&lt;br /&gt;
Version 7.10.0&lt;br /&gt;
=Eclipse=&lt;br /&gt;
* Download and install Eclipse from https://www.eclipse.org/downloads/&lt;br /&gt;
==Drools plugin==&lt;br /&gt;
* from Eclipse: Help &amp;gt; Install New Software... &amp;gt;&lt;br /&gt;
* Paste this URL http://download.jboss.org/drools/release/7.10.0.Final/org.drools.updatesite/ and hit Enter&lt;br /&gt;
* When the site loads, select the features to install, or click the Select All button.&lt;br /&gt;
* To properly resolve all dependencies, check &amp;#039;&amp;#039;&amp;#039;[x] Contact all update sites during install to find required software&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* Click Next, agree to the license terms, and install.&lt;br /&gt;
:[[File:ClipCapIt-180914-095701.PNG | 700px]]&lt;br /&gt;
==Drools runtime==&lt;br /&gt;
* Download and unzip Drools distribution from https://download.jboss.org/drools/release/7.10.0.Final/drools-distribution-7.10.0.Final.zip&lt;br /&gt;
* Select Window &amp;gt; Preferences &amp;gt; Drools &amp;gt; Installed Drools Runtime &amp;gt; Add…&lt;br /&gt;
* Click &amp;#039;&amp;#039;&amp;#039;Browse...&amp;#039;&amp;#039;&amp;#039; and and select the &amp;#039;&amp;#039;&amp;#039;binaries&amp;#039;&amp;#039;&amp;#039; folder of the drools distribution, you have extracted before. The version is determined automatically.&lt;br /&gt;
:[[File:ClipCapIt-180914-101253.PNG]]&lt;br /&gt;
* Click OK &amp;gt; Apply and Close&lt;br /&gt;
:[[File:ClipCapIt-180914-101511.PNG]]&lt;br /&gt;
==New Drools Project==&lt;br /&gt;
* Choose File &amp;gt; New &amp;gt; Drools Project&lt;br /&gt;
* Create a new project with example files and click Next.&lt;br /&gt;
:[[File:ClipCapIt-180914-102727.PNG]]&lt;br /&gt;
* Enter a project name, select the drools runtime created earlier, and select Add a sample HelloWorld rule file to this project. Click Finish.&lt;br /&gt;
:[[File:ClipCapIt-180914-102957.PNG]]&lt;br /&gt;
* Open the DroolsTest class that contains the main method. It is located in the package com.sample under src/main/java&lt;br /&gt;
* Delete unnecessary code (Message class, and the message object related code)&lt;br /&gt;
:[[File:ClipCapIt-180914-103815.PNG]]&lt;br /&gt;
===Fact Model===&lt;br /&gt;
* Add a new Class (right click on com.sample package under src/main/java &amp;gt; New &amp;gt; Class)&lt;br /&gt;
:[[File:ClipCapIt-180914-105559.PNG]]&lt;br /&gt;
* Enter your class name and click Finish&lt;br /&gt;
* Create fields, generate Getters and Setters (right click the editor and select Source &amp;gt; Generate Getters and Setters...)&lt;br /&gt;
:[[File:ClipCapIt-180914-105951.PNG]]&lt;br /&gt;
* Generate Constructor (right click the editor and select Source &amp;gt; Generate Constructor using Fields...)&lt;br /&gt;
:[[File:ClipCapIt-180914-110426.PNG]]&lt;br /&gt;
&lt;br /&gt;
===Rules===&lt;br /&gt;
&lt;br /&gt;
* Delete two rules related to the Message class from Sample.drl file&lt;br /&gt;
* Change the import declaration and select your Class name, set the dialect&lt;br /&gt;
* Write your first rule&lt;br /&gt;
:[[File:ClipCapIt-180914-110658.PNG]]&lt;br /&gt;
* Right click on the DroolsTest.java file and select Run as &amp;gt; Java Application&lt;br /&gt;
* Create more complicated rules, and facts, insert them to the kSession, fireAllRules and have fun :)&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
*You can ignore the SLF4J warnings&lt;br /&gt;
:[[File:ClipCapIt-180914-104612.PNG]]&lt;br /&gt;
: or download (https://www.slf4j.org/download.html) the latest version, extract the archive, and add the slf4j-simple-x.x.xx.jar to the project’s build path (right click the project &amp;gt; Build Path &amp;gt; Add External Archives &amp;gt; choose slf4j-simple-x.x.xx.jar &amp;gt; OK).&lt;br /&gt;
--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Fstachecki</name></author>
	</entry>
</feed>