[
https://issues.jboss.org/browse/DROOLS-1249?page=com.atlassian.jira.plugi...
]
Edson Tirelli closed DROOLS-1249.
---------------------------------
Resolution: Rejected
Tibor, this is working as intended.
DSL mappings are applied in the order they are defined, so it is mandatory to place more
specific mappings in the grammar before more general ones. The documentation contains the
following node:
"The order of the entries in the DSL is important if separate DSL expressions are
intended to match the same line, one after the other."
DSL rule doesn't compile when DSL contains more general pattern
defined before more specific pattern.
-----------------------------------------------------------------------------------------------------
Key: DROOLS-1249
URL:
https://issues.jboss.org/browse/DROOLS-1249
Project: Drools
Issue Type: Bug
Components: core engine
Affects Versions: 6.4.0.Final
Reporter: Tibor Zimányi
Assignee: Mario Fusco
Priority: Minor
When using DSL where more general pattern is defined sooner than more complex pattern,
e.g. this:
[when]There is a number with=i:Integer()
[when]There is a number with value of {value}=i:Integer(intValue() == {value})
DSL rule fails to compile with error like this:
[ERR 102] Line 4:20 mismatched input 'of' in rule "sample rule"
Used DSL rule:
package org.test
rule 'sample rule'
when There is a number with value of 10
then end
I will make a PR with reproducer for this.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)