|
Hi,
I am trying to remove a Deftemplate previously
defined using rete.addDeftemplate(). I followed the same steps to successfully
remove a Defmodule:
1. Obtain a list of the modules
Iterator iterator =
rete.listModules();
2. Iterate over the list until I find the module I
want to remove, and remove it using iterator.remove().
while (iterator.hasNext()) {
String module =
(String)iterator.next();
if
(module.equals(moduleToRemove)) {
// Remove
module
iterator.remove();
break;
}
}
When I try to follow the same steps to remove a
Deftemplate:
Iterator iterator =
rete.listDeftemplates();
while (iterator.hasNext()) {
Deftemplate template =
(Deftemplate)iterator.next();
if
(templateToRemove.equals(template.getName()) {
// Remove
template
iterator.remove();
break;
}
}
The template is not removed. Executing the
function (list-deftemplates) reports that the template is still
there.
Am I following the correct procedure to remove a
Deftemplate? Is there any other way to remove a Deftemplate?
Thanks in advance for your help, and BTW great work
:)
Regards,
Horacio
|
- Re: JESS: Jess6.0b2: Removing Deftemplates Horacio Blanco
