GenerateDownstreamStructure
The GenerateDownstreamStructure action by default first matches the specified upstream parent part with its downstream parent part using custom attribute values. The action then transfers the parts in the upstream structure to the downstream using the PasteAsIs action. You can customize the logic by applying the restructuring rules in Windchill in the associativity.properties.xconf file located in Windchill/codebase/com/ptc/core/foundation/associativity.
* 
To perform this action, an equivalent link must exist between the upstream and downstream root parts.
You can use custom usage attributes and custom part attributes. Ensure that you update or add the properties accordingly in Windchill for performing this action.
You can generate a downstream structure for parts under an assembly using inline or specific upstream and downstream navigation criteria.
You can also generate the downstream structure in the context of change (change task or change notice).
See the Overview of Generate Downstream Structure Action topic in the Windchill Help Center, for more information.
The attributes in the request payload of the GenerateDownstreamStructure action are described in the following table:
Request Attribute
Description
Required
SourceRoot
Attribute in the DiscrepancyContext entity type to specify the root part of the upstream structure.
Yes
SourcePartSelection
Attribute in the DiscrepancyContext entity type to specify the parent Part from the upstream structure.
Alternatively, you can specify the Path of the parent part.
* 
SourcePartSelection is a collection for specifying a single upstream parent part or its path.
Optional
UpstreamNavigationCriteria
Attribute in the DiscrepancyContext entity type to specify the navigation criteria applied in the upstream.
Yes
DownstreamNavigationCriteria
Attribute in the DiscrepancyContext entity type to specify the navigation criteria applied in the downstream.
Yes
TargetRoot
Attribute in the DiscrepancyContext entity type to specify the root part of the downstream structure.
Yes
TargetPart
Attribute in the DiscrepancyContext entity type to specify the parent part of a downstream structure to which you want to paste the copied parts.
Alternatively, you can specify the path of the downstream parent part, that is, TargetPath to which you want to paste the copied parts.
* 
*TargetPart is a required attribute when you want to specify a parent part of the downstream structure that you want to traverse for pasting the copied parts.
Yes*
ChangeOid
Attribute to specify the change task or change notice.
Optional
The request, by default, copies the parts from the specified upstream structure and pastes those as is to the downstream or it copies and pastes the parts based on the restructuring rules applied in the custom logic. The request creates new equivalence links between the downstream BOM and the upstream BOM.
POST Windchill/servlet/odata/BomTransformation/GenerateDownstreamStructure
For example, the following is the response:
{
"@odata.context": "$metadata#EquivalentUsageAssociations",
"value": [
{
"UpstreamPartId": "OR:wt.part.WTPart:189986",
"DownstreamPartId": "OR:wt.part.WTPart:189986",
"EquivalenceLinkId": "OR:wt.associativity.EquivalenceLink:190604",
"UsageLinkId": "OR:wt.part.WTPartUsageLink:190605"
}
],
"@PTC.AppliedContainerContext.LocalTimeZone": "Europe/Warsaw"
}
The attributes in the response for the GenerateDownstreamStructure action are described in the following table:
Response Attribute
Description
UpstreamPartId
Attribute in a collection that returns the ID of the upstream part which was copied.
DownstreamPartId
Attribute in a collection that returns the ID of the downstream equivalent part.
EquivalenceLinkId
Attribute in a collection that returns the ID of the equivalence link between the upstream part and the downstream equivalent part.
UsageLinkId
Attribute in a collection that returns the ID of the usage link between the downstream parent part and the added downstream part.