Inserting Operations After an Operation
You can create single or multiple Operations or its subtypes after an Operation, by specifying the required and other OOTB attributes in the request body. You can also specify both modeled and other types of attributes, including IBAs such as enumerated lists. You can create Operations in the context of an Operation Holder associated with the Operation. To insert an Operation after an Operation, you must checkout the Operation Holder object.
|
You cannot create Operations after a Standard Operation.
|
Example: Creating Multiple Operations After an Operation
This example shows you how to create two Operation objects after an Operation by specifying the Operation OID in the request URI. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/MfgProcMgmt/Operations('OR:com.ptc.windchill.mpml.processplan.operation.MPMOperation:238077')/PTC.MfgProcMgmt.InsertNewOperations
Request Header
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"Operations": [
{
"ERPSubOperationPublished": true,
"Category": {
"Value": "production1",
"Display": "production1"
},
"Scheduled": true,
"Quantity": 0,
"Unit": "ea",
"DefaultTraceCode": "0",
"SubOperationInWorkInstruction": true,
"Name": "operationF",
"InspectionNeeded": true,
"OutSourced": true,
"SubOperationTimeIncluded": true,
"Context@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:113012')"
},
{
"ERPSubOperationPublished": true,
"Category": {
"Value": "production2",
"Display": "productio2"
},
"Scheduled": true,
"Quantity": 0,
"Unit": "ea",
"DefaultTraceCode": "0",
"SubOperationInWorkInstruction": true,
"Name": "operationS",
"InspectionNeeded": true,
"OutSourced": true,
"SubOperationTimeIncluded": true,
"Context@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:113013')"
}
]
}