Bug 724206 (BRMS-149) - Prefix 'and' and infix 'and' not interchangeable
Summary: Prefix 'and' and infix 'and' not interchangeable
Keywords:
Status: CLOSED NEXTRELEASE
Alias: BRMS-149
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: unspecified
Version: unspecified
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: ---
: 5.0.1
Assignee: Edson Tirelli
QA Contact:
URL: http://jira.jboss.org/jira/browse/BRM...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-07-07 12:15 UTC by nwallace
Modified: 2009-10-05 07:08 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-01 12:15:54 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker BRMS-149 0 None None None Never

Description nwallace 2009-07-07 12:15:50 UTC
Date of First Response: 2009-09-10 00:18:06
Workaround Description: use double () when using not with infix CEs:

either:

not( A() and B() )

or:

not( (and A() B() ) )

securitylevel_name: Public

The documentation on the 'and' Conditional Element seems to imply that these constructs are equivalent:

		$p1:Entity($code1:code)
		not (and
			$p2:Entity(code == $code1)
			 eval(MyStaticClass.match($p1, $p2))
		)

		$p1:Entity($code1:code)
		not (
			$p2:Entity(code == $code1)
			and eval(MyStaticClass.match($p1, $p2))
		)

Actually, the first version crashes with this message:

unknown:93:7 Unexpected token 'and'[96,2]: unknown:96:2 mismatched token: [@792,3685:3685=')',<12>,96:2]; expecting type THEN

I'm on drools 4.0.2 and mvel14-1.2.8.

Comment 1 nwallace 2009-07-07 12:17:00 UTC
Link: Added: This issue is related to JBRULES-1422


Comment 2 nwallace 2009-07-07 12:17:39 UTC
Link: Added: This issue related JBRULES-1422


Comment 3 nwallace 2009-07-07 12:18:29 UTC
Link: Removed: This issue related JBRULES-1422 


Comment 4 nwallace 2009-09-01 12:15:54 UTC
Fix in place.

Comment 5 David Le Sage 2009-09-10 04:18:06 UTC
For the errata in the release notes, we require details of:


1.  the FIX (what was changed in the new parser to eliminate this bug).


Dot points will be fine.

Comment 6 David Le Sage 2009-09-23 05:23:11 UTC
We are still awaiting the outstanding information for the Release Notes on this one.  Please provide it as soon as possible. Thanks.

Comment 7 Edson Tirelli 2009-09-24 14:33:34 UTC
The FIX (what was changed to eliminate this bug) and
 * The language grammar used by the new parser was changed to not require double () when using prefix conditional elements.



Comment 8 Dana Mison 2009-10-05 07:08:44 UTC
added as resolved to the 5.0.CP01 release notes:

JBRULES-1422
Conditions using prefix conditional elements would not compile unless they were enclosed by parentheses. The grammar parser has been updated to remove this limitation.


Note You need to log in before you can comment on or make changes to this bug.