]
Mario Fusco resolved JBRULES-3506.
----------------------------------
Resolution: Cannot Reproduce Bug
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: