Use Case 15: Generate a Downstream Structure Based on Part Attribute (Same Type, Multiple Configurations)
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, and PartSubType3 are subtypes of WTPart.
PartSubType3_1 is a subtype of PartSubType3.
| AUA is an attribute of type String. For a Boolean type, use the value true/false instead of Yes/No. |
To generate the downstream structure based on part attributes with same type and multiple configurations, 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",
"sourceAttributes": ["AUA=yes"],
"targetType": "wt.part.WTPart",
"transformOption": "addSame"
},
{
"sourceType": "wt.part.WTPart",
"targetType": "wt.part.WTPart",
"transformOption": "newBranch"
},
{
"sourceType": "org.rnd.PartSubType3",
"doNotTransform": "true"
},
{
"sourceType": "org.rnd.PartSubType2",
"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="attribute.AUA=yes"/>
<AddToProperty name="com.ptc.windchill.associativity.reconciliation.addusage.wt.part.WTPart.rule1" value="transformOption=addSame"/>
<AddToProperty name="com.ptc.windchill.associativity.reconciliation.addusage.wt.part.WTPart.rule1" value="targetType=wt.part.WTPart"/>
<Property name="com.ptc.windchill.associativity.reconciliation.addusage.wt.part.WTPart.rule2" multivalued="," default=""/>
<AddToProperty name="com.ptc.windchill.associativity.reconciliation.addusage.wt.part.WTPart.rule2" value="transformOption=newBranch"/>
<AddToProperty name="com.ptc.windchill.associativity.reconciliation.addusage.wt.part.WTPart.rule2" value="targetType=wt.part.WTPart"/>
<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="doNotTransform=true"/>
<Property name="com.ptc.windchill.associativity.reconciliation.addusage.org.rnd.PartSubType3.rule1" multivalued="," default=""/>
<AddToProperty name="com.ptc.windchill.associativity.reconciliation.addusage.org.rnd.PartSubType3.rule1" value="doNotTransform=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:
• Part1 (Design), Part2 (Design), Part3 (Design), and Part4 (Design) have the type as WTPart and part attribute AUA as Yes. They are added as is under the respective parts.
• SubType1_Assembly (Design), PartType_Assembly (Design), and Sub_Assembly1 (Design) with the type as WTPart do not have the attribute AUA as Yes. So they are added as new branch under the respective parts.
• PartSubType3_Assm1(Design) of type PartSubType3 and PartSubType2_Assembly1 (Design), PartSubType2_Assembly2 (Design) of type PartSubType2 are not transformed.
• PartSubType3_1_Assembly1 is also not transformed as it is of type PartSubType3_1 that is a subtype of PartSubType3.