Creating Multiple Process Plans
You can create single or multiple Process Plans or their subtypes by specifying the required and other OOTB attributes in the request body. You can also specify modeled and other types of attributes, including IBAs such as enumerated lists. You can create Process Plans in the following contexts: Product, Library, and Organization. You can also create a Standard Procedure by specifying the value of the Standard attribute to true.
You can also assign single-valued or multi-valued security labels for single or multiple Process Plans.
Example: Creating Multiple Process Plans
This example shows you how to create one Process Plan in the Product context, and one Process Plan and Standard Procedure each in the Library context. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/MfgProcMgmt/CreateProcessPlans
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"ProcessPlans": [
{
"@odata.context": "http://vagrant.ptcnet.ptc.com:2280/Windchill/servlet/odata/v4/MfgProcMgmt/$metadata#ProcessPlans/$entity",
"Name": "procp1",
"Category": {
"Value": "maintenance"
},
"Unit": "ea",
"ProcessPlanQuantity": 2,
"Standard": false,
"Context@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:188444')"
},
{
"@odata.context": "http://vagrant.ptcnet.ptc.com:2280/Windchill/servlet/odata/v4/MfgProcMgmt/$metadata#ProcessPlans/$entity",
"Name": "procp2",
"Category": {
"Value": "production"
},
"Unit": "l",
"ProcessPlanQuantity": 2,
"Standard": false,
"Context@odata.bind": "Containers('OR:wt.inf.library.WTLibrary:225589')"
},
{
"@odata.context": "http://vagrant.ptcnet.ptc.com:2280/Windchill/servlet/odata/v4/MfgProcMgmt/$metadata#ProcessPlans/$entity",
"Name": "procp3",
"Category": {
"Value": "repair"
},
"Unit": "kg",
"ProcessPlanQuantity": 2,
"Standard": true,
"Context@odata.bind": "Containers('OR:wt.inf.library.WTLibrary:225589')"
}
]
}
Example: Creating a Single Process Plan
This example shows you how to create a single Process Plan in the Product context. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/MfgProcMgmt/CreateProcessPlans
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"ProcessPlans": [
{
"@odata.context": "http://vagrant.ptcnet.ptc.com:2280/Windchill/servlet/odata/v4/MfgProcMgmt/$metadata#ProcessPlans/$entity",
"Name": "procp1",
"Category": {
"Value": "maintenance"
},
"Unit": "ea",
"ProcessPlanQuantity": 2,
"Standard": false,
"Context@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:188444')"
}
]
}
Example: Creating Multiple Standard Procedures
This example shows you how to create two Standard Procedures in the Product context. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/MfgProcMgmt/CreateProcessPlans
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"ProcessPlans": [
{
"@odata.context": "http://vagrant.ptcnet.ptc.com:2280/Windchill/servlet/odata/v4/MfgProcMgmt/$metadata#ProcessPlans/$entity",
"Name": "procp2",
"Category": {
"Value": "production"
},
"Unit": "l",
"ProcessPlanQuantity": 2,
"Standard": true,
"Context@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:188444')"
},
{
"@odata.context": "http://vagrant.ptcnet.ptc.com:2280/Windchill/servlet/odata/v4/MfgProcMgmt/$metadata#ProcessPlans/$entity",
"Name": "procp3",
"Category": {
"Value": "repair"
},
"Unit": "kg",
"ProcessPlanQuantity": 2,
"Standard": true,
"Context@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:188444')"
}
]
}
Example: Assigning Single-valued Security Label for Multiple Process Plans
This example shows you how to assign a single-valued security label for each of the two Process Plans. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/MfgProcMgmt/CreateProcessPlans
Request Header
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"ProcessPlans": [
{
"Name": "Process Plan 1.3.1",
"Standard": false,
"OccurrenceLevel": false,
"ProcessPlanQuantity": 0,
"Unit": "ea",
"Context@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:113009')",
"EXPORTCONTROL": "CUSTOM"
},
{
"Name": "Process Plan 1.3.2",
"Standard": false,
"OccurrenceLevel": false,
"ProcessPlanQuantity": 0,
"Unit": "ea",
"Context@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:113009')",
"EXPORTCONTROL": "LNC"
}
]
}
Example: Assigning Multi-valued Security Label for Multiple Process Plans
This example shows you how to assign a multi-valued security label for each of the two Process Plans. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/MfgProcMgmt/CreateProcessPlans
Request Header
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"ProcessPlans": [
{
"Name": "Process Plan 1.4.1",
"Standard": false,
"OccurrenceLevel": false,
"ProcessPlanQuantity": 0,
"Unit": "ea",
"Context@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:113009')",
"EXPORTCONTROL": "LNC,CUSTOM"
},
{
"Name": "Process Plan 1.4.2",
"Standard": false,
"OccurrenceLevel": false,
"ProcessPlanQuantity": 0,
"Unit": "ea",
"Context@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:113009')",
"EXPORTCONTROL": "LNC,CUSTOM"
}
]
}