Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-2183

Can't configure KieSession used in RuleUnitExecutor

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • None
    • 7.5.0.Final
    • core engine

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

              mfusco@redhat.com Mario Fusco
              rhn-gps-ddoyle Duncan Doyle (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: