Use Case 14: Generate a Downstream Structure Based on the Part Type
Consider that the following structure is present in the BOM Transformer:
• Downstream structure does not exist.
• The parts in the upstream structure belong to different subtypes of WTPart.
• PartSubType1, PartSubType2, PartSubType3, and PartSubType4 are subtypes of WTPart.
To generate the downstream structure based on part types, you can specify the transformation and restructuring rules using rules file or properties file.
Using Rules File
In a text file, add the following rules in JSON format:
{
"transformRules": [
{
"sourceType": "wt.part.WTPart",
"transformOption": "newBranch"
},
{
"sourceType": "org.rnd.PartSubType2",
"transformOption": "addSame"
},
{
"sourceType": "org.rnd.PartSubType4",
"doNotTraverse":"true",
"doNotTransform":"true"
}
]
}
Using Properties File
1. Access the associativity.properties.xconf file located in Windchill/codebase/com/ptc/core/foundation/associativity.
2. Add the following restructuring rules:
<Property name="com.ptc.windchill.associativity.reconciliation.addusage.wt.part.WTPart.rule1" multivalued="," default=""/>
<AddToProperty name="com.ptc.windchill.associativity.reconciliation.addusage.wt.part.WTPart.rule1" value="transformOption=newBranch"/>
<Property name="com.ptc.windchill.associativity.reconciliation.addusage.org.rnd.PartSubType2.rule1" multivalued="," default=""/>
<AddToProperty name="com.ptc.windchill.associativity.reconciliation.addusage.org.rnd.PartSubType2.rule1" value="transformOption=addSame"/>
<Property name="com.ptc.windchill.associativity.reconciliation.addusage.org.rnd.PartSubType4.rule1" multivalued="," default=""/>
<AddToProperty name="com.ptc.windchill.associativity.reconciliation.addusage.org.rnd.PartSubType4.rule1" value="doNotTransform=true"/>
<AddToProperty name="com.ptc.windchill.associativity.reconciliation.addusage.org.rnd.PartSubType4.rule1" value="doNotTraverse=true"/>
After you perform the Generate Downstream Structure action, the following structure appears in the BOM Transformer:
Based on the criteria specified in the rules file or properties file, the downstream structure is generated in the following manner:
• SubType1_Assembly (Manufacturing), PartSubType3_Assm1 (Manufacturing), PartSubType3_Assm2 (Manufacturing), and SubAssembly1 (Manufacturing) with the type as WTPart are added as new branch.
• SubType2_Part1(Design), SubType2_Part2 (Design), SubType2_Part3 (Design), and SubType2_Part4 (Design) having the type as PartSubType2 are added as is under the respective parts.
• SubType4_Assm1 (Design) and SubType4_Assm1 (Design) of PartType4 are not transformed and traversed. So the child part SubType2_Part5 (Design) is not transformed as well.