This test fails because IsNotDefinedExpression doesn't handle negation.
ExistsField.createParsedCondition handles only notPattern (But we need to decide whether notPattern or negate based on the parent condition)
Even if negate == true, PrototypePatternDefImpl.evaluateConstraint always returns false when a value is UNDEFINED_VALUE regardless of operator. We would need special handling?
ReteDumper:
[EntryPointNode(1) EntryPoint::DEFAULT ] on Partition(MAIN)
[ObjectTypeNode(3)::EntryPoint::DEFAULT objectType=[PrototypeObjectType template=DROOLS_PROTOTYPE] expiration=-1ms ] on Partition(MAIN)
[AlphaNode(4) constraint=[Constraint for 'expr:ThisPrototypeFieldValue:EXISTS_FIELD:ExtractorPrototypeExpression{ExtractorNode [values=[IdentifierNode [value=meta]]]}' (index: null), ]] on Partition(1) d -1 i -1
[AlphaNode(5) constraint=[Constraint for 'expr:ThisPrototypeFieldValue:EXISTS_FIELD:ExtractorPrototypeExpression{ExtractorNode [values=[IdentifierNode [value=meta], IdentifierNode [value=headers], IdentifierNode [value=token]]]}' (index: null), ]] on Partition(1) d -1 i -1
[AlphaTerminalNode(6)] on Partition(1) Ld 0 Li 0
[RuleTerminalNode(7): rule=r1] on Partition(1) d -1 i -1
[ObjectTypeNode(2)::EntryPoint::DEFAULT objectType=[ClassObjectType class=org.drools.base.reteoo.InitialFactImpl] expiration=-1ms ] on Partition(MAIN)
This test fails because IsNotDefinedExpression doesn't handle negation.
ExistsField.createParsedCondition
handles onlynotPattern
(But we need to decide whethernotPattern
ornegate
based on the parent condition)PrototypePatternDefImpl.evaluateConstraint
always returns false when a value isUNDEFINED_VALUE
regardless ofoperator
. We would need special handling?ReteDumper: