tkobayas opened a new issue, #7211:
URL: https://github.com/apache/incubator-kie/issues/7211

   ## Description
   
   In the executable model, a DRL `@role(FACT)` declaration does not override a 
Java class annotated with `@Role(Role.Type.EVENT)`. The classic compiler 
correctly applies the DRL override after [PR 
#7186](https://github.com/apache/incubator-kie/pull/7186).
   
   ## Reproduction
   
   Java class:
   ```java
   @Role(Role.Type.EVENT)
   public class MyEvent { }
   ```
   
   DRL:
   ```drl
   declare MyEvent
     @role(FACT)
   end
   ```
   
   Inspect `TypeDeclaration`:
   - Classic compiler: `role = FACT` (correct — DRL overrides Java)
   - Executable model: `role = EVENT` (incorrect — Java annotation wins)
   
   ## Context
   
   Discovered during 
[#7185](https://github.com/apache/incubator-kie/issues/7185) work. 
`testRoleExplicitOverride` in `AlignAnnotationTest` is currently limited to 
`parametersStandardOnly` to work around this.
   
   ## Expected behavior
   
   DRL `@role(FACT)` should override Java `@Role(EVENT)` in both classic and 
executable models.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to