No replies
3 Posts

Pinned topic Problem with Filter Rules

‏2008-07-29T03:24:47Z |
I'm using the Log & Trace Analyzer, and have created a symptom database with a filter rule. Everything compiles fine (nothing in the problems pane), but I just can't get the filter to work as described. The code in the "Event Selection" part is working correctly - and returning "true" or "false" as expected (when tested with specific input events), but the code in "Rule Response" is not getting triggered even when the "Event Selection" code returns "true". What could the problem be?

Here is my overall structure:

---> Definition
-------> Rule
----------->Rule Block
--------------->Filter Rule

The "Rule Block" contains the following:

1) an "import javax.swing.JOptionPane;" statement
2) a variable declaration for "count" of type "java.lang.Integer". The initilizer is set to "return Integer.valueOf(0);".

The Filter rule is used to separate CBEs with a severity value > 10, and the "Event Selection" code in the filter rule looks like this:

Object object = act_event.getOriginal(); obj = (;
if ( ( obj.getSeverity() > 10 ) ) {
JOptionPane.showMessageDialog(null, "Selected");
return true;
} else {
JOptionPane.showMessageDialog(null, "Not-Selected");
return false;

The "Rule Response" code looks like this:

JOptionPane.showMessageDialog(null, "ENTER Response Code");
try {
int count = act_lib.getIntVariable("count");
act_lib.setIntVariable("count", ++count);
JOptionPane.showMessageDialog(null, "Response count: " + count);
} catch (Exception e) {
JOptionPane.showMessageDialog(null, "Error in Response Code: " + e.toString());

My Problem

I have tested the above symptom catalog (with the filter rule) using a set of 10 events (in CBE format), some of which have severity > 10. The code in "Event Selection" works correctly (The JOptionPane popups work correctly), but the code in the "Rule Response" section is never triggered.