Advanced Customization > Business Logic Customization > Options and Variants > Customizing Options and Variants > Windchill Option Set Delegate Framework Customizations > Restrict Windchill Object to Assign Option Set
  
Restrict Windchill Object to Assign Option Set
In your Windchill system based on your business requirements you may be a need to restrict specific type of object from being assigned with an option set.
In a product structure assembly there is a type of part, where due to the business rules, the system should not allow the assignment of an option set and does not allow capability to assign choices on specific type of part. You can restrict this for a business object or a subtype of a business object.
Procedure
In order to restrict a specific object type for assigning option set object, Windchill provides the com.ptc.windchill.option.delegate.impl.NullOptionSetFetcherDelegate delegate. You can specify this delegate for an object type you want restrict. This can be defined using a service property in Windchill.
These Windchill properties are defined using the Windchill XCONF feature. See the section Basic Administration for details on XCONF files and how to create them.
Example: Restrict the Option Set Assignment
Suppose that you wish to restrict the option set assignment to say subtype of part viz.com.myorg.OrgPart:
1. Create an XCONF file that contains the appropriate new value for the property com.ptc.windchill.option.delegate.OptionSetFetcherDelegate.
2. Use the XCONF Manager to update Windchill services properties.
The following XML document is an XCONF command to restrict a object to assign option set:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE Configuration SYSTEM "xconf.dtd">

<Configuration targetFile="codebase/service.properties">
   <!-- OptionSet Fetcher Delegates -->
    <Service context="default" name="com.ptc.windchill.option.delegate.OptionSetFetcherDelegate">
          <Option cardinality="duplicate" requestor="null" selector="WCTYPE|wt.part.WTPart| com.myorg.OrgPart" serviceClass="com.ptc.windchill.option.delegate.impl.NullOptionSetFetcherDelegate"/>
   </Service>

</Configuration>
3. The following command saves the changes in the file to Windchill services properties:
xconfmanager -i codebase/com/ptc/windchill/options/customization/example1.properties.xconf -p
This command causes Windchill to restrict all object of this type for assigning an option set.
* 
The code above is an example. You must have appropriate type of object defined in system and XCONF file created at appropriate location.