Bug 1309020 - KIE-Spring: listeners on KieSession not called when batch is used
KIE-Spring: listeners on KieSession not called when batch is used
Status: NEW
Product: JBoss BRMS Platform 6
Classification: JBoss
Component: BRE (Show other bugs)
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: Edson Tirelli
Marek Winkler
Depends On:
  Show dependency treegraph
Reported: 2016-02-16 12:32 EST by Marek Winkler
Modified: 2016-02-16 12:41 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Marek Winkler 2016-02-16 12:32:03 EST
Description of problem:
When using the following configuration in Spring context, the listener is not called when the rule triggered by the batch fires:

  <kie:ksession name="ksession1">
    <kie:ruleRuntimeEventListener ref="mock-wm-listener"/>
      <kie:insert-object ref="person"/>

The listener is triggered when a fact is inserted into the KieSession and fireAllRules() called in the test code (not in the batch).

The fact seems to be inserted into WM and rules fire when the batch is used. This leads to a suggestion that kie-spring might register listeners after it executes the batch (but I have not verified it).

Please see PR with unit test for details.

Version-Release number of selected component (if applicable):
BRMS 6.2.1

How reproducible:

Steps to Reproduce:
1. run org.kie.spring.KieSpringListenersBatchTest

Actual results:
The test fails.

Expected results:
The test succeeds.
Comment 1 Marek Winkler 2016-02-16 12:36:16 EST
PR with reproducer: https://github.com/droolsjbpm/droolsjbpm-integration/pull/305

Note You need to log in before you can comment on or make changes to this bug.