Creating Multiple Process Plans
You can create a 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 a single or multiple standard procedures by specifying the value of the Standard attribute as true. You can create the process plans and standard procedures in the following contexts: Product, Library, and Organization.
Additionally, you can specify the optional attribute, LongDescription, in the request body when creating a single or multiple process plans and standard procedures. You can also optionally create a single or multiple process plans and standard procedures in the context of change (change notice).
You can assign single-valued or multi-valued security labels for a 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://<host>:<port>/Windchill/servlet/odata/v4/MfgProcMgmt/$metadata#ProcessPlans/$entity",
"Name": "procp1",
"Category": {
"Value": "maintenance"
},
"Unit": "ea",
"ProcessPlanQuantity": 2,
"Standard": false,
"LongDescription": "This is a process plan in the 'Product' context.",
"Context@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:188444')",
"ResultedByObjects@odata.bind": "ChangeTasks('VR:wt.change2.WTChangeOrder2:488344')"
},
{
"@odata.context": "http://<host>:<port>/Windchill/servlet/odata/v4/MfgProcMgmt/$metadata#ProcessPlans/$entity",
"Name": "procp2",
"Category": {
"Value": "production"
},
"Unit": "l",
"ProcessPlanQuantity": 2,
"Standard": false,
"LongDescription": "This is a process plan in the 'Library' context.",
"Context@odata.bind": "Containers('OR:wt.inf.library.WTLibrary:225589')"
},
{
"@odata.context": "http://<host>:<port>/Windchill/servlet/odata/v4/MfgProcMgmt/$metadata#ProcessPlans/$entity",
"Name": "procp3",
"Category": {
"Value": "repair"
},
"Unit": "kg",
"ProcessPlanQuantity": 2,
"Standard": true,
"LongDescription": "This is a standard procedure in the 'Library' context.",
"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://<host>:<port>/Windchill/servlet/odata/v4/MfgProcMgmt/$metadata#ProcessPlans/$entity",
"Name": "procp1",
"Category": {
"Value": "maintenance"
},
"Unit": "ea",
"ProcessPlanQuantity": 2,
"Standard": false,
"LongDescription": "This is a process plan in the 'Product' context.",
"Context@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:188444')"
"ResultedByObjects@odata.bind": "ChangeTasks('VR:wt.change2.WTChangeOrder2:488224')"
}
]
}
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://<host>:<port>/Windchill/servlet/odata/v4/MfgProcMgmt/$metadata#ProcessPlans/$entity",
"Name": "procp2",
"Category": {
"Value": "production"
},
"Unit": "l",
"ProcessPlanQuantity": 2,
"Standard": true,
"LongDescription": "This is another standard procedure in the 'Product' context.",
"Context@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:188444')",
"ResultedByObjects@odata.bind": "ChangeTasks('VR:wt.change2.WTChangeOrder2:488554')"
},
{
"@odata.context": "http://<host>:<port>/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"
}
]
}
これは役に立ちましたか?