All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sample.reference.drl Maven / Gradle / Ivy

There is a newer version: 10.0.0
Show newest version
package com.sample
 
import com.sample.DroolsMain.Bar;
import com.sample.DroolsMain.Foo;
import java.util.concurrent.atomic.AtomicInteger;

global AtomicInteger barCount;
global AtomicInteger fooCount;
 
rule "DuplicateBars"
	dialect "java"
	when
		f1 : Foo( bar != null )
		f2 : Foo( this != f1, bar != null, bar == f1.bar )
	then
		barCount.incrementAndGet(); 
end
 
rule "DuplicateFoos"
	dialect "java"
	when
		b1 : Bar( foo != null )
		b2 : Bar( this != b1, foo != null, foo == b1.foo )
	then
		fooCount.incrementAndGet();
end




© 2015 - 2025 Weber Informatics LLC | Privacy Policy