Advanced Customization > Business Logic Customization > Packages Customization > Select Files – Copy Forward Exclusion Decisions
Select Files – Copy Forward Exclusion Decisions
You can define some rules to reconcile the exclusion decisions taken by user over the package maturity.
Background
As a part of the default implementation rules are defined to reconcile the decisions taken by user over the package maturity like for update of package contents, SaveAs or Revise action where the explicit user decisions are copied forward over the contents present in target package. The default implementation can be customized to extend the behavior that suit the respective business requirement. The default implementation provided copies the user explicit decisions from the latest versions in the old package to the new versions in the updated package.
Scope/Applicability/Assumptions
This information should be applied by a developer or customizer who is responsible for configuring the information page for some object in Windchill.
It is assumed that you have basic knowledge about Packages and Select Files functionality.
Intended Outcome
The intended outcome will depend on the implementation as per the respective business requirement.
Solution
A custom java class would be written which would override the default behavior for copy forward of explicit decisions on package update.
Prerequisite knowledge
To achieve the intended result you need to have an understanding of the following:
Basic knowledge about Packages and Select Files.
Basic knowledge of object versioning in Windchill.
The management of properties files in Windchill, including the use of xconfmanager.
Solution Elements
Element
Type
Description
ContentControlDecisionVersionDelegate
Java Interface
This interface needs to be implemented by the new custom class
AbstractContentControlDecisionVersionDelegate
Abstract Class
This is the Abstract class which has the ContentControlLink Comparator
contentcontrol-service.properties.xconf
XCONF file
This is used to configure the new Custom class
Procedure – Create new Custom class for copy forward of explicit decisions
1. Create the new custom java class <custom class> which implements"ContentControlDecisionVersionDelegate" and provide custom implementation for "copyExclusionInfoForRevision" API.
2. The implementation of above API should be as per the respective business requirement.
3. Check the contentcontrol-service.properties.xconf file for the entry for :
<!-- ContentControlDecisionVersionDelegate -->
<Service name="com.ptc.windchill.contentcontrol.delegates.
ContentControlDecisionVersionDelegate">
<Option serviceClass="com.ptc.windchill.contentcontrol.delegates.
DefaultContentControlDecisionVersionDelegate"
requestor="java.lang.Object"
selector="null"
cardinality="singleton"/>
</Service>
Change the following serviceClass attribute with the fully qualified name of the new custom implementation class.
<Service name="com.ptc.windchill.contentcontrol.delegates.
ContentControlDecisionVersionDelegate">
<Option serviceClass="<custom class>"
requestor="java.lang.Object"
selector="null"
cardinality="singleton"/>
</Service>
4. Run xconfmanager -p to propagate the above changes to service.properties.
5. Restart the method server to effect the changes.
Customization Points
The ContentControlDecisionVersionDelegate interface a single API
void opyExclusionInfoForRevision(WTKeyedMap masterToOldCClMap,
WTKeyedMap masterToNewCClMap) throws WTPropertyVetoException ;
The parameters are as follows:
masterToOldCClMap : WTKeyedMap; : This map contains the master object as key and the list of old ContentControlLinks as value
masterToNewCClMap : WTKeyedMap; : This map contains the master object as key and the list of new ContentControlLinks as value
By getting the list of old and new ContentControlLinks for the same master the exclusion info can be copied from the old links to the new links. The list of new ContentControlLinks does not have the ContentControlLinks for which the same version exists in the old links. For this the exclusion info will be copied from the old links by default. Only the versions which did not exist earlier will be added to the list.
Sample Code
The default implementation for this functionality is provided as DefaultContentControlDecisionVersionDelegate in the com.ptc.windchill.contentcontrol.delegates package.
Was this helpful?