gpadbidri opened a new issue, #6318:
URL: https://github.com/apache/incubator-kie-drools/issues/6318

   We’re using Drools with Spring Boot and encountering an "Unexpected Global" 
exception under inconsistent conditions.
   
   The same rule behaves differently across different inputs — it works for 
some executions and fails with this exception for others. We're unable to 
identify a consistent pattern for when the global is accepted vs when it's 
rejected.
   
   Environment:
   
   Drools version: 8.41.0.Final
   
   Spring Boot version: (please include if known)
   
   Maven dependency:
   <dependency>
       <groupId>org.drools</groupId>
       <artifactId>drools-mvel</artifactId>
       <version>8.41.0.Final</version>
   </dependency>
   
   Symptoms:
   
   We dynamically assign globals before inserting facts and firing rules.
   Example code:
   `references.forEach((key, value) -> {
       try {
           session.setGlobal(key, value);
       } catch (Exception e) {
           log.error("Failed to set global: {}", key, e);
       }
   });
   `
   The error only occurs for some executions, even when using the same rule and 
same code path.
   
   Question:
   What could cause a global to be accepted in some cases and throw Unexpected 
Global in others? Could it be due to rule compilation caching, or something in 
how the session or globals are initialized?


-- 
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