Reading Routing Plans for Routables with Navigation Criteria
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 read all the routing plans available in the Site and Organization context.
To read the associated routing plans, you can specify one or more routables, that is, either one or more process plan OIDs or part OIDs in the request body. A routable is either a process plan or a part.
The request returns the process plan, part, and plant information along with their navigation criteria IDs, including other details.
|
A process plan can have multiple routing plans associated with it.
|
Example: Reading a Routing Plan Associated with a Single Process Plan
Consider a process plan with four operations, which you want to localize. Each operation consists of parts, resources, and workstations, and so on.
The following example shows you how to read a routing plan associated with a single process plan by specifying the process plan OID in the request body and using $expand=RoutingPlan in the request URI. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/MfgProcMgmt/GetRoutingPlansForRoutables?$expand=RoutingPlan
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"Routables": [
{
"ID": "OR:com.ptc.windchill.mpml.processplan.MPMProcessPlan:698425')"
}
]
}
The request returns the specified process plan OID and details for the routing plan associated with the specified process plan object. The routing plan details include information about the process plan, parts, resources, workstations, and the plants with which the workstations are associated.
URI with Expand on RoutingAssignmentLink
A RoutingAssignmentLink is a link between a routing plan and a routable.
POST /Windchill/servlet/odata/MfgProcMgmt/GetRoutingPlansForRoutables?$expand=RoutingPlan($expand=RoutingAssignmentLink)
URI with Expand on Routable
POST /Windchill/servlet/odata/MfgProcMgmt/GetRoutingPlansForRoutables?$expand=RoutingPlan($expand=RoutingAssignmentLink($expand=Routable))
URI with Expand on Plant
You can expand on Plant to retrieve information about process plan, part, and plant with navigation criteria.
POST /Windchill/servlet/odata/MfgProcMgmt/GetRoutingPlansForRoutables?$expand=RoutingPlan($expand=Plant)
URI with Expand on RoutingMilestoneLink, RoutingPrecedenceLink, RoutingArtifactLink
POST /Windchill/servlet/odata/MfgProcMgmt/GetRoutingPlansForRoutables?$expand=RoutingPlan($expand=RoutingMilestoneLink,RoutingPrecedenceLink,RoutingArtifactLink)
URI with Expand on RoutingMilestone
The RoutingMilestone navigation retrieves information about localization and routing milestone groups, which represent the workstations.
POST /Windchill/servlet/odata/MfgProcMgmt/GetRoutingPlansForRoutables?$expand=RoutingPlan($expand=RoutingMilestone)
URI with Expand on RoutingOperation
You can expand on RoutingOperation to retrieve information about routing operations for localization details.
POST /Windchill/servlet/odata/MfgProcMgmt/GetRoutingPlansForRoutables?$expand=RoutingPlan($expand=RoutingMilestone($expand=RoutingOperation))
URI with Expand on RoutingWorkCenter
POST /Windchill/servlet/odata/MfgProcMgmt/GetRoutingPlansForRoutables?$expand=RoutingPlan($expand=RoutingMilestone($expand=RoutingWorkCenter))
URI with Expand on RoutingOperation, RoutingWorkCenter
POST /Windchill/servlet/odata/MfgProcMgmt/GetRoutingPlansForRoutables?$expand=RoutingPlan($expand=RoutingMilestone($expand=RoutingOperation,RoutingWorkCenter))
URI with Expand on MPMCompatibilityLinks
You can retrieve the details for compatibility links, for example, when workstations have mandatory compatibility with tools.
POST /Windchill/servlet/odata/MfgProcMgmt/GetRoutingPlansForRoutables?$expand=RoutingPlan($expand=RoutingMilestone($expand=RouteHolder($expand=MPMCompatibilityLinks))
URI to Read All Information About Routing Plans
POST /Windchill/servlet/odata/MfgProcMgmt/GetRoutingPlansForRoutables?$expand=RoutingPlan($expand=Plant,RoutingAssignmentLink($expand=Routable),RoutingMilestone($expand=RoutingOperation,RouteHolder),RoutingMilestoneLink,RoutingPrecedenceLink,RoutingArtifactLink)
Example: Reading Routing Plans Associated with Multiple Process Plans
The following example shows you how to read routing plans associated with two process plans by specifying the two process plan OIDs in the request body and using $expand=RoutingPlan in the request URI. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/MfgProcMgmt/GetRoutingPlansForRoutables?$expand=RoutingPlan
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"Routables": [
{
"ID": "OR:com.ptc.windchill.mpml.processplan.MPMProcessPlan:698425')"
},
{
"ID": "OR:com.ptc.windchill.mpml.processplan.MPMProcessPlan:698435')"
}
]
}
The request returns each specified process plan OID along with the details of each associated routing plan.