[omniNotify] Filter Evaluation Problems
Robert E. Gruber
gruber at research.att.com
Wed May 28 10:04:31 BST 2003
If you send me your supplier/consumer code I will try it out and see what is
happening.
BTW you could also write
$Name == 'Value'
for the constraint expression.
-- Bob
----- Original Message -----
From: "Cameron Rochester" <Cameron.Rochester at Ripple-Systems.com>
To: <omninotify-list at omniorb-support.com>
Sent: Wednesday, May 28, 2003 5:12 AM
Subject: [omniNotify] Filter Evaluation Problems
> 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
>
>
>
>
> _______________________________________________
> omninotify-list mailing list
> omninotify-list at omniorb-support.com
> http://www.omniorb-support.com/mailman/listinfo/omninotify-list
>
More information about the omninotify-list
mailing list