Re: [rules-users] How do I write a rule to detect a missing value in a group of facts?

2012-02-09 Thread Wolfgang Laun
T > * To: *Rules Users List > * Subject: *Re: [rules-users] How do I write a rule to detect a missing > value in a group of facts? > > Don't think procedurally, just write the *rule* for a missing post ;-) > > rule "missing fence post" > when > FencePos

Re: [rules-users] How do I write a rule to detect a missing value in a group of facts?

2012-02-09 Thread GPatel
: [rules-users] How do I write a rule to detect a missing value in a group of facts? Don't think procedurally, just write the *rule* for a missing post ;-) rule "missing fence post" when FencePost( $d: distanceFromStart ) FencePost( distanceFromStart == $d + 2*FencePos

Re: [rules-users] How do I write a rule to detect a missing value in a group of facts?

2012-02-09 Thread Wolfgang Laun
Don't think procedurally, just write the *rule* for a missing post ;-) rule "missing fence post" when FencePost( $d: distanceFromStart ) FencePost( distanceFromStart == $d + 2*FencePost.GAP ) not FencePost( distanceFromStart == $d + FencePost.GAP ) then System.out.println( "Missing

[rules-users] How do I write a rule to detect a missing value in a group of facts?

2012-02-09 Thread mikeg
I need to write a rule to identify a missing element in a group of facts. For example, let us say I want to ensure that my fence has a fence post every 8 feet. My fact declaration is as follows: declare FencePost identifier : String distanceFromStart: Long end If I add the following facts