Bug 973264 - Star import does not work with DRL declared facts
Summary: Star import does not work with DRL declared facts
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: BRE
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ER2
: 6.0.0
Assignee: Mario Fusco
QA Contact: Marek Winkler
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-11 15:01 UTC by Marek Winkler
Modified: 2014-08-06 20:17 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-08-06 20:17:19 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Marek Winkler 2013-06-11 15:01:28 UTC
Description of problem:

Given the following DRL:

package org.drools.compiler.integrationtests

import org.drools.compiler.integrationtests.facts.*

declare TestEvent
    @role(event)
end

rule "SendEvent"
	when
		$event : TestEvent()
	then
        // rule fired
end

When an instance of TestEvent is inserted into KieSession and then fireAllRules() called, the rule does not fire.

If the import statement is changed to the following

import org.drools.compiler.integrationtests.facts.TestEvent

the rule fires as expected.

The problem is not present when using old API (KnowledgeBase), so this is a regression.

The tricky part is, that no error is reported, the engine just behaves as if the fact declared in DRL and the fact imported from Java were two different facts.

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

BRMS 6.0.0 DR5
Drools 6.0.0.Beta3
Drools 6.0.0-SNAPSHOT

How reproducible:

Run the StarImportTest from attached pull request (will add reference to the pull request shortly).

Actual results:

The rule does not fire.

Expected results:

The rule fires.

Comment 1 Marek Winkler 2013-06-11 15:04:13 UTC
Pull request with reproducer: https://github.com/droolsjbpm/drools/pull/213

Comment 2 Mario Fusco 2013-07-25 11:58:34 UTC
Fixed on CR2.

Comment 3 Marek Winkler 2013-09-02 09:09:10 UTC
Verified on BRMS 6.0.0-ER2.


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