As an alternative that avoids the unnecessary counting of FeV1,
consider adding a helper fact type and a couple of (DRL) rules.
declare Existence
value: boolean
end
rule not2exists
when
exists FeV1()
$e: Existence( value == false )
then
modify( $e ){ setValue( true ) }
end
rule exists2not
when
not FeV1()
$e: Existence( value == true )
then
modify( $e ){ setValue( false ) }
end
Insert one Existence fact. The decitions table condition should be self-evident.
-W
On 21/06/2012, Wolfgang Laun <wolfgang.laun(a)gmail.com> wrote:
n:Number((n.intValue()>0)==$param) from accumulate( FeV1(),
count(1) )
-W
On 20/06/2012, Hrumph <Herman.Post(a)imail.org> wrote:
> Hi. I'm trying to figure out how to express a Condition that does the
> following:
>
> Column name: FeV1 exists
> Possible values: true, false, n/a
>
> I wish to test for the existence of an FeV1 fact and have a different
> condition in the rule generated, as follows:
>
> true, generates 'exists FeV1()'
> false, generates 'not FeV1()'
> n/a, generates nothing
>
> Is there some way to do this?
>
> Thanks,
>
> Herm
>
>
>
> --
> View this message in context:
>
http://drools.46999.n3.nabble.com/Decision-Table-column-testing-for-exist...
> Sent from the Drools: User forum mailing list archive at
Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/rules-users
>