I have a set of externally defined java beans that are
utilized elsewhere in the overarching application, and would like to declare
these external classes as events within drools. I am able declare these objects
as events, and compile a drools DRL file, and execute the rules. When the
same DRL is imported into the Guvnor, the resulting package “PKG” issues
an “unable to define Type Declaration class {object}” exception
error. Preliminary investigation has turned up JIRA #’s GUVNOR-379
<https://jira.jboss.org/jira/browse/GUVNOR-379>, and BRMS-144 <https://jira.jboss.org/jira/browse/BRMS-144>,
that indicate this behavior has been identified, but no solution is
presented. The Drools documentation for both the expert and fusion
component functionality indicates that metadata can be declared with or without
actually declaring fields. This capability is key to allowing the utilization
of externally defined data model objects within drools.
Example DRL declaration section that works as specified when
the DRL file is built into a knowledge base, but does not work when the Guvnor
package is built in to a knowledge base. I am currently utilizing Drools 5.0.1
in both the IDE development environment as well as the Guvnor deployment
environment.
begin data model fragment …
Import com.datamodel.MyEvent;
Declare MyEvent
@role(event)
@timestamp(eventDate)
end
… end data model fragment
Seems that the data model definition shown above should produce
the same results whether using the DRL resource type, or the PKG resource
produced by the Guvnor package builder. Are these JIRA’s closed in 5.1
or are they still pending. The system utilizing the Guvnor should allow
deployment of DRLs to the GUVNOR without change, this bug does not allow that.
David A. Meyer
System
Engineer
I&SS
Mission Operations - Colorado
Boeing
Defense, Space & Security
The
Boeing Company
Telephone
303-307-5836