Work
This commit is contained in:
parent
ce0f351c9d
commit
c9209dc9a5
105 changed files with 2390 additions and 839 deletions
|
|
@ -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>
|
||||
|
|
@ -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
|
||||
Loading…
Add table
editor.link_modal.header
Reference in a new issue