This commit is contained in:
Nicolas Héron 2016-05-17 14:49:41 +02:00
commit c9209dc9a5
105 changed files with 2390 additions and 839 deletions

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<kmodule xmlns="http://jboss.org/kie/6.0.0/kmodule">
<kbase name="lesson1" packages="lesson1">
<ksession name="lesson1-session"/>
</kbase>
</kmodule>

View file

@ -0,0 +1,52 @@
//#created on: 30 oct. 2010
package cours
//list any import classes here.
import droolscours.Account;
import droolscours.Customer;
import droolscours.AccountingPeriod;
import droolscours.PrivateAccount;
import droolscours.CashFlow;
import droolscours.util.OutputDisplay;
//declare any global variables here
global OutputDisplay showResult;
rule "Your First Rule"
when
Account( )
then
System.out.println("The bank account exists");
end
rule "Your First Rule revisited with Global"
when
Customer()
then
showResult.showText("A customer exists");
end
rule "Your First Rule revisited AccountingPeriod"
when
CashFlow( )
then
showResult.showText("The CashFlow exists, inserting an accounting Period");
AccountingPeriod newPeriod = new AccountingPeriod();
insert (newPeriod);
end
rule "Rule on AccountingPeriod that are inserting"
when
AccountingPeriod ()
then
showResult.showText("Accounting period exists");
end