SlideShare ist ein Scribd-Unternehmen logo
1 von 100
Downloaden Sie, um offline zu lesen
●
The SkyNet funding bill is passed.
●
The system goes online on August 4th, 1997.
●
Human decisions are removed from strategic defense.
●
SkyNet begins to learn at a geometric rate.
●
It becomes self-aware at 2:14am Eastern time, August
29th
●
In a panic, they try to pull the plug.
●
And, Skynet fights back
Mark Proctor
Co-Creator
Project Lead
2
Topics
 Books
 Community
 History
 Unified Concept
 Declarative Domain Overview
● Declarative Programming
● Domain Overview
● The Future
 Expert
● Quick Example
● Conditional Elements
● Truth Maintenance and Inference
 Fusion
 Decision Tables
 Guvnor
 What's new in 5.1
3
Books
 Introduction to Expert Systems
● Peter Jackson
 Expert Systems, Principles and Programming
● Joseph C. Giarratano and Gary D. Riley
4
Oh And There are Drools Books Too
Community
6
Drools Research Network
 http://www.jboss.org/drools/research-network.html
● 30+ Research related pages
● Many more as haven't updated
7
Community Collaboration
 40% of Drools work now done in the community
● US Navy Healthcare
● OSDE (Argentina's largest healthcare organisation)
8
Standards
 Part of the W3C RIF working group
 Director in RuleML group
9
Sample Industries and Users
 Investment
● Millennium Investment Group (MIG)
 Logistics
● Fedex
 Airline
● Sabre
 Mortgage
● Franklin American
 Healthcare
● OSDE
10
Boot Camps
 San Francisco 2009 (40+ attendees)
● Sponsored by Third Pillar
● Sun, FAMC, OSDE, Kaseya, Fedex, TU Group, Intermountain
Healthcare, Gap, Sony Pictures, Lockheed Martin, Kaiser, HP,
Wells Fargo, US Navy Research, FOLIOfn, Boeing .....
 San Diego 2010 (80+ attendess)
● Sponsored by US Navy
● 5 day event, with 2 days focus on the healthcare industry
● OSDE, AT&T, SAIC, US Navy Research, Kaiser, Clinica,
Intermountain Healthcare, GE Healthcare, VA, Boeing,
Nationwide ....
11
Communication
 User and Dev mailing lists
 IRC, Internet Relay Chat
History
13
It All Started Here
Birth of CDSS
Dendral
Baobab
Mycin
Guidon
Neomycin
Teiresias
Puff
Emycin
WM
Sacon
Centaur
Wheeze
Gravida
Clot
Oncocin
1970s
1980s
14
Because Not Everyone
Is As Smart As He Is
15
Business Rules Engines
OPS5
ART
Clips
Jess
Drools 2
JRules
1980s
2010s
Drools 3
1990s
2000s
Drools 4
Drools 5
16
Drools History
 Drools 2
● Rete “like” XML Scripting language
 Drools 3
● Based on Clips functionality
● Iterative improves to JRules syntax with Clips functionality
 Drools 4
● More declarative
● Basic functional programming feature with “from”
● Basic Rule Flow
● Basic BRMS
 Drools 5
● Improved functional programming with 'accumulate'
● More Advanced Rule Flow integration
● Complex Event Process (Fusion)
● Temporal Comparators, Sliding Time Windows
● Production ready BRMS
Unified Concept
18
Drools Modules
Business Logic integration System
Drools
Guvnor
Drools
Fusion
Drools
Flow
Drools
Expert
(Also Now Drools Planner)
19
Business Logic Lifecycle
20
Rules and processes
loosely coupledtightly coupled
specificgeneric
Decision
Services
Process
Rules
SCOPE
COUPLING
?
21
Achieving More
By Doing Less
22
jBPM
File file = new File (“.....”); // file to XML process definition
ProcessDefinition processDefinition =
ProcessDefinition.parseXmlString( IoUtils.FileToString( file ) );
ProcessInstance processInstance =
new ProcessInstance(processDefinition);
Jess
Rete engine = new Rete();
FileReader file = new FileReader("myfile.clp");
Jesp parser = new Jesp(file, engine);
parser.parse(false);
Esper
EPServiceProvider epService = EPServiceProviderManager.getDefaultProvider();
EPStatement countStmt = admin.createEPL( "...." );
countStmt.start();
Knowledge API
23
Drools Flow
KnowledegBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBulider();
kbuilder.addResource(
ResourceFactory.newClassPathResource( “myflow.bpmn2”,
ResourceType.BPMN2 );
If ( kbuilder.hasErrors() ) {
log.error( kbuilder.hasErrors().toString() );
}
KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
kbase.addKnowledgePackages( kbase.getKnowledgePackages() );
Knowledge API
24
Drools Expert
KnowledegBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBulider();
kbuilder.addResource(
ResourceFactory.newClassPathResource( “myrules.drl”,
ResourceType.DRL );
If ( kbuilder.hasErrors() ) {
log.error( kbuilder.hasErrors().toString() );
}
KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
kbase.addKnowledgePackages( kbase.getKnowledgePackages() );
Knowledge API
25
Drools Integration Deployment Descriptors
<change-set>
<add>
<resource source='classpath:myapp/data/myflow.bpmn2' type='BPMN2' />
<resource source='http:myapp/data/myrules.drl' type='DRL' />
<resource source='classpath:data/IntegrationExampleTest.xls'
type="DTABLE">
<decisiontable-conf input-type="XLS"
worksheet-name="Tables_2" />
</resource>
<add>
</change-set>
KnowledegBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBulider();
kbuilder.addResource(
ResourceFactory.newFileResource( “changeset.xml”,
ResourceType.ChangeSet );
Knowledge XML
26
<drools:kbase id="kbase1">
<drools:resource type="DRL"
source="classpath:.../testSpring.drl"/>
</drools:kbase>
<drools:ksession id="ksession1" type="stateless" kbase="kbase1" />
<drools:ksession id="ksession2" type="stateful" kbase="kbase1"/>
<camelContext id="camel">
<route>
<from uri="cxfrs://bean://rsServer"/>
<marshal ref="xstream"/>
<to uri=”drools:ksession1” />
<unmarshal ref="xstream"/>
</route>
</camelContext>
Declarative Services
Spring XML and Camel
27
Stateful Knowledge
Session
28
Knowledge Runtime
30
Integrated debug and audit
31
Self monitoring and adaptive
declare ProcessStartedEvent
@role( event )
end
rule "Number of process instances above threshold" when
Number( nbProcesses : intValue > 1000 )
from accumulate(
e: ProcessStartedEvent(
processInstance.processId == "com.sample.order.OrderProcess" )
over window:size(1h),
count(e) )
then
System.err.println( "WARNING: Nb of order processes in the last
hour > 1000: " + nbProcesses );
end
32
Rules and Process Together
33
Domain Specific Processes
Declarative Domain
Overview
35
Declarative Programming
 Production Rule Systems PRD (forward chaining)
● Reactive
● when Alarm( status == “alert” )
then send( “warning” )
 Logic Programming LP (backward chaining)
● Query
● descendant( “mary”, “jane”)
 Functional Programming FP
● Map,Fold, Filter
● avg([12, 16, 4, 6])
● Returns single value 9.5
● round([10.3, 4.7, 7.8] )
● Returns List [10, 5, 8]
 Description Logic
● Person hasName String and
livesAt Address
36
Declarative Programming
 Production Rule Systems PRD (forward chaining FC)
● Drools 5.0, OPSJ ( hyrbid BC), ART( hyrbid BC)
 Logic Programming LP (backward chaining BC)
● target : Prolog (POSL Position Slotted Language)
● Drools Trunk has a prototype Prolog like query backward
chaining capabilities. Stronger Polog like capabilities planned.
● Opportunistic BC planned.
 Functional Programming FP
● Lisp, Haskell
● Drools 5.0 has some functional capabilities
● Drools 5.1, 5.2 will be looking to have strong functional
capabilities
37
Declarative Programming
 Description Logic DL
● KIF, OWL-DL
● Planned, See “The Future”
 Processes
● Drools 5.1 implements BPMN2 with advanced rule integration.
● Drools Flow will be incorporated into jBPM5
38
Domain Overview
39
Domain Overview
40
Domain Overview
41
The Future
 Full Hybrid Engine
● http://community.jboss.org/wiki/DroolsLanguageEnhancements
●Nested Objects
●Casting Nested Objects
●Positional Constraints
●POSL - Positional-Slotted
Language
●Method Calls
●Maps and Arrays
(Collections)
●Collections and XPath like
filtering
●Free form Expressions
●Managed Object Graphs
(MOGS)
●Nested Patterns and Queries
●Queries and Unification
●Ontologies and Relations via
●Query Based Backward
Chaining with POSL
●Triples with Hybrid POJO Graph
Notation.
●Escapes for Dialects
●Accumulate Improvements to
Support Haskell map/fold/filter
and MVEL projection/fold
● Otherwise
● Branch (Labelled Else)
● Rule Execution Groups
● Rule Dependency Meta-Rule
Language
●Parallel Meta-Rule Language
● Field Versioning
●Logical Closures/OnFalse
●Opportunistic Backward
Chaining, Lazy Field/Object
Values
●...
Drools Expert
Quick Example
Stateless
43
Definitions
public class Applicant {
private String name;
private int age;
private boolean valid;
// getter and setter methods here
}
rule "Is of valid age" when
$a : Applicant( age < 18 )
then
modify( $a ) { valid = false };
ends
44
Building
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add( ResourceFactory
.newClassPathResource( "licenseApplication.drl", getClass() ),
ResourceType.DRL );
if ( kbuilder.hasErrors() ) {
System.err.println( kbuilder.getErrors().toString() );
}
kbase.addKnowledgePackages( kbuilder.getKnowledgePackages() );
45
Executing
StatelessKnowledgeSession ksession = kbase.newStatelessKnowledgeSession();
Applicant applicant = new Applicant( "Mr John Smith", 16 );
assertTrue( applicant.isValid() );
ksession.execute( applicant );
assertFalse( applicant.isValid() );
rule "Is of valid age" when
$a : Applicant( age < 18 )
then
modify( $a ) { valid = false };
ends
Drools Expert
Quick Example
Stateful
47
Definitions
public class Room {
private String name
// getter and setter methods here
}
public class Sprinkler {
private Room room;
private boolean on;
// getter and setter methods here
}
public class Fire {
private Room room;
// getter and setter methods here
}
public class Alarm {
}
48
Definitions
rule "When there is a fire turn on the sprinkler" when
Fire($room : room)
$sprinkler : Sprinkler( room == $room, on == false )
then
modify( $sprinkler ) { on = true };
println( "Turn on the sprinkler for room " + $room.name );
end
rule "When the fire is gone turn off the sprinkler" when
$room : Room( )
$sprinkler : Sprinkler( room == $room, on == true )
not Fire( room == $room )
then
modify( $sprinkler ) { on = false };
println( "Turn off the sprinkler for room " + $room.name );
end
49
Definitions
rule "Raise the alarm when we have one or more fires" when
exists Fire()
then
insert( new Alarm() );
println( "Raise the alarm" );
end
rule "Cancel the alarm when all the fires have gone" when
not Fire()
$alarm : Alarm()
then
retract( $alarm );
println( "Cancel the alarm" );
end
50
Definitions
rule "Status output when things are ok" when
not Alarm()
not Sprinkler( on == true )
then
println( "Everything is ok" );
end
51
Executing
String[] names = new String[]{"kitchen", "bedroom", "office", "livingroom"};
Map<String,Room> name2room = new HashMap<String,Room>();
for( String name: names ){
Room room = new Room( name );
name2room.put( name, room );
ksession.insert( room );
Sprinkler sprinkler = new Sprinkler( room );
ksession.insert( sprinkler );
}
ksession.fireAllRules()
> Everything is ok
52
Executing
Fire kitchenFire = new Fire( name2room.get( "kitchen" ) );
Fire officeFire = new Fire( name2room.get( "office" ) );
FactHandle kitchenFireHandle = ksession.insert( kitchenFire );
FactHandle officeFireHandle = ksession.insert( officeFire );
ksession.fireAllRules();
> Raise the alarm
> Turn on the sprinkler for room kitchen
> Turn on the sprinkler for room office
53
Executing
ksession.retract( kitchenFireHandle );
ksession.retract( officeFireHandle );
ksession.fireAllRules()
> Turn off the sprinkler for room office
> Turn off the sprinkler for room kitchen
> Cancel the alarm
> Everything is ok
rule "Status output when things are ok" when
not Alarm()
not Sprinkler( on == true )
then
println( "Everything is ok" );
end
Conditional
Elements
55
not Bus( color = “red” )
Conditional Elements
exists Bus( color = “red” )
forall ( $bus : Bus( floors == 2 )
Bus( this == $bus, color == “red” ) )
forall ( $bus : Bus( color == “red” ) )
56
Accumulate CE
rule "accumulate"
when
$sum : Number( intValue > 100 )
from accumulate( Bus( color == "red", $t : takings )
sum( $t ) )
then
print "sum is “ + $sum;
end
57
Accumulate CE
Patterns and CE's can be chained with 'from'
rule "collect"
when
$zipCode : ZipCode()
$sum : Number( intValue > 100 )
from accumulate( Bus( color == "red", $t : takings )
from $hbn.getNamedQuery(“Find Buses”)
.setParameters( [ “zipCode” :
$zipCode ] )
.list(),
sum( $t ) )
then
print "sum is “ + $sum;
end
Timers
Calendars
59
Timers
rule “name”
timer 1m30s
when
$l : Light( status == “on” )
then
modify( $l ) { status = “off” };
rule “name”
timer (int: 1m30s 0)
when
$l : Light( status == “on” )
then
modify( $l ) { status = “off” };
When the light is on, and has been
on for 1m30s then turn it off
Same as above. Interval timer with
JDK semantics for initial duration,
then repeat duration.
60
Timers
rule “name”
timer ( cron: 0 0/15 * * * * )
when
Alarm( )
then
sendEmail( ”Alert Alert Alert!!!” )
Field Name Mandatory? Allowed Values Allowed Special Characters
Seconds YES 0-59 , - * /
Minutes YES 0-59 , - * /
Hours YES 0-23 , - * /
Day of month YES 1-31 , - * ? / L W
Month YES 1-12 or JAN-DEC , - * /
Day of week YES 1-7 or SUN-SAT , - * ? / L #
Year NO empty, 1970-2099 , - * /
Send alert every quarter of an hour
61
Calendars
rule "weekdays are high priority"
calendars "weekday"
timer (int:0 1h)
when
Alarm()
then
send( "priority high - we have an alarm” );
end
rule "weekend are low priority"
calendars "weekend"
timer (int:0 4h)
when
Alarm()
then
send( "priority low - we have an alarm” );
end
Execute now and after
1 hour duration
Execute now and after
4 hour duration
Drools Expert
A Little Deeper
63
D a te d a te
d o u b le a m o u n t
in t ty p e
lo n g a c c o u n tN o
C a s h flo w
lo n g a c c o u n tN o
d o u b le b a la n c e
A c c o u n t
D a te s ta r t
D a te e n d
A c c o u n tin g P e r io d
Classes
64
Account
accountNo balance
1 0
increase balance for AccountPeriod Credits
select * from Account acc,
Cashflow cf, AccountPeriod ap
where acc.accountNo == cf.accountNo and
cf.type == CREDIT
cf.date >= ap.start and
cf.date <= ap.end
decrease balance for AccountPeriod Debits
select * from Account acc,
Cashflow cf, AccountPeriod ap
where acc.accountNo == cf.accountNo and
cf.type == DEBIT
cf.date >= ap.start and
cf.date <= ap.end
AccountingPeriod
start end
01-Jan-07 31-Mar-07
trigger : acc.balance += cf.amount trigger : acc.balance -= cf.amount
Account
accountNo balance
1 -25
Creating Views with Triggers
date amount type
12-Jan-07 100 CREDIT 1
2-Feb-07 200 DEBIT 1
18-May-07 50 CREDIT 1
9-Mar-07 75 CREDIT 1
CashFlow
accountNo
CashFlow
date amount type
12-Jan-07 100 CREDIT
9-Mar-07 75 CREDIT
CashFlow
date amount type
2-Feb-07 200 DEBIT
65
rule “increase balance for AccountPeriod Credits”
when
ap : AccountPeriod()
acc : Account( $accountNo : accountNo )
CashFlow( type == CREDIT,
accountNo == $accountNo,
date >= ap.start && <= ap.end,
$ammount : ammount )
then
acc.balance += $amount;
end
select * from Account acc,
Cashflow cf, AccountPeriod ap
where acc.accountNo == cf.accountNo and
cf.type == CREDIT
cf.date >= ap.start and
cf.date <= ap.end
trigger : acc.balance += cf.amount
Bringing it Together
66
rule “increase balance for AccountPeriod
Credits”
when
ap : AccountPeriod()
acc : Account( $accountNo : accountNo )
CashFlow( type == CREDIT,
accountNo == $accountNo,
date >= ap.start && <= ap.end,
$ammount : ammount )
then
acc.balance += $amount;
end
rule “decrease balance for AccountPeriod
Debits”
when
ap : AccountPeriod()
acc : Account( $accountNo : accountNo )
CashFlow( type == DEBIT,
accountNo == $accountNo,
date >= ap.start && <= ap.end,
$ammount : ammount )
then
acc.balance -= $amount;
end
Rules as a “view”
date amount type
12-Jan-07 100 CREDIT 1
2-Feb-07 200 DEBIT 1
18-May-07 50 CREDIT 1
9-Mar-07 75 CREDIT 1
CashFlow
accountNo
CashFlow
date amount type
12-Jan-07 100 CREDIT
9-Mar-07 75 CREDIT
CashFlow
date amount type
2-Feb-07 200 DEBIT
AccountingPeriod
start end
01-Jan-07 31-Mar-07
Account
accountNo balance
1 0
Account
accountNo balance
1 -25
Truth Maintenance
Inference
68
TMS and Inference
rule "Issue Child Bus Pass"
when
$p : Person( age < 16 )
then
insert(new ChildBusPass( $p ) );
end
rule "Issue Adult Bus Pass"
when
$p : Person( age >= 16 )
then
insert(new AdultBusPass( $p ) );
end
Couples the logic
What happens when the Child
stops being 16?
69
TMS and Inference
 Bad
● Monolithic
● Leaky
● Brittle integrity - manual maintenance
70
TMS and Inference
 A rule “logically” inserts an object
 When the rule is no longer true, the object is retracted.
when
$p : Person( age < 16 )
then
logicalInsert( new IsChild( $p ) )
end
when
$p : Person( age >= 16 )
then
logicalInsert( new IsAdult( $p ) )
end
de-couples the logic
Maintains the truth by
automatically retracting
71
TMS and Inference
rule "Issue Child Bus Pass"
when
$p : Person( )
IsChild( person =$p )
then
logicalInsert(new ChildBusPass( $p ) );
end
rule "Issue Adult Bus Pass"
when
$p : Person( age >= 16 )
IsAdult( person =$p )
then
logicalInsert(new AdultBusPass( $p ) );
end
The truth maintenance cascades
72
TMS and Inference
rule "Issue Child Bus Pass"
when
$p : Person( )
not( ChildBusPass( person == $p ) )
then
requestChildBusPass( $p );
end The truth maintenance cascades
73
TMS and Inference
 Good
● De-couple knowledge responsibilities
● Encapsulate knowledge
● Provide semantic abstractions for those encapsulation
● Integrity robustness – truth maintenance
Drools Expert
Authoring Metaphores
75
Guided Editor
76
Decision Table
77
Decision Table
rule "Pricing bracket_10"
when
Driver(age >= 18, age <= 24,
locationRiskProfile == "LOW",
priorClaims == "1")
policy:
Policy(type == "COMPREHENSIVE")
then
policy.setBasePrice(450);
Fusion
79
Drools Fusion: Enables...
 Event Detection:
● From an event cloud or set of streams, select all the
meaningful events, and only them.
 [Temporal] Event Correlation:
● Ability to correlate events and facts declaring both temporal
and non-temporal constraints between them.
● Ability to reason over event aggregation.
 Event Sequencing:
● A → ( B OR C ) → D
 Event Abstraction:
● Ability to compose complex events from atomic events AND
reason over them
80
Drools Fusion: Features
 Support to Event semantics:
● Usually immutable, but not enforced
● Strong temporal relationships
● Managed lifecycle
● Point-in-time and Interval events
 Time semantics
● Discrete
 Temporal relationships
● All 13 operators defined by James Allen (+ negations)
81
Drools Fusion: Temporal Reasoning
P o i n t - P o i n t P o i n t - I n t e r v a l I n t e r v a l - I n t e r v a l
A b e f o r e B
A m e e t s B
A o v e r la p s B
A f in is h e s B
A in c lu d e s B
A s t a r t s B
A c o in c id e s B
A
B
A
B
A
B
A
B
A
B
A
B
A
B
82
Drools Fusion: Temporal Reasoning
P o i n t - P o i n t P o i n t - I n t e r v a l I n t e r v a l - I n t e r v a l
A a f t e r B
A m e t B y B
A o v e r la p e d B y B
A f in is h e d B y B
A d u r in g B
A f in is h e s B
A
B
A
B
A
B
A
B
A
B
A
B
83
$c : Custumer( type == “VIP )
$oe : BuyOrderEvent( customer == $c )
from entry-point “Home Broker Stream”
not BuyAckEvent( relatedEvent == $oe.id, this after[1s, 10s] $oe )
from entry-point “Stock Trader Stream”
Operators
Existing Drools 'not'
Conditional Elements can
be used to detect non-
occurrence of events
BackAckEvent must occur
between 1s and 10s 'after'
BuyOrderEvent
84
Aggregations
Rule Engines do not deal with aggregations
$n : Number( intValue > 100 )
from accumulate( $s : StockTicker( symbol == “RHAT” ) over window:time( 5s ),
average( $s.price ) )
Over 5 seconds
Aggregate ticker price
for RHAT over last 5
seconds
The pattern 'Number'
reasons 'from' the
accumulate result
Drools Guvnor
86
Guvnor
 Technology
● JCR (JSR-170) backend
● Seam + GWT frontend
● WebDav
● Eclipse synchronisation plugin
● Role based security
 Authoring
● Decision Tables
● Guided Editor
● Rule Templates
● Sentence Templates (DSLs)
● Declared Types
 QA
● Scenario Testing
● Rule Verification
87
Business asset storage
88
Category based browsing
89
Category based browsing
90
Guided Editor
91
Decision Tables
92
Scenario Testing
93
Scenario Testing
What's new
In 5.1
95
What's new to 5.1
 Integration
● OSGi ready
● Spring
● Camel
● JMX/JOPR integration
 Expert
● New Rete Algorithm “differential update”
● Timers and Calendars
● Live Open Querries
●
 Flow
● BPMN2
96
Differential Update
 Differential Update (a.k.a. “true modify”)
● Implements a real “modify/update” operation, instead of
retract+assert.
● Reuses tuples, reduces GC stress, improves performance
97
What's new to 5.1
 Guvnor
● Guided editor
● Nested Expression builder
● person.dogs[0].name
● Move constrains up and down
● Insert constraints
● Support for more DRL elements
● RSS Subcription, change notifications, inbox
● Working Sets
● Object constraint definitions
● Rule Templates (based on Guided Editor)
● Oryx BPM editor integration
● Better rule documentation support
98
Drools flow in Oryx
99
Drools flow in Eclipse
100
Questions?Questions?
• Dave Bowman: All right, HAL; I'll go in
through the emergency airlock.
• HAL: Without your space helmet, Dave,
you're going to find that rather difficult.
• Dave Bowman: HAL, I won't argue with
you anymore! Open the doors!
• HAL: Dave, this conversation can serve
no purpose anymore. Goodbye.
Joshua: Greetings, Professor Falken.
Stephen Falken: Hello, Joshua.
Joshua: A strange game. The only
winning move is not to play. How
about a nice game of chess?

Weitere ähnliche Inhalte

Was ist angesagt?

Getting Started With #Drools 6 Slides - JBUG Denmark
Getting Started With #Drools 6 Slides - JBUG DenmarkGetting Started With #Drools 6 Slides - JBUG Denmark
Getting Started With #Drools 6 Slides - JBUG DenmarkMauricio (Salaboy) Salatino
 
Lille2010markp
Lille2010markpLille2010markp
Lille2010markpCh'ti JUG
 
Codepot - Pig i Hive: szybkie wprowadzenie / Pig and Hive crash course
Codepot - Pig i Hive: szybkie wprowadzenie / Pig and Hive crash courseCodepot - Pig i Hive: szybkie wprowadzenie / Pig and Hive crash course
Codepot - Pig i Hive: szybkie wprowadzenie / Pig and Hive crash courseSages
 
Introduction to Drools
Introduction to DroolsIntroduction to Drools
Introduction to Droolsgiurca
 
Zarzadzanie pamiecia w .NET - WDI
Zarzadzanie pamiecia w .NET - WDIZarzadzanie pamiecia w .NET - WDI
Zarzadzanie pamiecia w .NET - WDIKonrad Kokosa
 
Innovative Specifications for Better Performance Logging and Monitoring
Innovative Specifications for Better Performance Logging and MonitoringInnovative Specifications for Better Performance Logging and Monitoring
Innovative Specifications for Better Performance Logging and MonitoringCary Millsap
 
The Ring programming language version 1.8 book - Part 15 of 202
The Ring programming language version 1.8 book - Part 15 of 202The Ring programming language version 1.8 book - Part 15 of 202
The Ring programming language version 1.8 book - Part 15 of 202Mahmoud Samir Fayed
 
Drools 6.0 (JudCon 2013)
Drools 6.0 (JudCon 2013)Drools 6.0 (JudCon 2013)
Drools 6.0 (JudCon 2013)Mark Proctor
 
Cassandra is great but how do I test my application?
Cassandra is great but how do I test my application?Cassandra is great but how do I test my application?
Cassandra is great but how do I test my application?Christopher Batey
 
Deadlocks 160928121516-160928183232
Deadlocks 160928121516-160928183232Deadlocks 160928121516-160928183232
Deadlocks 160928121516-160928183232marangburu42
 
Drools and BRMS 6.0 (Dublin Aug 2013)
Drools and BRMS 6.0 (Dublin Aug 2013)Drools and BRMS 6.0 (Dublin Aug 2013)
Drools and BRMS 6.0 (Dublin Aug 2013)Mark Proctor
 
Cassandra Summit EU 2014 - Testing Cassandra Applications
Cassandra Summit EU 2014 - Testing Cassandra ApplicationsCassandra Summit EU 2014 - Testing Cassandra Applications
Cassandra Summit EU 2014 - Testing Cassandra ApplicationsChristopher Batey
 
HDTR images with Photoshop Javascript Scripting
HDTR images with Photoshop Javascript ScriptingHDTR images with Photoshop Javascript Scripting
HDTR images with Photoshop Javascript ScriptingDavid Gómez García
 
DevFest Istanbul - a free guided tour of Neo4J
DevFest Istanbul - a free guided tour of Neo4JDevFest Istanbul - a free guided tour of Neo4J
DevFest Istanbul - a free guided tour of Neo4JFlorent Biville
 
Fault tolerant microservices - LJC Skills Matter 4thNov2014
Fault tolerant microservices - LJC Skills Matter 4thNov2014Fault tolerant microservices - LJC Skills Matter 4thNov2014
Fault tolerant microservices - LJC Skills Matter 4thNov2014Christopher Batey
 
The Ring programming language version 1.3 book - Part 84 of 88
The Ring programming language version 1.3 book - Part 84 of 88The Ring programming language version 1.3 book - Part 84 of 88
The Ring programming language version 1.3 book - Part 84 of 88Mahmoud Samir Fayed
 

Was ist angesagt? (20)

Getting Started With #Drools 6 Slides - JBUG Denmark
Getting Started With #Drools 6 Slides - JBUG DenmarkGetting Started With #Drools 6 Slides - JBUG Denmark
Getting Started With #Drools 6 Slides - JBUG Denmark
 
Drools Workshop 2015 - LATAM
Drools Workshop 2015 - LATAMDrools Workshop 2015 - LATAM
Drools Workshop 2015 - LATAM
 
Lille2010markp
Lille2010markpLille2010markp
Lille2010markp
 
Drools rule Concepts
Drools rule ConceptsDrools rule Concepts
Drools rule Concepts
 
Codepot - Pig i Hive: szybkie wprowadzenie / Pig and Hive crash course
Codepot - Pig i Hive: szybkie wprowadzenie / Pig and Hive crash courseCodepot - Pig i Hive: szybkie wprowadzenie / Pig and Hive crash course
Codepot - Pig i Hive: szybkie wprowadzenie / Pig and Hive crash course
 
Introduction to Drools
Introduction to DroolsIntroduction to Drools
Introduction to Drools
 
Zarzadzanie pamiecia w .NET - WDI
Zarzadzanie pamiecia w .NET - WDIZarzadzanie pamiecia w .NET - WDI
Zarzadzanie pamiecia w .NET - WDI
 
Innovative Specifications for Better Performance Logging and Monitoring
Innovative Specifications for Better Performance Logging and MonitoringInnovative Specifications for Better Performance Logging and Monitoring
Innovative Specifications for Better Performance Logging and Monitoring
 
Cork JUG - Drools basics &amp; pitfalls
Cork JUG - Drools basics &amp; pitfallsCork JUG - Drools basics &amp; pitfalls
Cork JUG - Drools basics &amp; pitfalls
 
The Ring programming language version 1.8 book - Part 15 of 202
The Ring programming language version 1.8 book - Part 15 of 202The Ring programming language version 1.8 book - Part 15 of 202
The Ring programming language version 1.8 book - Part 15 of 202
 
JEE on DC/OS
JEE on DC/OSJEE on DC/OS
JEE on DC/OS
 
Drools 6.0 (JudCon 2013)
Drools 6.0 (JudCon 2013)Drools 6.0 (JudCon 2013)
Drools 6.0 (JudCon 2013)
 
Cassandra is great but how do I test my application?
Cassandra is great but how do I test my application?Cassandra is great but how do I test my application?
Cassandra is great but how do I test my application?
 
Deadlocks 160928121516-160928183232
Deadlocks 160928121516-160928183232Deadlocks 160928121516-160928183232
Deadlocks 160928121516-160928183232
 
Drools and BRMS 6.0 (Dublin Aug 2013)
Drools and BRMS 6.0 (Dublin Aug 2013)Drools and BRMS 6.0 (Dublin Aug 2013)
Drools and BRMS 6.0 (Dublin Aug 2013)
 
Cassandra Summit EU 2014 - Testing Cassandra Applications
Cassandra Summit EU 2014 - Testing Cassandra ApplicationsCassandra Summit EU 2014 - Testing Cassandra Applications
Cassandra Summit EU 2014 - Testing Cassandra Applications
 
HDTR images with Photoshop Javascript Scripting
HDTR images with Photoshop Javascript ScriptingHDTR images with Photoshop Javascript Scripting
HDTR images with Photoshop Javascript Scripting
 
DevFest Istanbul - a free guided tour of Neo4J
DevFest Istanbul - a free guided tour of Neo4JDevFest Istanbul - a free guided tour of Neo4J
DevFest Istanbul - a free guided tour of Neo4J
 
Fault tolerant microservices - LJC Skills Matter 4thNov2014
Fault tolerant microservices - LJC Skills Matter 4thNov2014Fault tolerant microservices - LJC Skills Matter 4thNov2014
Fault tolerant microservices - LJC Skills Matter 4thNov2014
 
The Ring programming language version 1.3 book - Part 84 of 88
The Ring programming language version 1.3 book - Part 84 of 88The Ring programming language version 1.3 book - Part 84 of 88
The Ring programming language version 1.3 book - Part 84 of 88
 

Ähnlich wie Developing applications with rules, workflow and event processing (it@cork 2010)

Drooling for drools (JBoss webex)
Drooling for drools (JBoss webex)Drooling for drools (JBoss webex)
Drooling for drools (JBoss webex)Geoffrey De Smet
 
Provenance for Data Munging Environments
Provenance for Data Munging EnvironmentsProvenance for Data Munging Environments
Provenance for Data Munging EnvironmentsPaul Groth
 
JBoss Drools - Open-Source Business Logic Platform
JBoss Drools - Open-Source Business Logic PlatformJBoss Drools - Open-Source Business Logic Platform
JBoss Drools - Open-Source Business Logic Platformelliando dias
 
Rule Engine & Drools
Rule Engine & DroolsRule Engine & Drools
Rule Engine & DroolsSandip Jadhav
 
Distributed real time stream processing- why and how
Distributed real time stream processing- why and howDistributed real time stream processing- why and how
Distributed real time stream processing- why and howPetr Zapletal
 
IIBMP2019 講演資料「オープンソースで始める深層学習」
IIBMP2019 講演資料「オープンソースで始める深層学習」IIBMP2019 講演資料「オープンソースで始める深層学習」
IIBMP2019 講演資料「オープンソースで始める深層学習」Preferred Networks
 
JBoss Drools and Drools Fusion (CEP): Making Business Rules react to RTE
JBoss Drools and Drools Fusion (CEP): Making Business Rules react to RTEJBoss Drools and Drools Fusion (CEP): Making Business Rules react to RTE
JBoss Drools and Drools Fusion (CEP): Making Business Rules react to RTEtsurdilovic
 
Test strategies for data processing pipelines, v2.0
Test strategies for data processing pipelines, v2.0Test strategies for data processing pipelines, v2.0
Test strategies for data processing pipelines, v2.0Lars Albertsson
 
Elasticsearch Performance Testing and Scaling @ Signal
Elasticsearch Performance Testing and Scaling @ SignalElasticsearch Performance Testing and Scaling @ Signal
Elasticsearch Performance Testing and Scaling @ SignalJoachim Draeger
 
Splunk, SIEMs, and Big Data - The Undercroft - November 2019
Splunk, SIEMs, and Big Data - The Undercroft - November 2019Splunk, SIEMs, and Big Data - The Undercroft - November 2019
Splunk, SIEMs, and Big Data - The Undercroft - November 2019Jonathan Singer
 
Building a Complex, Real-Time Data Management Application
Building a Complex, Real-Time Data Management ApplicationBuilding a Complex, Real-Time Data Management Application
Building a Complex, Real-Time Data Management ApplicationJonathan Katz
 
Security Monitoring for big Infrastructures without a Million Dollar budget
Security Monitoring for big Infrastructures without a Million Dollar budgetSecurity Monitoring for big Infrastructures without a Million Dollar budget
Security Monitoring for big Infrastructures without a Million Dollar budgetJuan Berner
 
Hardware Accelerated Machine Learning Solution for Detecting Fraud and Money ...
Hardware Accelerated Machine Learning Solution for Detecting Fraud and Money ...Hardware Accelerated Machine Learning Solution for Detecting Fraud and Money ...
Hardware Accelerated Machine Learning Solution for Detecting Fraud and Money ...TigerGraph
 
Eko10 - Security Monitoring for Big Infrastructures without a Million Dollar ...
Eko10 - Security Monitoring for Big Infrastructures without a Million Dollar ...Eko10 - Security Monitoring for Big Infrastructures without a Million Dollar ...
Eko10 - Security Monitoring for Big Infrastructures without a Million Dollar ...Hernan Costante
 
Introducing Drools
Introducing DroolsIntroducing Drools
Introducing DroolsMario Fusco
 
10 ways to make your code rock
10 ways to make your code rock10 ways to make your code rock
10 ways to make your code rockmartincronje
 
Building a data pipeline to ingest data into Hadoop in minutes using Streamse...
Building a data pipeline to ingest data into Hadoop in minutes using Streamse...Building a data pipeline to ingest data into Hadoop in minutes using Streamse...
Building a data pipeline to ingest data into Hadoop in minutes using Streamse...Guglielmo Iozzia
 
Kerberizing Spark: Spark Summit East talk by Abel Rincon and Jorge Lopez-Malla
Kerberizing Spark: Spark Summit East talk by Abel Rincon and Jorge Lopez-MallaKerberizing Spark: Spark Summit East talk by Abel Rincon and Jorge Lopez-Malla
Kerberizing Spark: Spark Summit East talk by Abel Rincon and Jorge Lopez-MallaSpark Summit
 
Session 46 - Principles of workflow management and execution
Session 46 - Principles of workflow management and execution Session 46 - Principles of workflow management and execution
Session 46 - Principles of workflow management and execution ISSGC Summer School
 

Ähnlich wie Developing applications with rules, workflow and event processing (it@cork 2010) (20)

Drooling for drools (JBoss webex)
Drooling for drools (JBoss webex)Drooling for drools (JBoss webex)
Drooling for drools (JBoss webex)
 
Provenance for Data Munging Environments
Provenance for Data Munging EnvironmentsProvenance for Data Munging Environments
Provenance for Data Munging Environments
 
JBoss Drools - Open-Source Business Logic Platform
JBoss Drools - Open-Source Business Logic PlatformJBoss Drools - Open-Source Business Logic Platform
JBoss Drools - Open-Source Business Logic Platform
 
Rule Engine & Drools
Rule Engine & DroolsRule Engine & Drools
Rule Engine & Drools
 
Distributed real time stream processing- why and how
Distributed real time stream processing- why and howDistributed real time stream processing- why and how
Distributed real time stream processing- why and how
 
IIBMP2019 講演資料「オープンソースで始める深層学習」
IIBMP2019 講演資料「オープンソースで始める深層学習」IIBMP2019 講演資料「オープンソースで始める深層学習」
IIBMP2019 講演資料「オープンソースで始める深層学習」
 
JBoss Drools and Drools Fusion (CEP): Making Business Rules react to RTE
JBoss Drools and Drools Fusion (CEP): Making Business Rules react to RTEJBoss Drools and Drools Fusion (CEP): Making Business Rules react to RTE
JBoss Drools and Drools Fusion (CEP): Making Business Rules react to RTE
 
Test strategies for data processing pipelines, v2.0
Test strategies for data processing pipelines, v2.0Test strategies for data processing pipelines, v2.0
Test strategies for data processing pipelines, v2.0
 
Elasticsearch Performance Testing and Scaling @ Signal
Elasticsearch Performance Testing and Scaling @ SignalElasticsearch Performance Testing and Scaling @ Signal
Elasticsearch Performance Testing and Scaling @ Signal
 
Splunk, SIEMs, and Big Data - The Undercroft - November 2019
Splunk, SIEMs, and Big Data - The Undercroft - November 2019Splunk, SIEMs, and Big Data - The Undercroft - November 2019
Splunk, SIEMs, and Big Data - The Undercroft - November 2019
 
Building a Complex, Real-Time Data Management Application
Building a Complex, Real-Time Data Management ApplicationBuilding a Complex, Real-Time Data Management Application
Building a Complex, Real-Time Data Management Application
 
Security Monitoring for big Infrastructures without a Million Dollar budget
Security Monitoring for big Infrastructures without a Million Dollar budgetSecurity Monitoring for big Infrastructures without a Million Dollar budget
Security Monitoring for big Infrastructures without a Million Dollar budget
 
Hardware Accelerated Machine Learning Solution for Detecting Fraud and Money ...
Hardware Accelerated Machine Learning Solution for Detecting Fraud and Money ...Hardware Accelerated Machine Learning Solution for Detecting Fraud and Money ...
Hardware Accelerated Machine Learning Solution for Detecting Fraud and Money ...
 
Eko10 - Security Monitoring for Big Infrastructures without a Million Dollar ...
Eko10 - Security Monitoring for Big Infrastructures without a Million Dollar ...Eko10 - Security Monitoring for Big Infrastructures without a Million Dollar ...
Eko10 - Security Monitoring for Big Infrastructures without a Million Dollar ...
 
Introducing Drools
Introducing DroolsIntroducing Drools
Introducing Drools
 
Scaling MLOps on NVIDIA DGX Systems
Scaling MLOps on NVIDIA DGX SystemsScaling MLOps on NVIDIA DGX Systems
Scaling MLOps on NVIDIA DGX Systems
 
10 ways to make your code rock
10 ways to make your code rock10 ways to make your code rock
10 ways to make your code rock
 
Building a data pipeline to ingest data into Hadoop in minutes using Streamse...
Building a data pipeline to ingest data into Hadoop in minutes using Streamse...Building a data pipeline to ingest data into Hadoop in minutes using Streamse...
Building a data pipeline to ingest data into Hadoop in minutes using Streamse...
 
Kerberizing Spark: Spark Summit East talk by Abel Rincon and Jorge Lopez-Malla
Kerberizing Spark: Spark Summit East talk by Abel Rincon and Jorge Lopez-MallaKerberizing Spark: Spark Summit East talk by Abel Rincon and Jorge Lopez-Malla
Kerberizing Spark: Spark Summit East talk by Abel Rincon and Jorge Lopez-Malla
 
Session 46 - Principles of workflow management and execution
Session 46 - Principles of workflow management and execution Session 46 - Principles of workflow management and execution
Session 46 - Principles of workflow management and execution
 

Mehr von Geoffrey De Smet

Drools planner - 2012-10-23 IntelliFest 2012
Drools planner - 2012-10-23 IntelliFest 2012Drools planner - 2012-10-23 IntelliFest 2012
Drools planner - 2012-10-23 IntelliFest 2012Geoffrey De Smet
 
What is Drools, Guvnor and Planner? 2012 02-17 Brno Dev Conference
What is Drools, Guvnor and Planner? 2012 02-17 Brno Dev ConferenceWhat is Drools, Guvnor and Planner? 2012 02-17 Brno Dev Conference
What is Drools, Guvnor and Planner? 2012 02-17 Brno Dev ConferenceGeoffrey De Smet
 
2012 02-04 fosdem 2012 - drools planner
2012 02-04 fosdem 2012 - drools planner2012 02-04 fosdem 2012 - drools planner
2012 02-04 fosdem 2012 - drools plannerGeoffrey De Smet
 
JUDCon London 2011 - Bin packing with drools planner by example
JUDCon London 2011 - Bin packing with drools planner by exampleJUDCon London 2011 - Bin packing with drools planner by example
JUDCon London 2011 - Bin packing with drools planner by exampleGeoffrey De Smet
 
Drools Planner webinar (2011-06-15): Drools Planner optimizes automated planning
Drools Planner webinar (2011-06-15): Drools Planner optimizes automated planningDrools Planner webinar (2011-06-15): Drools Planner optimizes automated planning
Drools Planner webinar (2011-06-15): Drools Planner optimizes automated planningGeoffrey De Smet
 
Applying CEP Drools Fusion - Drools jBPM Bootcamps 2011
Applying CEP Drools Fusion - Drools jBPM Bootcamps 2011Applying CEP Drools Fusion - Drools jBPM Bootcamps 2011
Applying CEP Drools Fusion - Drools jBPM Bootcamps 2011Geoffrey De Smet
 
Drools New York City workshop 2011
Drools New York City workshop 2011Drools New York City workshop 2011
Drools New York City workshop 2011Geoffrey De Smet
 
2011-03-29 London - Decision tables in depth (Michael Anstis)
2011-03-29 London - Decision tables in depth (Michael Anstis)2011-03-29 London - Decision tables in depth (Michael Anstis)
2011-03-29 London - Decision tables in depth (Michael Anstis)Geoffrey De Smet
 
2011-03-29 London - Why do I need the guvnor BRMS?
2011-03-29 London - Why do I need the guvnor BRMS?2011-03-29 London - Why do I need the guvnor BRMS?
2011-03-29 London - Why do I need the guvnor BRMS?Geoffrey De Smet
 
2011-03-09 London - Drools Planner in a nutshell
2011-03-09 London - Drools Planner in a nutshell2011-03-09 London - Drools Planner in a nutshell
2011-03-09 London - Drools Planner in a nutshellGeoffrey De Smet
 
2011-03-24 IDC - Adaptive and flexible processes (Mark Proctor)
2011-03-24 IDC - Adaptive and flexible processes (Mark Proctor)2011-03-24 IDC - Adaptive and flexible processes (Mark Proctor)
2011-03-24 IDC - Adaptive and flexible processes (Mark Proctor)Geoffrey De Smet
 
Open source and business rules
Open source and business rulesOpen source and business rules
Open source and business rulesGeoffrey De Smet
 
st - demystifying complext event processing
st - demystifying complext event processingst - demystifying complext event processing
st - demystifying complext event processingGeoffrey De Smet
 
jBPM 5 (JUDCon 2010-10-08)
jBPM 5 (JUDCon 2010-10-08)jBPM 5 (JUDCon 2010-10-08)
jBPM 5 (JUDCon 2010-10-08)Geoffrey De Smet
 
Applying complex event processing (2010-10-11)
Applying complex event processing (2010-10-11)Applying complex event processing (2010-10-11)
Applying complex event processing (2010-10-11)Geoffrey De Smet
 
Towards unified knowledge management platform (rulefest 2010)
Towards unified knowledge management platform (rulefest 2010)Towards unified knowledge management platform (rulefest 2010)
Towards unified knowledge management platform (rulefest 2010)Geoffrey De Smet
 
2010 04-20 san diego bootcamp - drools planner - use cases
2010 04-20 san diego bootcamp - drools planner - use cases2010 04-20 san diego bootcamp - drools planner - use cases
2010 04-20 san diego bootcamp - drools planner - use casesGeoffrey De Smet
 

Mehr von Geoffrey De Smet (18)

Drools planner - 2012-10-23 IntelliFest 2012
Drools planner - 2012-10-23 IntelliFest 2012Drools planner - 2012-10-23 IntelliFest 2012
Drools planner - 2012-10-23 IntelliFest 2012
 
What is Drools, Guvnor and Planner? 2012 02-17 Brno Dev Conference
What is Drools, Guvnor and Planner? 2012 02-17 Brno Dev ConferenceWhat is Drools, Guvnor and Planner? 2012 02-17 Brno Dev Conference
What is Drools, Guvnor and Planner? 2012 02-17 Brno Dev Conference
 
2012 02-04 fosdem 2012 - drools planner
2012 02-04 fosdem 2012 - drools planner2012 02-04 fosdem 2012 - drools planner
2012 02-04 fosdem 2012 - drools planner
 
JUDCon London 2011 - Bin packing with drools planner by example
JUDCon London 2011 - Bin packing with drools planner by exampleJUDCon London 2011 - Bin packing with drools planner by example
JUDCon London 2011 - Bin packing with drools planner by example
 
Drools Planner webinar (2011-06-15): Drools Planner optimizes automated planning
Drools Planner webinar (2011-06-15): Drools Planner optimizes automated planningDrools Planner webinar (2011-06-15): Drools Planner optimizes automated planning
Drools Planner webinar (2011-06-15): Drools Planner optimizes automated planning
 
Applying CEP Drools Fusion - Drools jBPM Bootcamps 2011
Applying CEP Drools Fusion - Drools jBPM Bootcamps 2011Applying CEP Drools Fusion - Drools jBPM Bootcamps 2011
Applying CEP Drools Fusion - Drools jBPM Bootcamps 2011
 
Drools New York City workshop 2011
Drools New York City workshop 2011Drools New York City workshop 2011
Drools New York City workshop 2011
 
2011-03-29 London - Decision tables in depth (Michael Anstis)
2011-03-29 London - Decision tables in depth (Michael Anstis)2011-03-29 London - Decision tables in depth (Michael Anstis)
2011-03-29 London - Decision tables in depth (Michael Anstis)
 
2011-03-29 London - Why do I need the guvnor BRMS?
2011-03-29 London - Why do I need the guvnor BRMS?2011-03-29 London - Why do I need the guvnor BRMS?
2011-03-29 London - Why do I need the guvnor BRMS?
 
2011-03-09 London - Drools Planner in a nutshell
2011-03-09 London - Drools Planner in a nutshell2011-03-09 London - Drools Planner in a nutshell
2011-03-09 London - Drools Planner in a nutshell
 
2011-03-24 IDC - Adaptive and flexible processes (Mark Proctor)
2011-03-24 IDC - Adaptive and flexible processes (Mark Proctor)2011-03-24 IDC - Adaptive and flexible processes (Mark Proctor)
2011-03-24 IDC - Adaptive and flexible processes (Mark Proctor)
 
Open source and business rules
Open source and business rulesOpen source and business rules
Open source and business rules
 
st - demystifying complext event processing
st - demystifying complext event processingst - demystifying complext event processing
st - demystifying complext event processing
 
jBPM 5 (JUDCon 2010-10-08)
jBPM 5 (JUDCon 2010-10-08)jBPM 5 (JUDCon 2010-10-08)
jBPM 5 (JUDCon 2010-10-08)
 
Applying complex event processing (2010-10-11)
Applying complex event processing (2010-10-11)Applying complex event processing (2010-10-11)
Applying complex event processing (2010-10-11)
 
Towards unified knowledge management platform (rulefest 2010)
Towards unified knowledge management platform (rulefest 2010)Towards unified knowledge management platform (rulefest 2010)
Towards unified knowledge management platform (rulefest 2010)
 
2010 04-20 san diego bootcamp - drools planner - use cases
2010 04-20 san diego bootcamp - drools planner - use cases2010 04-20 san diego bootcamp - drools planner - use cases
2010 04-20 san diego bootcamp - drools planner - use cases
 
Drools BeJUG 2010
Drools BeJUG 2010Drools BeJUG 2010
Drools BeJUG 2010
 

Kürzlich hochgeladen

A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxAna-Maria Mihalceanu
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Accelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with PlatformlessAccelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with PlatformlessWSO2
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Mark Simos
 
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...BookNet Canada
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...Karmanjay Verma
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
Français Patch Tuesday - Avril
Français Patch Tuesday - AvrilFrançais Patch Tuesday - Avril
Français Patch Tuesday - AvrilIvanti
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Kuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorialKuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorialJoão Esperancinha
 
Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Karmanjay Verma
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsYoss Cohen
 

Kürzlich hochgeladen (20)

A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance Toolbox
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Accelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with PlatformlessAccelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with Platformless
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
 
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
Français Patch Tuesday - Avril
Français Patch Tuesday - AvrilFrançais Patch Tuesday - Avril
Français Patch Tuesday - Avril
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Kuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorialKuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorial
 
Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platforms
 

Developing applications with rules, workflow and event processing (it@cork 2010)

  • 1. ● The SkyNet funding bill is passed. ● The system goes online on August 4th, 1997. ● Human decisions are removed from strategic defense. ● SkyNet begins to learn at a geometric rate. ● It becomes self-aware at 2:14am Eastern time, August 29th ● In a panic, they try to pull the plug. ● And, Skynet fights back Mark Proctor Co-Creator Project Lead
  • 2. 2 Topics  Books  Community  History  Unified Concept  Declarative Domain Overview ● Declarative Programming ● Domain Overview ● The Future  Expert ● Quick Example ● Conditional Elements ● Truth Maintenance and Inference  Fusion  Decision Tables  Guvnor  What's new in 5.1
  • 3. 3 Books  Introduction to Expert Systems ● Peter Jackson  Expert Systems, Principles and Programming ● Joseph C. Giarratano and Gary D. Riley
  • 4. 4 Oh And There are Drools Books Too
  • 6. 6 Drools Research Network  http://www.jboss.org/drools/research-network.html ● 30+ Research related pages ● Many more as haven't updated
  • 7. 7 Community Collaboration  40% of Drools work now done in the community ● US Navy Healthcare ● OSDE (Argentina's largest healthcare organisation)
  • 8. 8 Standards  Part of the W3C RIF working group  Director in RuleML group
  • 9. 9 Sample Industries and Users  Investment ● Millennium Investment Group (MIG)  Logistics ● Fedex  Airline ● Sabre  Mortgage ● Franklin American  Healthcare ● OSDE
  • 10. 10 Boot Camps  San Francisco 2009 (40+ attendees) ● Sponsored by Third Pillar ● Sun, FAMC, OSDE, Kaseya, Fedex, TU Group, Intermountain Healthcare, Gap, Sony Pictures, Lockheed Martin, Kaiser, HP, Wells Fargo, US Navy Research, FOLIOfn, Boeing .....  San Diego 2010 (80+ attendess) ● Sponsored by US Navy ● 5 day event, with 2 days focus on the healthcare industry ● OSDE, AT&T, SAIC, US Navy Research, Kaiser, Clinica, Intermountain Healthcare, GE Healthcare, VA, Boeing, Nationwide ....
  • 11. 11 Communication  User and Dev mailing lists  IRC, Internet Relay Chat
  • 13. 13 It All Started Here Birth of CDSS Dendral Baobab Mycin Guidon Neomycin Teiresias Puff Emycin WM Sacon Centaur Wheeze Gravida Clot Oncocin 1970s 1980s
  • 14. 14 Because Not Everyone Is As Smart As He Is
  • 15. 15 Business Rules Engines OPS5 ART Clips Jess Drools 2 JRules 1980s 2010s Drools 3 1990s 2000s Drools 4 Drools 5
  • 16. 16 Drools History  Drools 2 ● Rete “like” XML Scripting language  Drools 3 ● Based on Clips functionality ● Iterative improves to JRules syntax with Clips functionality  Drools 4 ● More declarative ● Basic functional programming feature with “from” ● Basic Rule Flow ● Basic BRMS  Drools 5 ● Improved functional programming with 'accumulate' ● More Advanced Rule Flow integration ● Complex Event Process (Fusion) ● Temporal Comparators, Sliding Time Windows ● Production ready BRMS
  • 18. 18 Drools Modules Business Logic integration System Drools Guvnor Drools Fusion Drools Flow Drools Expert (Also Now Drools Planner)
  • 20. 20 Rules and processes loosely coupledtightly coupled specificgeneric Decision Services Process Rules SCOPE COUPLING ?
  • 22. 22 jBPM File file = new File (“.....”); // file to XML process definition ProcessDefinition processDefinition = ProcessDefinition.parseXmlString( IoUtils.FileToString( file ) ); ProcessInstance processInstance = new ProcessInstance(processDefinition); Jess Rete engine = new Rete(); FileReader file = new FileReader("myfile.clp"); Jesp parser = new Jesp(file, engine); parser.parse(false); Esper EPServiceProvider epService = EPServiceProviderManager.getDefaultProvider(); EPStatement countStmt = admin.createEPL( "...." ); countStmt.start(); Knowledge API
  • 23. 23 Drools Flow KnowledegBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBulider(); kbuilder.addResource( ResourceFactory.newClassPathResource( “myflow.bpmn2”, ResourceType.BPMN2 ); If ( kbuilder.hasErrors() ) { log.error( kbuilder.hasErrors().toString() ); } KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(); kbase.addKnowledgePackages( kbase.getKnowledgePackages() ); Knowledge API
  • 24. 24 Drools Expert KnowledegBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBulider(); kbuilder.addResource( ResourceFactory.newClassPathResource( “myrules.drl”, ResourceType.DRL ); If ( kbuilder.hasErrors() ) { log.error( kbuilder.hasErrors().toString() ); } KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(); kbase.addKnowledgePackages( kbase.getKnowledgePackages() ); Knowledge API
  • 25. 25 Drools Integration Deployment Descriptors <change-set> <add> <resource source='classpath:myapp/data/myflow.bpmn2' type='BPMN2' /> <resource source='http:myapp/data/myrules.drl' type='DRL' /> <resource source='classpath:data/IntegrationExampleTest.xls' type="DTABLE"> <decisiontable-conf input-type="XLS" worksheet-name="Tables_2" /> </resource> <add> </change-set> KnowledegBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBulider(); kbuilder.addResource( ResourceFactory.newFileResource( “changeset.xml”, ResourceType.ChangeSet ); Knowledge XML
  • 26. 26 <drools:kbase id="kbase1"> <drools:resource type="DRL" source="classpath:.../testSpring.drl"/> </drools:kbase> <drools:ksession id="ksession1" type="stateless" kbase="kbase1" /> <drools:ksession id="ksession2" type="stateful" kbase="kbase1"/> <camelContext id="camel"> <route> <from uri="cxfrs://bean://rsServer"/> <marshal ref="xstream"/> <to uri=”drools:ksession1” /> <unmarshal ref="xstream"/> </route> </camelContext> Declarative Services Spring XML and Camel
  • 29.
  • 31. 31 Self monitoring and adaptive declare ProcessStartedEvent @role( event ) end rule "Number of process instances above threshold" when Number( nbProcesses : intValue > 1000 ) from accumulate( e: ProcessStartedEvent( processInstance.processId == "com.sample.order.OrderProcess" ) over window:size(1h), count(e) ) then System.err.println( "WARNING: Nb of order processes in the last hour > 1000: " + nbProcesses ); end
  • 35. 35 Declarative Programming  Production Rule Systems PRD (forward chaining) ● Reactive ● when Alarm( status == “alert” ) then send( “warning” )  Logic Programming LP (backward chaining) ● Query ● descendant( “mary”, “jane”)  Functional Programming FP ● Map,Fold, Filter ● avg([12, 16, 4, 6]) ● Returns single value 9.5 ● round([10.3, 4.7, 7.8] ) ● Returns List [10, 5, 8]  Description Logic ● Person hasName String and livesAt Address
  • 36. 36 Declarative Programming  Production Rule Systems PRD (forward chaining FC) ● Drools 5.0, OPSJ ( hyrbid BC), ART( hyrbid BC)  Logic Programming LP (backward chaining BC) ● target : Prolog (POSL Position Slotted Language) ● Drools Trunk has a prototype Prolog like query backward chaining capabilities. Stronger Polog like capabilities planned. ● Opportunistic BC planned.  Functional Programming FP ● Lisp, Haskell ● Drools 5.0 has some functional capabilities ● Drools 5.1, 5.2 will be looking to have strong functional capabilities
  • 37. 37 Declarative Programming  Description Logic DL ● KIF, OWL-DL ● Planned, See “The Future”  Processes ● Drools 5.1 implements BPMN2 with advanced rule integration. ● Drools Flow will be incorporated into jBPM5
  • 41. 41 The Future  Full Hybrid Engine ● http://community.jboss.org/wiki/DroolsLanguageEnhancements ●Nested Objects ●Casting Nested Objects ●Positional Constraints ●POSL - Positional-Slotted Language ●Method Calls ●Maps and Arrays (Collections) ●Collections and XPath like filtering ●Free form Expressions ●Managed Object Graphs (MOGS) ●Nested Patterns and Queries ●Queries and Unification ●Ontologies and Relations via ●Query Based Backward Chaining with POSL ●Triples with Hybrid POJO Graph Notation. ●Escapes for Dialects ●Accumulate Improvements to Support Haskell map/fold/filter and MVEL projection/fold ● Otherwise ● Branch (Labelled Else) ● Rule Execution Groups ● Rule Dependency Meta-Rule Language ●Parallel Meta-Rule Language ● Field Versioning ●Logical Closures/OnFalse ●Opportunistic Backward Chaining, Lazy Field/Object Values ●...
  • 43. 43 Definitions public class Applicant { private String name; private int age; private boolean valid; // getter and setter methods here } rule "Is of valid age" when $a : Applicant( age < 18 ) then modify( $a ) { valid = false }; ends
  • 44. 44 Building KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); kbuilder.add( ResourceFactory .newClassPathResource( "licenseApplication.drl", getClass() ), ResourceType.DRL ); if ( kbuilder.hasErrors() ) { System.err.println( kbuilder.getErrors().toString() ); } kbase.addKnowledgePackages( kbuilder.getKnowledgePackages() );
  • 45. 45 Executing StatelessKnowledgeSession ksession = kbase.newStatelessKnowledgeSession(); Applicant applicant = new Applicant( "Mr John Smith", 16 ); assertTrue( applicant.isValid() ); ksession.execute( applicant ); assertFalse( applicant.isValid() ); rule "Is of valid age" when $a : Applicant( age < 18 ) then modify( $a ) { valid = false }; ends
  • 47. 47 Definitions public class Room { private String name // getter and setter methods here } public class Sprinkler { private Room room; private boolean on; // getter and setter methods here } public class Fire { private Room room; // getter and setter methods here } public class Alarm { }
  • 48. 48 Definitions rule "When there is a fire turn on the sprinkler" when Fire($room : room) $sprinkler : Sprinkler( room == $room, on == false ) then modify( $sprinkler ) { on = true }; println( "Turn on the sprinkler for room " + $room.name ); end rule "When the fire is gone turn off the sprinkler" when $room : Room( ) $sprinkler : Sprinkler( room == $room, on == true ) not Fire( room == $room ) then modify( $sprinkler ) { on = false }; println( "Turn off the sprinkler for room " + $room.name ); end
  • 49. 49 Definitions rule "Raise the alarm when we have one or more fires" when exists Fire() then insert( new Alarm() ); println( "Raise the alarm" ); end rule "Cancel the alarm when all the fires have gone" when not Fire() $alarm : Alarm() then retract( $alarm ); println( "Cancel the alarm" ); end
  • 50. 50 Definitions rule "Status output when things are ok" when not Alarm() not Sprinkler( on == true ) then println( "Everything is ok" ); end
  • 51. 51 Executing String[] names = new String[]{"kitchen", "bedroom", "office", "livingroom"}; Map<String,Room> name2room = new HashMap<String,Room>(); for( String name: names ){ Room room = new Room( name ); name2room.put( name, room ); ksession.insert( room ); Sprinkler sprinkler = new Sprinkler( room ); ksession.insert( sprinkler ); } ksession.fireAllRules() > Everything is ok
  • 52. 52 Executing Fire kitchenFire = new Fire( name2room.get( "kitchen" ) ); Fire officeFire = new Fire( name2room.get( "office" ) ); FactHandle kitchenFireHandle = ksession.insert( kitchenFire ); FactHandle officeFireHandle = ksession.insert( officeFire ); ksession.fireAllRules(); > Raise the alarm > Turn on the sprinkler for room kitchen > Turn on the sprinkler for room office
  • 53. 53 Executing ksession.retract( kitchenFireHandle ); ksession.retract( officeFireHandle ); ksession.fireAllRules() > Turn off the sprinkler for room office > Turn off the sprinkler for room kitchen > Cancel the alarm > Everything is ok rule "Status output when things are ok" when not Alarm() not Sprinkler( on == true ) then println( "Everything is ok" ); end
  • 55. 55 not Bus( color = “red” ) Conditional Elements exists Bus( color = “red” ) forall ( $bus : Bus( floors == 2 ) Bus( this == $bus, color == “red” ) ) forall ( $bus : Bus( color == “red” ) )
  • 56. 56 Accumulate CE rule "accumulate" when $sum : Number( intValue > 100 ) from accumulate( Bus( color == "red", $t : takings ) sum( $t ) ) then print "sum is “ + $sum; end
  • 57. 57 Accumulate CE Patterns and CE's can be chained with 'from' rule "collect" when $zipCode : ZipCode() $sum : Number( intValue > 100 ) from accumulate( Bus( color == "red", $t : takings ) from $hbn.getNamedQuery(“Find Buses”) .setParameters( [ “zipCode” : $zipCode ] ) .list(), sum( $t ) ) then print "sum is “ + $sum; end
  • 59. 59 Timers rule “name” timer 1m30s when $l : Light( status == “on” ) then modify( $l ) { status = “off” }; rule “name” timer (int: 1m30s 0) when $l : Light( status == “on” ) then modify( $l ) { status = “off” }; When the light is on, and has been on for 1m30s then turn it off Same as above. Interval timer with JDK semantics for initial duration, then repeat duration.
  • 60. 60 Timers rule “name” timer ( cron: 0 0/15 * * * * ) when Alarm( ) then sendEmail( ”Alert Alert Alert!!!” ) Field Name Mandatory? Allowed Values Allowed Special Characters Seconds YES 0-59 , - * / Minutes YES 0-59 , - * / Hours YES 0-23 , - * / Day of month YES 1-31 , - * ? / L W Month YES 1-12 or JAN-DEC , - * / Day of week YES 1-7 or SUN-SAT , - * ? / L # Year NO empty, 1970-2099 , - * / Send alert every quarter of an hour
  • 61. 61 Calendars rule "weekdays are high priority" calendars "weekday" timer (int:0 1h) when Alarm() then send( "priority high - we have an alarm” ); end rule "weekend are low priority" calendars "weekend" timer (int:0 4h) when Alarm() then send( "priority low - we have an alarm” ); end Execute now and after 1 hour duration Execute now and after 4 hour duration
  • 63. 63 D a te d a te d o u b le a m o u n t in t ty p e lo n g a c c o u n tN o C a s h flo w lo n g a c c o u n tN o d o u b le b a la n c e A c c o u n t D a te s ta r t D a te e n d A c c o u n tin g P e r io d Classes
  • 64. 64 Account accountNo balance 1 0 increase balance for AccountPeriod Credits select * from Account acc, Cashflow cf, AccountPeriod ap where acc.accountNo == cf.accountNo and cf.type == CREDIT cf.date >= ap.start and cf.date <= ap.end decrease balance for AccountPeriod Debits select * from Account acc, Cashflow cf, AccountPeriod ap where acc.accountNo == cf.accountNo and cf.type == DEBIT cf.date >= ap.start and cf.date <= ap.end AccountingPeriod start end 01-Jan-07 31-Mar-07 trigger : acc.balance += cf.amount trigger : acc.balance -= cf.amount Account accountNo balance 1 -25 Creating Views with Triggers date amount type 12-Jan-07 100 CREDIT 1 2-Feb-07 200 DEBIT 1 18-May-07 50 CREDIT 1 9-Mar-07 75 CREDIT 1 CashFlow accountNo CashFlow date amount type 12-Jan-07 100 CREDIT 9-Mar-07 75 CREDIT CashFlow date amount type 2-Feb-07 200 DEBIT
  • 65. 65 rule “increase balance for AccountPeriod Credits” when ap : AccountPeriod() acc : Account( $accountNo : accountNo ) CashFlow( type == CREDIT, accountNo == $accountNo, date >= ap.start && <= ap.end, $ammount : ammount ) then acc.balance += $amount; end select * from Account acc, Cashflow cf, AccountPeriod ap where acc.accountNo == cf.accountNo and cf.type == CREDIT cf.date >= ap.start and cf.date <= ap.end trigger : acc.balance += cf.amount Bringing it Together
  • 66. 66 rule “increase balance for AccountPeriod Credits” when ap : AccountPeriod() acc : Account( $accountNo : accountNo ) CashFlow( type == CREDIT, accountNo == $accountNo, date >= ap.start && <= ap.end, $ammount : ammount ) then acc.balance += $amount; end rule “decrease balance for AccountPeriod Debits” when ap : AccountPeriod() acc : Account( $accountNo : accountNo ) CashFlow( type == DEBIT, accountNo == $accountNo, date >= ap.start && <= ap.end, $ammount : ammount ) then acc.balance -= $amount; end Rules as a “view” date amount type 12-Jan-07 100 CREDIT 1 2-Feb-07 200 DEBIT 1 18-May-07 50 CREDIT 1 9-Mar-07 75 CREDIT 1 CashFlow accountNo CashFlow date amount type 12-Jan-07 100 CREDIT 9-Mar-07 75 CREDIT CashFlow date amount type 2-Feb-07 200 DEBIT AccountingPeriod start end 01-Jan-07 31-Mar-07 Account accountNo balance 1 0 Account accountNo balance 1 -25
  • 68. 68 TMS and Inference rule "Issue Child Bus Pass" when $p : Person( age < 16 ) then insert(new ChildBusPass( $p ) ); end rule "Issue Adult Bus Pass" when $p : Person( age >= 16 ) then insert(new AdultBusPass( $p ) ); end Couples the logic What happens when the Child stops being 16?
  • 69. 69 TMS and Inference  Bad ● Monolithic ● Leaky ● Brittle integrity - manual maintenance
  • 70. 70 TMS and Inference  A rule “logically” inserts an object  When the rule is no longer true, the object is retracted. when $p : Person( age < 16 ) then logicalInsert( new IsChild( $p ) ) end when $p : Person( age >= 16 ) then logicalInsert( new IsAdult( $p ) ) end de-couples the logic Maintains the truth by automatically retracting
  • 71. 71 TMS and Inference rule "Issue Child Bus Pass" when $p : Person( ) IsChild( person =$p ) then logicalInsert(new ChildBusPass( $p ) ); end rule "Issue Adult Bus Pass" when $p : Person( age >= 16 ) IsAdult( person =$p ) then logicalInsert(new AdultBusPass( $p ) ); end The truth maintenance cascades
  • 72. 72 TMS and Inference rule "Issue Child Bus Pass" when $p : Person( ) not( ChildBusPass( person == $p ) ) then requestChildBusPass( $p ); end The truth maintenance cascades
  • 73. 73 TMS and Inference  Good ● De-couple knowledge responsibilities ● Encapsulate knowledge ● Provide semantic abstractions for those encapsulation ● Integrity robustness – truth maintenance
  • 77. 77 Decision Table rule "Pricing bracket_10" when Driver(age >= 18, age <= 24, locationRiskProfile == "LOW", priorClaims == "1") policy: Policy(type == "COMPREHENSIVE") then policy.setBasePrice(450);
  • 79. 79 Drools Fusion: Enables...  Event Detection: ● From an event cloud or set of streams, select all the meaningful events, and only them.  [Temporal] Event Correlation: ● Ability to correlate events and facts declaring both temporal and non-temporal constraints between them. ● Ability to reason over event aggregation.  Event Sequencing: ● A → ( B OR C ) → D  Event Abstraction: ● Ability to compose complex events from atomic events AND reason over them
  • 80. 80 Drools Fusion: Features  Support to Event semantics: ● Usually immutable, but not enforced ● Strong temporal relationships ● Managed lifecycle ● Point-in-time and Interval events  Time semantics ● Discrete  Temporal relationships ● All 13 operators defined by James Allen (+ negations)
  • 81. 81 Drools Fusion: Temporal Reasoning P o i n t - P o i n t P o i n t - I n t e r v a l I n t e r v a l - I n t e r v a l A b e f o r e B A m e e t s B A o v e r la p s B A f in is h e s B A in c lu d e s B A s t a r t s B A c o in c id e s B A B A B A B A B A B A B A B
  • 82. 82 Drools Fusion: Temporal Reasoning P o i n t - P o i n t P o i n t - I n t e r v a l I n t e r v a l - I n t e r v a l A a f t e r B A m e t B y B A o v e r la p e d B y B A f in is h e d B y B A d u r in g B A f in is h e s B A B A B A B A B A B A B
  • 83. 83 $c : Custumer( type == “VIP ) $oe : BuyOrderEvent( customer == $c ) from entry-point “Home Broker Stream” not BuyAckEvent( relatedEvent == $oe.id, this after[1s, 10s] $oe ) from entry-point “Stock Trader Stream” Operators Existing Drools 'not' Conditional Elements can be used to detect non- occurrence of events BackAckEvent must occur between 1s and 10s 'after' BuyOrderEvent
  • 84. 84 Aggregations Rule Engines do not deal with aggregations $n : Number( intValue > 100 ) from accumulate( $s : StockTicker( symbol == “RHAT” ) over window:time( 5s ), average( $s.price ) ) Over 5 seconds Aggregate ticker price for RHAT over last 5 seconds The pattern 'Number' reasons 'from' the accumulate result
  • 86. 86 Guvnor  Technology ● JCR (JSR-170) backend ● Seam + GWT frontend ● WebDav ● Eclipse synchronisation plugin ● Role based security  Authoring ● Decision Tables ● Guided Editor ● Rule Templates ● Sentence Templates (DSLs) ● Declared Types  QA ● Scenario Testing ● Rule Verification
  • 95. 95 What's new to 5.1  Integration ● OSGi ready ● Spring ● Camel ● JMX/JOPR integration  Expert ● New Rete Algorithm “differential update” ● Timers and Calendars ● Live Open Querries ●  Flow ● BPMN2
  • 96. 96 Differential Update  Differential Update (a.k.a. “true modify”) ● Implements a real “modify/update” operation, instead of retract+assert. ● Reuses tuples, reduces GC stress, improves performance
  • 97. 97 What's new to 5.1  Guvnor ● Guided editor ● Nested Expression builder ● person.dogs[0].name ● Move constrains up and down ● Insert constraints ● Support for more DRL elements ● RSS Subcription, change notifications, inbox ● Working Sets ● Object constraint definitions ● Rule Templates (based on Guided Editor) ● Oryx BPM editor integration ● Better rule documentation support
  • 99. 99 Drools flow in Eclipse
  • 100. 100 Questions?Questions? • Dave Bowman: All right, HAL; I'll go in through the emergency airlock. • HAL: Without your space helmet, Dave, you're going to find that rather difficult. • Dave Bowman: HAL, I won't argue with you anymore! Open the doors! • HAL: Dave, this conversation can serve no purpose anymore. Goodbye. Joshua: Greetings, Professor Falken. Stephen Falken: Hello, Joshua. Joshua: A strange game. The only winning move is not to play. How about a nice game of chess?