Creating Routing Plans
A routing plan is an object that acts as a link between the process plan, Bill of Material (BOM), and plant objects. A routing plan enables you to perform localization of a process plan in your plant. For more information, see
Managing Routing Plans.
You can create a single or multiple routing plans for a process plan, part, and plant specified in the request body.
The action also creates assignment links for each routing plan created. Each link associates the routing plan to the corresponding routable specified in the request body. Routables include a process plan and a part. To create the assignment links, you must specify a process plan and a part as routables in the request body.
|
• The release part, process plan, and plant (RouteHolderRef) are required attributes.
• In the Windchill 13.0.2.0 release, PTC does not recommend creating a routing plan without the process plan.
• If you do not specify the OID of the process plan in the request body, the routing plan is created but it is not associated to a process plan. An error is thrown in the process plan browser in Windchill informing you that the action failed.
|
To create routing plans, you must also specify the following in the request body:
• The plant navigation criteria ID for the specified plant.
• The corresponding navigation criteria ID for each specified routable, that is the process plan and part.
Example: Creating a Single Routing Plan
This example shows you how to create a single routing plan by specifying a plant OID, process plan OID, and part OID along with the corresponding navigation criteria ID in the request body. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/MfgProcMgmt/CreateWCRoutingPlans
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"routingPlanItemList": [
{
"routingPlan": {
"@odata.type": "#PTC.MfgProcMgmt.RoutingPlan",
"Organization@odata.bind": "Groups('OR:wt.org.WTOrganization:115984')",
"Context@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:118645')",
"Name": "rpName44",
"LongDescription": "LongDesc",
"Description": "Desc",
"FolderLocation": "/Default/createRP",
"RouteHolderRef": "com.ptc.windchill.mpml.resource.MPMPlant:222069",
"NavigationCriteria": {
"ID": "OR:wt.filter.NavigationCriteria:224018"
}
},
"assignmentLinks": [
{
"Routable": {
"ID": "OR:com.ptc.windchill.mpml.processplan.MPMProcessPlan:222091"
},
"NavigationCriteria": {
"ID": "OR:wt.filter.NavigationCriteria:224018"
}
},
{
"Routable": {
"ID": "OR:wt.part.WTPart:224026"
},
"NavigationCriteria": {
"ID": "OR:wt.filter.NavigationCriteria:224044"
}
}
]
}
]
}
The request creates a routing plan and two assignment links. One link associates the routing plan to the specified part and the other link associates the routing plan to the specified process plan.
Example: Creating Multiple Routing Plans
This example shows you how to create two routing plans. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/MfgProcMgmt/CreateWCRoutingPlans
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"routingPlanItemList": [
{
"routingPlan": {
"@odata.type": "#PTC.MfgProcMgmt.RoutingPlan",
"Organization@odata.bind": "Groups('OR:wt.org.WTOrganization:115984')",
"Context@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:118645')",
"Name": "rpName44",
"LongDescription": "LongDesc",
"Description": "Desc",
"FolderLocation": "/Default/createRP",
"RouteHolderRef": "com.ptc.windchill.mpml.resource.MPMPlant:222069",
"NavigationCriteria": {
"ID": "OR:wt.filter.NavigationCriteria:224018"
}
},
"assignmentLinks": [
{
"Routable": {
"ID": "OR:com.ptc.windchill.mpml.processplan.MPMProcessPlan:222091"
},
"NavigationCriteria": {
"ID": "OR:wt.filter.NavigationCriteria:224018"
}
},
{
"Routable": {
"ID": "OR:wt.part.WTPart:224026"
},
"NavigationCriteria": {
"ID": "OR:wt.filter.NavigationCriteria:224044"
}
}
]
},
{
"routingPlan": {
"@odata.type": "#PTC.MfgProcMgmt.RoutingPlan",
"Organization@odata.bind": "Groups('OR:wt.org.WTOrganization:115984')",
"Context@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:118645')",
"Name": "rpName45",
"LongDescription": "LongDesc",
"Description": "Desc",
"FolderLocation": "/Default/createRP",
"RouteHolderRef": "com.ptc.windchill.mpml.resource.MPMPlant:222069",
"NavigationCriteria": {
"ID": "OR:wt.filter.NavigationCriteria:224019"
}
},
"assignmentLinks": [
{
"Routable": {
"ID": "OR:com.ptc.windchill.mpml.processplan.MPMProcessPlan:222092"
},
"NavigationCriteria": {
"ID": "OR:wt.filter.NavigationCriteria:224019"
}
},
{
"Routable": {
"ID": "OR:wt.part.WTPart:224027"
},
"NavigationCriteria": {
"ID": "OR:wt.filter.NavigationCriteria:224045"
}
}
]
}
]
}
The request creates two routing plans and two assignment links for each of the two routing plans.