進階自訂 > Business Logic Customization > Packages Customization > Restrict the Collection of Missing Objects For Defined Contexts and Recipients
  
Restrict the Collection of Missing Objects For Defined Contexts and Recipients
Missing object collection, when not configured for a certain context or recipient, searches through all the contexts in the system. The data is irrelevant if the missing objects of certain contexts or recipients are not required for replication. Searching through all the contexts in the system slows down the creation of the delivery zip file. You can restrict the collection of missing objects for a certain context or set of contexts and for a context and recipient.
Defining Contexts for Missing Object Collection
In the ReplicationMissingInfo-wt.properties.xconf file, which is located in the Windchill/codebase/com/ptc/windchill/replication folder, define the property com.ptc.windchill.wp.missingObject.defaultTrackedContexts[1…] with a context or set of contexts. After defining the context, the missing objects for the context or set of contexts are collected and displayed in the Missing Object table. The default value of this property is all products and libraries.
To restrict the missing object collection for a context, define the value of the property as follows:
<Property name="com.ptc.windchill.wp.missingObject.defaultTrackedContexts1="/wt.inf.container.OrgContainer=<Organization>/wt.pdmlink.PDMLinkProduct=<Product or Library>"/>
You can use the property com.ptc.windchill.wp.missingObject.defaultTrackedContexts1 to define the contexts in various formats. See the following scenarios and their examples:
If the library (context) is Engine Component Library and the organization is Demo Organization, the value of the property is defined as follows:
<Property name="com.ptc.windchill.wp.missingObject.defaultTrackedContexts1 default="/wt.inf.container.OrgContainer=Demo Organization/wt.inf.library.WTLibrary= Engine Component Library" />
If the product (context) is Product1 and the organization is Demo Organization, the value of the property is defined as follows:
<Property name="com.ptc.windchill.wp.missingObject.defaultTrackedContexts2 default="/wt.inf.container.OrgContainer=Demo Organization/wt.pdmlink.PDMLinkProduct=Product1" />
You can define a new value, combining the values that are already defined, by using $ sign, as follows:
Combine the contexts that already exist and define a new context into a single property. See the following example:
<Property name="com.ptc.windchill.wp.missingObject.defaultTrackedContexts2 default="$com.ptc.windchill.wp.missingObject.defaultTrackedContexts1,/wt.inf.container.OrgContainer=Demo Organization/wt.pdmlink.PDMLinkProduct=Product1"/>
Combine the contexts that already exist to define a new context or set of contexts. See the following example:
<Property name="com.ptc.windchill.wp.missingObject.defaultTrackedContexts3 default="$com.ptc.windchill.wp.missingObject.defaultTrackedContexts1,$com.ptc.windchill.wp.missingObject.defaultTrackedContexts2/>
After making the appropriate changes in the ReplicationMissingInfo-wt.properties.xconf file, propagate the changes by executing the xconfmanager -p command in Windchill shell.
Defining Context and Recipient for Missing Object Collection
To restrict the collection of missing objects to a set of contexts for a recipient, in the ReplicationMissingInfo-wt.properties.xconf file located at Windchill/codebase/com/ptc/windchill/replication, set the following property to true:
<Property name="com.ptc.windchill.wp.missingObject.trackReceipientLevelContexts" default="false"/>.
The default value of this property is false.
To restrict the collection of missing objects to a context or set of contexts for a recipient, define the value of the property as follows:
<Property name="com.ptc.windchill.wp.missingObject.receipientAndContext[1…..] default="<RecipientName>:<Contexts>"/>
After defining the contexts and recipients, the missing objects for the context or set of contexts and the recipient are collected and displayed in the Missing Object table. See the following example:
If the recipient is testuser and the context is Drive System, the value of the property is defined as follows:
<Property name="com.ptc.windchill.wp.missingObject.receipientAndContext1 default="testuser:/wt.inf.container.OrgContainer=Demo Organization/wt.pdmlink.PDMLinkProduct=Drive System"/>
You can define the value using the properties that are already defined, by using $ sign as follows:
<Property name="com.ptc.windchill.wp.missingObject.myUserContexts
default="/wt.inf.container.OrgContainer=Demo Organization/
wt.pdmlink.PDMLinkProduct=Drive System,/wt.inf.container.OrgContainer=
Demo Organization/wt.pdmlink.PDMLinkProduct=MyContext"/>

<Property name="com.ptc.windchill.wp.missingObject.receipientAndContext1
default="testuser:$com.ptc.windchill.wp.missingObject.myUserContexts"/>

<Property name="com.ptc.windchill.wp.missingObject.receipientAndContext2=
uid=windchilluser,ou=people,cn=administrativeldap,cn=windchill_11.2,o=ptc|
Ldap.ptcnet.ptc.com|Ldap.ptcnet.ptc.com:$com.ptc.windchill.wp.missingObject.
myUserContexts/>
* 
The uid for a user is available on the details page of the user.
If the above condition (context and recipient) is not satisfied for missing object collection, the missing objects collection will be calculated at the context level.
After making the appropriate changes in the ReplicationMissingInfo-wt.properties.xconf file, propagate the changes by executing the xconfmanager -p command in Windchill shell.