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

org.drools.verifier.redundancy.Consequence.drl Maven / Gradle / Ivy

There is a newer version: 9.44.0.Final
Show newest version
#created on: 29.11.2007
package org.drools.verifier.redundancy.consequences

#list any import classes here.
import org.drools.verifier.components.TextConsequence;
import org.drools.verifier.report.components.Redundancy;
import org.drools.verifier.report.components.RedundancyType;

#declare any global variables here



#
# Dependencies: None
#
rule "Find redundant TextConsequences"
	when
		# Check that VerifierRule $left and $right have redundant fields.
		$left :TextConsequence()
		$right :TextConsequence(
			id != $left.id,
			text == $left.text
		)

		# Check that there is not already a pair with these values.
		not Redundancy(
			left == $left,
			right == $right
		)
	then
		insert( new Redundancy( RedundancyType.STRONG, $left, $right ) );
end




© 2015 - 2025 Weber Informatics LLC | Privacy Policy