Handler - passIfProductAttributesMatch

 

Description

Examines a product's subproducts and only passes those parts with metadata (attributes) that match those specified here. All attributes must match on all subproducts. Any subproducts that do not pass the test are removed (not passed on as the output of this agent).

Configuration Variables

Product attribute matches are specified as:

For example, to match a product with country=America and region=Northern one would specify:

(productAttribute_country "America")

(productAttribute_region "Northern")

For example, to match a product with the attributes dayOfWeek=Monday or dayOfWeek=Friday but not month=January one would specify:

(productOrAttribute_dayOfWeek "Monday" "Friday")

(productNotAttribute_month "January")

Product

The output product consists of the all parts of the product tree that match all of the specified conditions. All subproducts that do not match any of the attribute filters are removed from the composite product.

Product is null if there are no sources, or if all subproducts have been removed.

How it Works

The passIfProductAttributesMatch juggler applies a filter to the subproducts of its input product. For each basic product each attribute test is applied against that product and if the test is false then that product is removed from its parent product.

Revised: 20 Jan 2000