[rules-users] Extending objects in declared facts

J Michael Dean mdean77 at comcast.net
Sat Feb 21 15:30:47 EST 2009


When a fact is declared with propertyChangeSupport in Guvnor, such as  
following:

declare Hemodynamics
	@propertyChangeSupport
	systolicBP: Integer
	diastolicBP: Integer
	centralVenousP: Integer
	wedgeP: Integer
	status: Boolean
	alive: Boolean
end

then the following warning shows up in JBoss console:

  Warning: Method addPropertyChangeListener not found on the class  
class makeModelTest.Hemodynamics so Drools will be unable to process  
JavaBean PropertyChangeEvents on the asserted Object

I implement property changes in a model object so would like to be  
able to say something like:

declare Hemodynamics extends ModelObject
	@propertyChangeSupport
	systolicBP: Integer
	diastolicBP: Integer
	centralVenousP: Integer
	wedgeP: Integer
	status: Boolean
	alive: Boolean
end

The documentation refers to using Guvnor and declarative facts to  
extend an object that already exists, but not clear that this can  
actually be done.



More information about the rules-users mailing list