Resolving Interactive Discrepancies in the BOM Transformer
You can resolve the Interactive discrepancies between upstream and downstream structures in the BOM transformer by executing the SplitAssemble action.
To resolve the Interactive discrepancies between upstream and downstream structures, follow these steps:
1. Detect the discrepancies.
2. Retrieve the IDs of the existing split assemblies. Also, retrieve the IDs of the equivalent links between the child parts in the upstream assembly and their downstream objects, if they already exist.
3. Retrieve the path IDs, usage link or occurrence link IDs, and IDs for the child parts in the upstream structure.
4. Populate the information retrieved from steps 2 and 3 in the request payload of the SplitAssemble API.
5. Execute the SplitAssemble API.
The following section describes the steps in detail.
Detecting Discrepancies
To resolve the Interactive discrepancies, you must first detect the discrepancies that exist between upstream and downstream structures in the BOM transformer using the DetectDiscrepancies action:
Use the following request API:
POST Windchill/servlet/odata/BomTransformation/DetectDiscrepancies
When the Interactive discrepancies exist between upstream and downstream structures, the request returns the corresponding details in the response.
For example, the following response shows one of the Interactive discrepancies detected by the DetectDiscrepancies action:
{
"Identity": "0000000305, ChildChild1, A.1 (Design)",
"Number": "0000000305",
"Name": "ChildChild1",
"Version": "A.1 (Design)",
"Criteria": "Removed Parts",
"CurrentValue": "",
"PreviousValue": "0000000302|0000000305",
"DownstreamParentPath": [
""
],
"Status": "Interactive",
"InternalMetadata": "eyJTdGF0dXMiOiJBdXRvIiwiQ3VycmVudFZhbHVlSW50ZXJuYWxOYW1lIjoiIiwiRGlzY3JlcGFuY3lTdGF0dXNNZXNzYWdlIjoiIiwiZG93bnN0cmVhbVBhcmVudCI6IjAwMDAwMDAzMDJ8MDAwMDAwMDMwNSIsIlJlbW92ZWRDaGlsZCI6Ind0LnBhcnQuV1RQYXJ0OjI2NTkyMiIsInVwc3RyZWFtSW1wYWN0ZWRPYmplY3QiOiIiLCJEaXNjcmVwYW50UGF0aFJvb3QiOiJ3dC5wYXJ0LldUUGFydE1hc3RlcjoyNjU4NjciLCJDdXJyZW50VmFsdWUiOiIiLCJTdGF0dXNJbnRlcm5hbE5hbWUiOiJBVVRPIiwiUHJldmlvdXNWYWx1ZUludGVybmFsTmFtZSI6IjAwMDAwMDAzMDJ8MDAwMDAwMDMwNSIsIlByZXZpb3VzVmFsdWUiOiIwMDAwMDAwMzAyfDAwMDAwMDAzMDUiLCJUYXJnZXRQYXRocyI6W3siUGF0aCI6Ii85MTI4MjBhMy0yZjIwLTRhYWEtYjAxOS05M2I4NDNkNDQ0MzkiLCJSb290Ijoid3QucGFydC5XVFBhcnRNYXN0ZXI6MjY1ODY3IiwiTGVhZiI6Ind0LnBhcnQuV1RQYXJ0TWFzdGVyOjI2NTkxOSJ9XSwibnVtYmVyIjoiMDAwMDAwMDMwNSIsIlR5cGUiOiJSZW1vdmVkIFBhcnRzIiwiVHlwZUludGVybmFsTmFtZSI6IlJFTU9WRURfVVNBR0UiLCJEaXNjcmVwYW50UGF0aCI6Ii8iLCJWZXJzaW9uIjoiQS4xIChEZXNpZ24pIiwiaWRlbnRpdHkiOiIwMDAwMDAwMzA1LCBDaGlsZENoaWxkMSwgQS4xIChEZXNpZ24pIiwibmFtZSI6IkNoaWxkQ2hpbGQxIiwiUmVtb3ZlZFVzYWdlIjoid3QucGFydC5XVFBhcnRVc2FnZUxpbms6MjY1OTMxIiwiSWQiOiJmZWY0ZjI1MC00YzQ2LTQxYWItYjY5Mi02OTBkMDIyNWZkNDkiLCJpc0Rpc2NyZXBhbnRQYXRoSW5PY2N1cnJlbmNlTW9kZSI6ZmFsc2UsIkRvd25zdHJlYW1Db250ZXh0IjoiTWFudWZhY3R1cmluZyIsIkRpc2NyZXBhbnRQYXRoTGVhZiI6Ind0LnBhcnQuV1RQYXJ0TWFzdGVyOjI2NTg2NyJ9"
}
Retrieving Existing Downstream Objects
After checking whether the Interactive discrepancies exist between upstream and downstream structures, you can retrieve the IDs of existing split assemblies for an upstream parent part in the BOM transformer. You can also retrieve the IDs of the equivalent links between the child parts in the upstream assembly and their existing downstream objects. Use the following request API to retrieve the IDs by specifying TransformationActionType as SPLIT in the request body.
POST /Windchill/servlet/odata/BomTransformation/GetExistingDownstreamObjects?$expand=DownstreamObjects($expand=UpstreamPart($select=ID,Identity),DownstreamPart($select=ID,Identity),EquivalenceLink($select=ID,Annotations,DownstreamContext,UpstreamContext))
For more information, see Retrieving Existing Downstream Objects.
Populate the following information in the request payload of the SplitAssemble API:
IDs of the existing split assemblies in the ID attribute specified in the NewSplitAlternates array.
Equivalent link IDs in the ChildExistingEquivalenceAssociations@odata.bind attribute, if the child parts in the upstream assembly have existing downstream equivalent objects.
Retrieving the Path IDs, Usage Link or Occurrence Link IDs, and IDs for the Child Parts in the Upstream Structure
To retrieve information about the child parts in the upstream structure, specify the root part OID of the upstream structure in the following request API:
POST /Windchill/servlet/odata/BomTransformation/XBOMParts('<RootPartOID>')/PTC.BomTransformation.GetManufacturingBOM?$expand=Components($levels=max)
When in occurrence mode, specify the root part OID of the upstream structure in the following request API to retrieve information about the child part occurrences in the upstream structure.
POST /Windchill/servlet/odata/BomTransformation/XBOMParts('<RootPartOID>')/PTC.BomTransformation.GetManufacturingBOM?$expand=Components($expand=Occurrence;$levels=max)
Populate the path IDs, usage link or occurrence link IDs, and IDs for the child parts in the upstream structure in the ChildPath, Link@odata.bind, and Child@odata.bind attributes, respectively, in the request payload of the SplitAssemble API.
The following examples demonstrate how the Interactive discrepancies are resolved in the usage and occurrence modes, respectively, when you execute the SplitAssemble request API.
Example: Resolving Interactive Discrepancies in Usage Mode
This example shows you how to resolve the Interactive discrepancies for the Added Parts criteria in usage mode after populating the required information. Use the following POST URI with the request body:
URI
POST Windchill/servlet/odata/BomTransformation/SplitAssemble
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"DiscrepancyContext": {
"SourcePartSelection": [
{
"Part@odata.bind": "Parts('OR:wt.part.WTPart:189986')"
}
],
"DownstreamNavigationCriteria": {
"HideUnresolvedDependents": false,
"Centricity": false,
"Filters": [],
"ApplicationName": null,
"UseDefaultForUnresolved": false,
"SharedToAll": true,
"ApplicableType": "PTC.ProdMgmt.Part",
"ApplyToTopLevelObject": false,
"ConfigSpecs": [
{
"@odata.type": "#PTC.NavCriteria.WTPartStandardConfigSpec",
"Variation1": null,
"Variation2": null,
"LifeCycleState": null,
"WorkingIncluded": true,
"View": "Manufacturing"
}
]
},
"UpstreamNavigationCriteria": {
"HideUnresolvedDependents": false,
"Centricity": false,
"Filters": [],
"ApplicationName": null,
"UseDefaultForUnresolved": false,
"SharedToAll": true,
"ApplicableType": "PTC.ProdMgmt.Part",
"ApplyToTopLevelObject": false,
"ConfigSpecs": [
{
"@odata.type": "#PTC.NavCriteria.WTPartStandardConfigSpec",
"Variation1": null,
"Variation2": null,
"LifeCycleState": null,
"WorkingIncluded": true,
"View": "Design"
}
]
},
"SourceRoot@odata.bind": "Parts('OR:wt.part.WTPart:209637')",
"TargetRoot@odata.bind": "Parts('OR:wt.part.WTPart:209756')",
"TargetPart@odata.bind": "Parts('OR:wt.part.WTPart:209758')",
"TargetPath": null
},
"NewObjectIdentifications": [
{
"ChildPath": [
"b10eb4f7-23b9-4ab0-9fa0-b3658fe26592|fb43dec7-e87f-41f3-a8ba-4de89a4ca756"
],
"UpstreamParentPart@odata.bind": "Parts('OR:wt.part.WTPart:209985')",
"ChildExistingEquivalenceAssociations@odata.bind": [],
"TransformationType": "NEW_PART"
}
],
"NewSplitAlternates": [
{
"ID": "OR:wt.part.WTPart:348355",
"SplitInfos": [
{
"@odata.type": "#PTC.BomTransformation.UsageSplit",
"Link@odata.bind": "PartUses('OR:wt.part.WTPartUsageLink:348476')",
"Child@odata.bind": "Parts('OR:wt.part.WTPart:200777')",
"Quantity": "3"
}
]
},
{
"ID": "OR:wt.part.WTPart:348302",
"SplitInfos": [
{
"@odata.type": "#PTC.BomTransformation.UsageSplit",
"Link@odata.bind": "PartUses('OR:wt.part.WTPartUsageLink:348476')",
"Child@odata.bind": "Parts('OR:wt.part.WTPart:200777')",
"Quantity": "1"
}
]
}
]
}
The request resolves the Interactive discrepancies and adds the child part as a new part under each of the two split assemblies, one of quantity 3 and the other of quantity 1.
Example: Resolving Interactive Discrepancies in Occurrence Mode
This example shows you how to resolve the Interactive discrepancies for the Added Parts criteria in occurrence mode after populating the required information. Use the following POST URI with the request body:
URI
POST Windchill/servlet/odata/BomTransformation/SplitAssemble
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"DiscrepancyContext": {
"SourcePartSelection": [
{
"Part@odata.bind": "Parts('OR:wt.part.WTPart:189986')"
}
],
"DownstreamNavigationCriteria": {
"HideUnresolvedDependents": false,
"Centricity": false,
"Filters": [],
"ApplicationName": null,
"UseDefaultForUnresolved": false,
"SharedToAll": true,
"ApplicableType": "PTC.ProdMgmt.Part",
"ApplyToTopLevelObject": false,
"ConfigSpecs": [
{
"@odata.type": "#PTC.NavCriteria.WTPartStandardConfigSpec",
"Variation1": null,
"Variation2": null,
"LifeCycleState": null,
"WorkingIncluded": true,
"View": "Manufacturing"
}
]
},
"UpstreamNavigationCriteria": {
"HideUnresolvedDependents": false,
"Centricity": false,
"Filters": [],
"ApplicationName": null,
"UseDefaultForUnresolved": false,
"SharedToAll": true,
"ApplicableType": "PTC.ProdMgmt.Part",
"ApplyToTopLevelObject": false,
"ConfigSpecs": [
{
"@odata.type": "#PTC.NavCriteria.WTPartStandardConfigSpec",
"Variation1": null,
"Variation2": null,
"LifeCycleState": null,
"WorkingIncluded": true,
"View": "Design"
}
]
},
"SourceRoot@odata.bind": "Parts('OR:wt.part.WTPart:209637')",
"TargetRoot@odata.bind": "Parts('OR:wt.part.WTPart:209756')",
"TargetPart@odata.bind": "Parts('OR:wt.part.WTPart:209758')",
"TargetPath": null
},
"NewObjectIdentifications": [
{
"ChildPath": [
"6201|6230"
],
"UpstreamParentPart@odata.bind": "Parts('OR:wt.part.WTPart:209985')",
"ChildExistingEquivalenceAssociations@odata.bind": [],
"TransformationType": "NEW_PART"
}
],
"NewSplitAlternates": [
{
"ID": "OR:wt.part.WTPart:348507",
"SplitInfos": [
{
"@odata.type": "#PTC.BomTransformation.OccurenceSplit",
"Link@odata.bind": "UsageOccurrences('OR:wt.part.PartUsesOccurrence:348482')",
"Child@odata.bind": "Parts('OR:wt.part.WTPart:348464')"
},
{
"@odata.type": "#PTC.BomTransformation.OccurenceSplit",
"Link@odata.bind": "UsageOccurrences('OR:wt.part.PartUsesOccurrence:348567')",
"Child@odata.bind": "Parts('OR:wt.part.WTPart:348464')"
}
]
},
{
"ID": "OR:wt.part.WTPart:348541",
"SplitInfos": [
{
"@odata.type": "#PTC.BomTransformation.OccurenceSplit",
"Link@odata.bind": "UsageOccurrences('OR:wt.part.PartUsesOccurrence:348566')",
"Child@odata.bind": "Parts('OR:wt.part.WTPart:348464')"
}
]
}
]
}
The request resolves the Interactive discrepancies and adds the child part as a new part under each of the two split assemblies, one of occurrence 2 and the other of occurrence 1.
Was this helpful?