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

org.drools.examples.LogicalAssertionsNotPingPong.drl Maven / Gradle / Ivy

The newest version!
package org.drools.test;

import java.lang.String;
import java.lang.Integer;
import java.util.List;

global java.lang.Integer i;
global java.lang.String s;
global java.util.List l;

rule "not s then i"
    when
        not String()
    then
    	if (l.size() < 10) {
    		l.add(new Integer(0));
    		System.out.println("Logical assert i");
	   		insertLogical(i);
	   	}
end
rule "i then s"
	when
		Integer()
	then
    	if (l.size() < 10) {
	   		l.add(new Integer(0));
    		System.out.println("Logical assert s");	   		
			insertLogical(s);
	   	}
end




© 2015 - 2025 Weber Informatics LLC | Privacy Policy