SubcontractToPlants
The SubcontractToPlants action enables you to subcontract parts and sub-assemblies to other plants. The action is available in the upstream and downstream views of the BOM Transformer. To use this action, a plant from the correct context should be assigned to the parts and sub-assemblies that you want to subcontract.
You can also subcontract the parts and sub-assemblies in the context of change (change task or change notice).
Before initiating the action, set appropriate plant values in the Views with Specific Plant Data preference in the Windchill UI. Optionally, set appropriate values in the List of Plant-Specific Views preference in the Windchill UI.
See the Subcontracting Plants topic in the Windchill Help Center, for more information.
The attributes in the request payload of the SubcontractToPlants 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 or downstream structure from which you want to specify the parent parts for subcontracting.
* 
DiscrepancyContext runs a discrepancy check internally to detect if an upstream or downstream branch already exists for the plant view of the source part that you want to subcontract.
It then returns whether the specified source part can be subcontracted to the plant in the target structure or not.
Yes
SourcePartSelection
Attribute in the DiscrepancyContext entity type to specify the parent Part that you want to subcontract.
Alternatively, you can specify the Path of the parent part that you want to subcontract.
* 
SourcePartSelection is a collection for specifying either a single or multiple parent parts or their paths from an upstream or a downstream structure.
Yes
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 target root part.
When SourceRoot is a root part of the upstream structure, TargetRoot is the root part of the downstream structure.
When SourceRoot is a root part of the downstream structure, TargetRoot is the root part of the upstream structure.
* 
*TargetRoot is a required attribute when copying a part to be subcontracted from the upstream view to a part in the downstream view.
Yes*
TargetPart
Attribute in the DiscrepancyContext entity type to specify the target part (upstream or downstream) to which you want to subcontract the source parts.
* 
*TargetPart is a required attribute when copying a part to be subcontracted from the upstream view to a part in the downstream view.
Yes*
TargetPath
Attribute in the DiscrepancyContext entity type to specify the path of the target (upstream or downstream) part.
Optional
Views
Attribute to specify the plant views to which you want to subcontract the specified parent parts.
* 
Views is a collection of single or multiple plant views either from an upstream structure or a downstream structure.
Yes
ChangeOid
Attribute to specify the change task or change notice.
Optional