List Info

Thread: Created: (JBRULES-1603) Creating a multiline DSL with first line variable




Created: (JBRULES-1603) Creating a multiline DSL with first line variable
country flaguser name
United States
2008-05-14 10:01:26
Creating a multiline DSL with first line variable containing
() causes source to be corrupt
------------------------------------------------------------
-------------------------------

                 Key: JBRULES-1603
                 URL: http:/
/jira.jboss.com/jira/browse/JBRULES-1603
             Project: JBoss Drools
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: drools-brms
    Affects Versions: 4.0.7
         Environment: Solaris 10, Glassfish
            Reporter: Richard Ambridge
         Assigned To: Mark Proctor
            Priority: Minor


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)



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: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atl
assian.com/software/jira

        
_______________________________________________
jboss-jira mailing list
jboss-jiralists.jboss.org
h
ttps://lists.jboss.org/mailman/listinfo/jboss-jira

Updated: (JBRULES-1603) Creating a multiline DSL with first line variable
country flaguser name
United States
2008-05-14 10:03:26
     [ http://jira.jboss.com/jira/browse/JBRULES-1603?page=all ]

Richard Ambridge updated JBRULES-1603:
--------------------------------------

    Description: 
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 =MessageObj(extraField1 matches
"")
[when]- and this =extraField2 matches
""
[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.

  was:
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)



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.


Forgot the DSL

> Creating a multiline DSL with first line variable
containing () causes source to be corrupt
>
------------------------------------------------------------
-------------------------------
>
>                 Key: JBRULES-1603
>                 URL: http:/
/jira.jboss.com/jira/browse/JBRULES-1603
>             Project: JBoss Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: drools-brms
>    Affects Versions: 4.0.7
>         Environment: Solaris 10, Glassfish
>            Reporter: Richard Ambridge
>         Assigned To: Mark Proctor
>            Priority: Minor
>
> 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 =MessageObj(extraField1 matches
"")
> [when]- and this =extraField2 matches
""
> [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: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atl
assian.com/software/jira

        
_______________________________________________
jboss-jira mailing list
jboss-jiralists.jboss.org
h
ttps://lists.jboss.org/mailman/listinfo/jboss-jira

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )