[jboss-jira] [JBoss JIRA] Resolved: (JBRULES-3143) Knowledge Agent does not handle multiple packages in Builder output from single resource
Edson Tirelli (JIRA)
jira-events at lists.jboss.org
Mon Jul 25 08:37:24 EDT 2011
[ https://issues.jboss.org/browse/JBRULES-3143?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Edson Tirelli resolved JBRULES-3143.
------------------------------------
Resolution: Done
Closing the ticket as it seems it is working. Wolfgang's latest e-mail:
==========
My last pull from upstream and recompile was done
2011-07-22 17:56 drools-compiler-5.3.0-SNAPSHOT.jar
and I did see some changes in KBuilder and KAgent - I vividly recall being curious about the fix and going through the latter (git show) and seeing that multiple packages were passed from KB into KA's code. It seems that I did this immediately after seeing Edson's mail announcing the resolution and close of 3143. (I suppose the JIRA update was done *after* updating the central repository.)
Now I pull again and, once more, I see changes in PackageBuilder and KAImp. After compiling and rerunning the tests I can confirm that this test is OK now.
> Knowledge Agent does not handle multiple packages in Builder output from single resource
> ----------------------------------------------------------------------------------------
>
> Key: JBRULES-3143
> URL: https://issues.jboss.org/browse/JBRULES-3143
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: drools-core (expert)
> Affects Versions: 5.2.0.Final
> Reporter: Wolfgang Laun
> Assignee: Edson Tirelli
> Priority: Blocker
> Fix For: 5.2.1.Final, 5.3.0.Beta1
>
>
> Note: see also https://issues.jboss.org/browse/JBRULES-2940
> KnowledgeAgent with a ChecngeSet containing a single DRL:
> package x
> import y.Type
> declare Type
> @role(event)
> end
> //...rules etc.
> If this is passed to the builder, it'll return two KnowledgePackageImpl objects, one with name 'x' and another one with name 'y'. But the KA only takes the first package from the Collection of packages returned by the builder.
> =!=> KA must process all packages from the builder.
> =!=> Incremental kBase building requires diff-ing between old/new packages. This, then, must take into account that contribution to one package can come from several resource builds.
> =!=> The idea that the kBuilder should return packages with different names from a single DRL build is probably wrong. If a Drools package foo contains an import bar.Type, then this is still an asset in package foo and needs to be handled as a type reference in foo. Any annotation additions must be carried by that asset foo. (The *Java* package of the imported bar.Type remains of course bar.)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list