Use Case 16: Generate a Downstream Structure Based on Occurrence Attribute
Consider that the following structure is present in the BOM Transformer:
• An equivalent link exists between Top_Assembly (Design)and Top_MBOMAssembly (Manufacturing).
• Part1, Part2, and Part3 have the values occv1, occv2, and occv3, respectively, for the occurrence attribute OccIBA.
• MBOM_Assembly1, MBOM_Assembly2, and MBOM_Assembly3 have the values Value1, Value2, and Value3, respectively, for the attribute PartAttribute.
To generate the downstream structure based on occurrence attributes, you can specify the transformation and restructuring rules using rules file or properties file.
| This feature is being enhanced. For now, use this configuration to transform all the occurrences of upstream part to the downstream structure. |
Using Rules File
In a text file, add the following rules in JSON format:
{
"transformRules": [
{
"sourceType": "wt.part.WTPart",
"sourceAttributes": ["genericType=standard"],
"newAttributeMappings": [
[
"source.occurrence.OccIBA:occv1",
"target.part.PartAttribute:Value1"
],
[
"source.occurrence.OccIBA:occv2",
"target.part.PartAttribute:Value2"
],
[
"source.occurrence.OccIBA:occv3",
"target.part.PartAttribute:Value3"
]
],
"transformOption": "newBranch",
"targetType": "wt.part.WTPart"
}
]
}
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.genericType=standard"/>
<AddToProperty name="com.ptc.windchill.associativity.reconciliation.addusage.wt.part.WTPart.rule1" value="newAttributeMapping.rule1.entry1=source.occurrence.OccIBA:occv1,newAttributeMapping.rule1.entry2=target.part.PartAttribute:Value1"/>
<AddToProperty name="com.ptc.windchill.associativity.reconciliation.addusage.wt.part.WTPart.rule1" value="newAttributeMapping.rule2.entry1=source.occurrence.OccIBA:occv2,newAttributeMapping.rule2.entry2=target.part.PartAttribute:Value2"/>
<AddToProperty name="com.ptc.windchill.associativity.reconciliation.addusage.wt.part.WTPart.rule1" value="newAttributeMapping.rule3.entry1=source.occurrence.OccIBA:occv3,newAttributeMapping.rule3.entry2=target.part.PartAttribute:Value3"/>
<AddToProperty name="com.ptc.windchill.associativity.reconciliation.addusage.wt.part.WTPart.rule1" value="transformOption=newBranch"/>
<AddToProperty name="com.ptc.windchill.associativity.reconciliation.addusage.wt.part.WTPart.rule1" value="targetType=wt.part.WTPart"/>
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:
• 2 occurrences of Part1 with the OccIBA value as occv1 are added under MBOM_Assembly1 (Manufacturing) that has the PartAttribute value as Value1.
• 2 occurrences of Part2 with the OccIBA value as occv2 are added under MBOM_Assembly2 (Manufacturing) that has the PartAttribute value as Value2.
• 2 occurrences of Part3 with the OccIBA value as occv3 are added under MBOM_Assembly3 (Manufacturing) that has the PartAttribute value as Value3.