[jboss-jira] [JBoss JIRA] (JBRULES-3506) KnowledgeAgent is not detecting changes of a function defined in a package

Mario Fusco (JIRA) jira-events at lists.jboss.org
Tue Sep 25 12:23:43 EDT 2012


     [ https://issues.jboss.org/browse/JBRULES-3506?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mario Fusco reassigned JBRULES-3506:
------------------------------------

    Assignee: Mario Fusco  (was: Mark Proctor)

    
> KnowledgeAgent is not detecting changes of a function defined in a package
> --------------------------------------------------------------------------
>
>                 Key: JBRULES-3506
>                 URL: https://issues.jboss.org/browse/JBRULES-3506
>             Project: Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: drools-core
>    Affects Versions: 5.4.0.Final
>            Reporter: Elisabeth Wirth
>            Assignee: Mario Fusco
>
> I have a pkg containing a function and I am checking, if there are any changes in my pkg by using the KnowledgeAgent.
> Now I have the problem, that changes of the function are not recognized.
> In the log I see the following entry:
> KnowledgeAgent: impossible to add a map for a null resource! skiping.
> I have analyzed the code of KnowledgeAgentImpl and found the reason for the problem:
> in the method createPackageFromResource(Resource resource, KnowledgeBuilder kbuilder) in KnowledgeAgentImpl
> the mapping for functions is missing.
> I have added the following code and everything works as expected:
>                 for( KnowledgePackage kpkg : kpkgs ) {
>                     for ( Rule rule : ((KnowledgePackageImp)kpkg).pkg.getRules() ) {
>                         rule.setResource( resource );
>                     } ....
>                     // added
>                     for ( Function function : ((KnowledgePackageImp)kpkg).pkg.getFunctions().values() ) {
>                     	function.setResource( resource );
>                     }
>                 }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list