Data Management Capabilities > Managing Part Structures > Windchill Options and Variants Capabilities > Filtering a Configurable Product Structure with the Option Filter > Standard and Alternate Option Filter > Customizing Filtering Behaviors for the Option Filtering Delegate > Configuring Standard and Alternate Behaviors
  
Configuring Standard and Alternate Behaviors
You can customize the behavior of the Standard and Alternate Option Filter by providing a configuration file for each method. A configuration file specifies the conditions for filtering a module variant, with the consideration of the following criteria:
The specified filtering type:
Standard
Alternate
The parent/child type combinations
Where the expression is assigned:
On an item
On a usage link
On an occurrence
The result of the evaluation of the assigned expression:
TRUE
FALSE
UNDEFINED
The two configuration files are registered in the WT_HOME/wt.properties file under the properties:
ato.filter.strategy.1 – for the standard behavior
ato.filter.strategy.2 – for the alternate behavior
The out-of-the-box values of the properties in the wt.properties file are as follows:
ato.filter.strategy.1=$(wt.home)/codebase/com/ptc/windchill/option/filter/StandardFilterStrategy.xml

ato.filter.strategy.2=$(wt.home)/codebase/com/ptc/windchill/option/filter/AlternateFilterStrategy.xml
Custom XML Parsers
The root of any Option filtering configuration file is the FilterStrategy element. Its only attribute is the “handler” whose value is the fully qualified name of the class that parses the XML file, and it produces an instance of an object FilterStrategy from the com.ptc.windchill.option.filter package. Specifically, the XML handler must implement the interface com.ptc.windchill.option.filter.FilterStrategyhandler with a single method that is defined, and passes through the root element FilterStrategy of the XML file, as shown in the following example.
public FilterStretegy loadfilterStrategyHandler(org.w3c.dom.Element e);
This attribute gives you an ability to provide your own XML format for creating custom filter strategies. However, in most situations, using the standard handler com.ptc.windchill.option.filter.DefaultFilterStrategyHandler for the OOTB XML format suffices. The standard handler is defined as:
com.ptc.windchill.option.filter.DefaultFilterStrategyhandler
Format of Standard XML Configuration Files
The root element, FilterStrategy, is comprised of the FilterNode, which contains expression evaluation policies for a given type of an object.
The FilterNode element has the following attributes that fully characterize a navigation unit node object participating in the filter process:
Attribute
Definition and Values
type
The type or class type of the filterable or supporting object.
parentType
The type or class type of the parent object of the filterable object.
childType
The type or class type of the resolved child object of the filterable object.
For example, in a common case, the filterable object is an instance of WTPartUsageLink. Its parent object is the parent WTPart of the usage link, and its child object is the resolved WTPart of the child WTPartMaster of the usage link. Note that you must specify at least one of the three attributes of the “FilterNode” element. The filter nodes are matched against the node objects in the order specified in the XML file. This returns the first policy that matches.
Expression Policies
Each FilterNode element must have one or two basic and/or advanced ExpressionPolicy subelements.
The ExpressionPolicy element has the following attributes that describe if the policy is applicable to basic or advanced expressions, and the conditions for filtering structure nodes based on the presence and the value of advanced expressions, as shown in the following table.
Attribute
Definition and Values
advanced
Specifies if the policy is applied to advanced (if the value is TRUE), or basic (if the value is FALSE).
mode
The list of conditions to filter out the node. The mode can list one or several of the following constants:
Constant
Description
STANDARD
Filter out the node when the expression value is FALSE.
UNDEFINED
Filter out the node if the expression value is UNDEFINED.
Mode Attribute for Basic Expressions
The mode attributes for a basic expression are as follows:
Attribute
Definition and Values
STANDARD
The standard filtering for choices (basic expressions) is different from the filtering based on advanced expressions. In the choices-based algorithm, the choices assigned to the filterable object (usage link) and the end node (child part) object are combined and then matched as a combined set against the set of user selections in the filter.
UNDEFINED
If you consider the set of options whose choices are assigned to the object, then the mode is UNDEFINED if and only if the filter contains an option from this set that has no user selections.