declare Watcher
@role ( event )
triggeringValue : Value
numberOfContainedValues : int
valueSet : Set // Set<Value>
end
// ....
function Watcher generateWatcherEvent(Value firstValue) {
Watcher watcher = new Watcher();
watcher.setNumberOfContainedValues(1);
watcher.setTriggeringValue(firstValue);
// add value to set
Set set = watcher.getValueSet();
set.add(firstValue);
watcher.setValueSet(set);
return watcher;
}
Hi Tina,
Can you provide a test case?
Edson
2010/8/12 Tina Vießmann <tviessmann@stud.hs-bremen.de>
Hi again ...
I would like to insert a new generated object into the knowledge base.
It seems that
insert (new Watcher())
is working. But
Watcher watcher = new Watcher();
insert (watcher);
isn't working?
Why?
Thank you for any explanations. :)
Tina
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
--
Edson Tirelli
JBoss Drools Core Development
JBoss by Red Hat @ www.jboss.com
_______________________________________________ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users