Building the Enlightened Enterprise
JBoss BRMS & Fuse Integration Lab
Eric D. Schabell & Christina Lin
BRMS Rules
Embedded Java
JavaEE
OSGi
Open a browser at the following address https://www.jboss.org/products/fuse.html
Download JBoss Fuse 6.1
Unzip it under your local directory
Change to the JBoss Fuse ext directory
Go to users.properties file
remove the '#' before
admin=admin,admin
Change to the JBoss Fuse bin directory
Start JBoss Fuse by executing
./fuse
Clone project or [download and unzip.](https://github.com/eschabell/brms-fuse-osgi-examples/archive/master.zip)
Compile it using maven
$ cd brms-fuse-osgi-examples
$ mvn clean install
src/main/resources/org.drools.example.drink/ rule "CanDrink" when p : Person( age >= 21 ) then p.setCanDrink(true); end
features:addurl mvn:org.drools.example/features/1.0.0-SNAPSHOT/xml/features
features:install simple-rule
KieSession created.
Person Young Person aged of 18, can't go to the Bar Person Old Person aged of 21 , can go to the Bar Person Old Person aged of 21 , can go to the Bar
features:uninstall simple-rule
KieSession disposed
asset-bundle
simple-kie-bundle
Rules
Decision tables
KieBase KieSessions
src/main/resources/org.drools.example.drink/ rule "CanDrink" when p : Person( age >= 21 ) then p.setCanDrink(true); end
features:addurl mvn:org.drools.example/features/1.0.0-SNAPSHOT/xml/features
features:install simple-import-rule
KieSession created.
Person Young Person aged of 18, can't go to the Bar Person Old Person aged of 21 , can go to the Bar Person Old Person aged of 21 , can go to the Bar
features:uninstall simple-import-rule
KieSession disposed
private static final ReleaseId APP_REL_ID = KieServices.Factory.get().newReleaseId("org.drools.example", "fetch-external-resource", "1.0.0-SNAPSHOT");
private static final String EXTERNAL_XLS_RESOURCE = "file:///Users/chmoulli/MyProjects/droolsjbpm-osgi-examples/documentation/decision-table/cheeseDecisionTable.xls";
features:addurl mvn:org.drools.example/features/1.0.0-SNAPSHOT/xml/features
features:install fetch-external-resource
KieSession created.
Cheese Cheddar costs 50 EUR.
Cheese Cheddar costs 50 EUR.
Cheese Stilton costs 10 EUR.
Cheese Stilton costs 10 EUR.
Cheese Cheddar costs 50 EUR.
Cheese Cheddar costs 50 EUR.
features:uninstall fetch-external-resource
KieSession disposed