Drools for ECA/Reaction Rules having AND, SEQ, OR in Condition -


it seems, drools quite prominent around here, thought i'd ask:

can drools rules used event pattern detection?
patterns of from: "event_x" seq/and/or "event_z". example below indicates desired usage. events identified using known id.

rule "rule x" when event1 seq/and/or event2 system.out.println("event1 seq/and/or event2"); 

yes. "and" , "or" used directly conditional elements:

rule x when event1() , event2() ... rule y when event3() or event4() 

they can combined, nested, etc... check drools documentation details.

up drools 5.4, sequencies defined using temporal operators "before","after", etc. instance:

rule z when $e1 : event1() , $e2 : event2( after $e1 ) ... 

for drools 5.5, several flavors of sequence conditional elements planned:

rule w when event1() -> event2() ... 

where -> followed operator, => strictly followed by, etc.

details:

https://community.jboss.org/wiki/eventsequencing#4_definition_sequence_conditional_elements


Comments

Popular posts from this blog

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

php - Get uncommon values from two or more arrays -

Adding duplicate array rows in Php -