[omniNotify] Filter Evaluation Problems

Cameron Rochester Cameron.Rochester at Ripple-Systems.com
Wed May 28 18:12:52 BST 2003


Hi all,

I am having some problems with omniNotify 2.0. It does not seem to evaluate
my filters correctly - either that or I don't know how to use it...

--- I am sending events of the following ---

//
// Fixed Header
//
event->header.fixed_header.event_type.domain_name = CORBA::string_dup( "Foo"
);
event->header.fixed_header.event_type.type_name = CORBA::string_dup( "Bar"
);
		
//
// Filterable Data
//
event->filterable_data.length( 1 );
event->filterable_data[0].name = CORBA::string_dup( "Name" );
event->filterable_data[0].value <<= "Value";


--- I create a subscriber with the following Filter attached to the proxy
---

CosNotification::EventTypeSeq seq;
seq.length(1);
seq[0].domain_name = "Foo";
seq[0].type_name = "Bar";

CosNotifyFilter::ConstraintExpSeq expression;
expression.length(1);
expression[0].event_types = seq;
expression[0].constraint_expr = "( $.header.filterable_data(Name) == 'Value'
)"; 

--- I have also tried to no avail ---
// this
expression[0].constraint_expr = "$.header.filterable_data(Name) == 'Value'
"; 
// or
expression[0].constraint_expr = "( $.Name) == 'Value' )"; 
//or
expression[0].constraint_expr = "$.Name == 'Value' "; 

---

Now, I have been using the TAO Notification Service up to now without any
problems with these constraints. (Took me a while to figure out a number of
the differences between omniNotify & TAO - such as filters correctly
implementing attach_callback for subscription_change notifications in
omniNotify) 

If I *don't* specify the constraint (ie: set it to 'true') and still specify
the domain_name and type_name, I receive the events just fine....

I have tried turning on the debug options in the omniNotify configuration
file but I don't seem to get any output to either stderr or to a log file
(the log file is created, it just isn't populated)

Any ideas - should the above constraint work?

Cheers
Cameron






More information about the omninotify-list mailing list