[jboss-jira] [JBoss JIRA] (DROOLS-2183) Can't configure KieSession used in RuleUnitExecutor

Duncan Doyle (JIRA) issues at jboss.org
Fri Dec 15 11:10:00 EST 2017


Duncan Doyle created DROOLS-2183:
------------------------------------

             Summary: Can't configure KieSession used in RuleUnitExecutor
                 Key: DROOLS-2183
                 URL: https://issues.jboss.org/browse/DROOLS-2183
             Project: Drools
          Issue Type: Bug
          Components: core engine
    Affects Versions: 7.5.0.Final
         Environment: macOS 10.12.6, Oracle Hotspot 1.8.0_151
            Reporter: Duncan Doyle
            Assignee: Mario Fusco


To support CEP using RuleUnits, we need to be able to configure a session that uses the PseudoClock (a best practice when using deterministic CEP rule execution). However, in the current implementation, the KieSession configuration in kmodule.xml is discarded. Second, there is not a nice way in the current API to pass session configuration programmatically.

A reproducer of the problem can be found here (sorry for not cleaning it up nicely. It basically tries to set the SessionClock as fact into WorkingMemory, and at that time trying to cast to SessionPseudoClock.): https://github.com/DuncanDoyle/rule-unit-and-session-conf

Just run "mvn clean test" on that project.

As discussed on IRC, we agreed that the proper way of doing this would be to make the RuleUnitExecutor a container resource and allow it to use session configuration defined in kmodule.xml (also from a KIE-Server perspective).



--
This message was sent by Atlassian JIRA
(v7.5.0#75005)


More information about the jboss-jira mailing list