[jboss-jira] [JBoss JIRA] Updated: (JBRULES-1603) Creating a multiline DSL with first line variable containing () causes source to be corrupt

Mark Proctor (JIRA) jira-events at lists.jboss.org
Thu Jul 22 17:40:55 EDT 2010


     [ https://jira.jboss.org/browse/JBRULES-1603?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Proctor updated JBRULES-1603:
----------------------------------

    Fix Version/s: 5.2.0.M1
                       (was: 5.1.0.CR1)


> Creating a multiline DSL with first line variable containing () causes source to be corrupt
> -------------------------------------------------------------------------------------------
>
>                 Key: JBRULES-1603
>                 URL: https://jira.jboss.org/browse/JBRULES-1603
>             Project: Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: drools-guvnor
>    Affects Versions: 4.0.7
>         Environment: Solaris 10, Glassfish
>            Reporter: Richard Ambridge
>            Assignee: Edson Tirelli
>            Priority: Minor
>             Fix For: 5.2.0.M1
>
>
> Using drools-jbrms,  create a new package, and add an Model,
> Then create a DSL as follows:  (change MessageObj to any object that exists in your Model, and extraField1,2 to items in that object)
> [when]Line 1 {val1}=MessageObj(extraField1 matches "{val1}")
> [when]- and this {val2}=extraField2 matches "{val2}"
> [then]Action=System.out.println("Hi");
> Then create new Rule, Business Guided
> Add a When,  select the 'Line 1' option
> Add another when, select the 'and this' option
> Add a Then, select the 'Action'
> Click validate..  it should pass.
> Next change the variable for 'and this' from 'val2'   to  'val(2|3)'
> Click validate, it should pass
> Next change the variable for 'Line 1' from 'val' to 'val(1|2)'
> Click validate, It will fail 
> 	unknown:4:64 mismatched token: [@18,102:104='val',<7>,4:64]; expecting type RIGHT_PAREN
> 	unknown:4:68 mismatched token: [@20,106:106='2',<25>,4:68]; expecting type RIGHT_PAREN
> Click view source and you will see:
> rule "TestRule"
> 	dialect "mvel"
> 	when
> 	MessageObj( extraField1 matches "val(1|2, extraField2 matches "val(2|3)" )")
> 	then
> 	System.out.println("Hi");
> end
> Notice, the 1|2 is not terminated correctly.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list