Your anonymous sub-class isn't entered or it doesn't run as expected?
In your "accept" override you compare object references - type ==
"AGENDA".
Is this what you really want?
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Mehak
Sent: 10 March 2008 13:49
To: rules-users(a)lists.jboss.org
Subject: [rules-users] Making my own agenda Filter
Hi I am using this code to make my own agenda filter. In this case if the
type of rule is agenda then agenda filter to focus on that agenda is set
else agenda filter for rule is set.
private static AgendaFilter buildAgendaFilter(RuleConfig rule)
{ final String searchName = rule.getRuleName();
final String type = rule.getRuleType();
AgendaFilter filter = new AgendaFilter() // The control doesnt go
inside
this code
{
public boolean accept(Activation activation)
{ if(type == "AGENDA")
{
if((activation.getRule().getAgendaGroup()).equalsIgnoreCase(searchName))
{ System.out.println(searchName);
return true;
}
return false;
}
else
{
if((activation.getRule().getName()).equalsIgnoreCase(searchName))
{
return true;
}
return false;
}
}
};
return filter;
The problem is that the control doesnt go inside the new agenda creation.
Please let me know if something is wrong with the way I have used it.
Thanks
--
View this message in context:
http://www.nabble.com/Making-my-own-agenda-Filter-tp15950765p15950765.html
Sent from the drools - user mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users