Creating Multiple Standard Operations
You can create single or multiple Standard Operations 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 Standard Operations in the following contexts: Product, Library, and Organization.
You can also assign single-valued or multi-valued security labels for single or multiple Standard Operations.
Example: Creating Multiple Standard Operations
This example shows you how to create one Standard Operation each in the Product Library, and Organization contexts. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/MfgProcMgmt/CreateOperations
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"Operations": [
{
"OutSourced": false,
"SubOperationInWorkInstruction": true,
"ERPSubOperationPublished": true,
"Scheduled": true,
"InspectionNeeded": false,
"SubOperationTimeIncluded": false,
"Unit": "ea",
"Category": {
"Value": "production",
"Display": "Production"
},
"Name": "StandardOperation product",
"DefaultTraceCode": "0",
"Quantity": 1,
"@odata.type": "#PTC.MfgProcMgmt.MPMStandardOperation",
"Context@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:109559')"
},
{
"OutSourced": false,
"SubOperationInWorkInstruction": true,
"ERPSubOperationPublished": true,
"Scheduled": true,
"InspectionNeeded": false,
"SubOperationTimeIncluded": false,
"Unit": "ea",
"Category": {
"Value": "production",
"Display": "Production"
},
"Name": "StandardOperation library",
"DefaultTraceCode": "0",
"Quantity": 1,
"@odata.type": "#PTC.MfgProcMgmt.MPMStandardOperation",
"Context@odata.bind": "Containers('OR:wt.inf.library.WTLibrary:225589')"
},
{
"OutSourced": false,
"SubOperationInWorkInstruction": true,
"ERPSubOperationPublished": true,
"Scheduled": true,
"InspectionNeeded": false,
"SubOperationTimeIncluded": false,
"Unit": "ea",
"Category": {
"Value": "production",
"Display": "Production"
},
"Name": "StandardOperation organization",
"DefaultTraceCode": "0",
"Quantity": 1,
"@odata.type": "#PTC.MfgProcMgmt.MPMStandardOperation",
"Context@odata.bind": "Containers('OR:wt.inf.container.OrgContainer:109315')"
}
]
}
Example: Creating a Standard Operation Subtype
This example shows you how to create a single Standard Operation subtype. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/MfgProcMgmt/CreateOperations
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"Operations": [
{
"OutSourced": false,
"SubOperationInWorkInstruction": true,
"ERPSubOperationPublished": true,
"Scheduled": true,
"InspectionNeeded": false,
"SubOperationTimeIncluded": false,
"Unit": "ea",
"Category": {
"Value": "production",
"Display": "Production"
},
"Name": "StandardOperationSubtype",
"DefaultTraceCode": "0",
"Quantity": 1,
"@odata.type": "#PTC.MfgProcMgmt.StandardOperationSubtype"
}
]
}
Example: Assigning Single-valued Security Label for Multiple Standard Operations
This example shows you how to assign a single-valued security label for each of the two Standard Operations. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/MfgProcMgmt/CreateOperations
Request Header
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"Operations": [
{
"Name": "Operation 1.3.1",
"ERPSubOperationPublished": false,
"Category": {
"Value": "production"
},
"Scheduled": false,
"Unit": "ea",
"SubOperationInWorkInstruction": false,
"DefaultTraceCode": "L",
"Quantity": 1,
"SubOperationTimeIncluded": false,
"InspectionNeeded": false,
"OutSourced": false,
"@odata.type": "#PTC.MfgProcMgmt.MPMStandardOperation",
"Context@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:113009')",
"EXPORTCONTROL": "CUSTOM"
},
{
"Name": "Operation 1.3.2",
"ERPSubOperationPublished": false,
"Category": {
"Value": "production"
},
"Scheduled": false,
"Unit": "ea",
"SubOperationInWorkInstruction": false,
"DefaultTraceCode": "L",
"Quantity": 1,
"SubOperationTimeIncluded": false,
"InspectionNeeded": false,
"OutSourced": false,
"@odata.type": "#PTC.MfgProcMgmt.MPMStandardOperation",
"Context@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:113009')",
"EXPORTCONTROL": "LNC"
}
]
}
Example: Assigning Multi-valued Security Label for Multiple Standard Operations
This example shows you how to assign a multi-valued security label for each of the two Standard Operations. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/MfgProcMgmt/CreateOperations
Request Header
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"Operations": [
{
"Name": "Operation 1.4.1",
"ERPSubOperationPublished": false,
"Category": {
"Value": "production"
},
"Scheduled": false,
"Unit": "ea",
"SubOperationInWorkInstruction": false,
"DefaultTraceCode": "L",
"Quantity": 1,
"SubOperationTimeIncluded": false,
"InspectionNeeded": false,
"OutSourced": false,
"@odata.type": "#PTC.MfgProcMgmt.MPMStandardOperation",
"Context@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:113009')",
"EXPORTCONTROL": "LNC,CUSTOM"
},
{
"Name": "Operation 1.4.2",
"ERPSubOperationPublished": false,
"Category": {
"Value": "production"
},
"Scheduled": false,
"Unit": "ea",
"SubOperationInWorkInstruction": false,
"DefaultTraceCode": "L",
"Quantity": 1,
"SubOperationTimeIncluded": false,
"InspectionNeeded": false,
"OutSourced": false,
"@odata.type": "#PTC.MfgProcMgmt.MPMStandardOperation",
"Context@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:113009')",
"EXPORTCONTROL": "LNC,CUSTOM"
}
]
}