[rules-dev] use of declared facts
Oleg Zenzin
zenzin at intalio.com
Mon Jan 26 21:02:45 EST 2009
There's now possibility to declare facts in the drl, like:
declare Person
name: String
age: int
end
My question is how do I instantiate this fact object during runtime? Do I
still need to have class Person compiled and existing somewhere in
classpath, or there's a helper class which I can use "fake the fact",
something like:
FakeFact person = FakeFact("Person");
person.setField("name", "Oleg");
person.setField("age", "42");
session.insert(person);
Or there's another nicer way?
Thank you,
-Oleg Zenzin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-dev/attachments/20090126/b20f489a/attachment.html
More information about the rules-dev
mailing list