Creating Multiple Sequences for a Sequence Holder
You can create single or multiple Sequences or their subtypes for a Sequence Holder (Process Plan or Sequence) 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 also assign single-valued or multi-valued security labels for single or multiple Sequences.
You can also create single or multiple Sequences in the context of Change.
|
To create a Sequence for a Sequence Holder, the specified Sequence Holder object must have at least one Operation.
|
Example: Creating Multiple Sequences for a Process Plan
This example shows you how to create two Sequences for a Process Plan object specified in the request URI. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/MfgProcMgmt/ProcessPlans('OR:com.ptc.windchill.mpml.processplan.MPMProcessPlan:223064')/PTC.MfgProcMgmt.CreateMPMSequencesInProcessPlanContext
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"SequencesToCreate": [
{
"Name": "Sequence 1.1.01",
"Category": {
"Value": "parallel"
},
"Unit": {
"Value": "ea"
},
"ReturnOperation": "com.ptc.windchill.mpml.processplan.operation.MPMOperation:224146",
"Context@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:113009')",
"CustomBoolean": true
},
{
"Name": "Sequence 1.1.02",
"Category": {
"Value": "alternate"
},
"Unit": {
"Value": "kg"
},
"ReturnOperation": "com.ptc.windchill.mpml.processplan.operation.MPMOperation:224626",
"Context@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:113009')"
}
]
}
Example: Creating Multiple Sequence Subtypes for a Process Plan
This example shows you how to create two Sequence subtypes for a Process Plan object specified in the request URI. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/MfgProcMgmt/ProcessPlans('OR:com.ptc.windchill.mpml.processplan.MPMProcessPlan:223064')/PTC.MfgProcMgmt.CreateMPMSequencesInProcessPlanContext
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"SequencesToCreate": [
{
"Name": "Sequence 3.1.01",
"Category": {
"Value": "parallel"
},
"Unit": {
"Value": "ea"
},
"ReturnOperation": "com.ptc.windchill.mpml.processplan.operation.MPMOperation:224146",
"Context@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:113009')",
"@odata.type": "#PTC.MfgProcMgmt.SequenceSubtype"
},
{
"Name": "Sequence 3.1.02",
"Category": {
"Value": "alternate"
},
"Unit": {
"Value": "kg"
},
"ReturnOperation": "com.ptc.windchill.mpml.processplan.operation.MPMOperation:224146",
"Context@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:113009')",
"@odata.type": "#PTC.MfgProcMgmt.SequenceSubtype"
}
]
}
Example: Creating Multiple Sequences for a Sequence
This example shows you how to create two Sequences for a Sequence object specified in the request URI. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/MfgProcMgmt/Sequences('OR:com.ptc.windchill.mpml.processplan.sequence.MPMSequence:223116')/PTC.MfgProcMgmt.CreateMPMSequencesInSequenceContext
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"SequencesToCreate": [
{
"Name": "Sequence 1.2.01",
"Category": {
"Value": "alternate"
},
"Unit": {
"Value": "ea"
},
"ReturnOperation": "OR:com.ptc.windchill.mpml.processplan.operation.MPMOperation:223125",
"Context@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:113009')"
},
{
"Name": "Sequence 1.2.02",
"Category": {
"Value": "parallel"
},
"Unit": {
"Value": "kg"
},
"ReturnOperation": "OR:com.ptc.windchill.mpml.processplan.operation.MPMOperation:223125",
"Context@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:113009')"
}
]
}
Example: Creating a Single Sequence for a Sequence
This example shows you how to create a single Sequence for a Sequence object specified in the request URI. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/MfgProcMgmt/Sequences('OR:com.ptc.windchill.mpml.processplan.sequence.MPMSequence:223116')/PTC.MfgProcMgmt.CreateMPMSequencesInSequenceContext
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"SequencesToCreate": [
{
"Name": "Sequence 2.2.01",
"Category": {
"Value": "alternate"
},
"Unit": {
"Value": "ea"
},
"ReturnOperation": "OR:com.ptc.windchill.mpml.processplan.operation.MPMOperation:223125",
"Context@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:113009')"
}
]
}
Example: Assigning Single-valued Security Label for Sequences in Context of a Specific Process Plan
This example shows you how to assign a single-valued security label for each of the two Sequences in the context of a Process Plan. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/MfgProcMgmt/ProcessPlans('OR:com.ptc.windchill.mpml.processplan.MPMProcessPlan:351564')/PTC.MfgProcMgmt.CreateMPMSequencesInProcessPlanContext
Request Header
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"SequencesToCreate": [
{
"Name": "Sequence 1.1.1",
"Unit": {
"Value": "ea"
},
"Category": {
"Value": "Parallel"
},
"ReturnOperation": "OR:com.ptc.windchill.mpml.processplan.operation.MPMOperation:351574",
"EXPORTCONTROL": "LNC"
},
{
"Name": "Sequence 2.2.2",
"Unit": {
"Value": "ea"
},
"Category": {
"Value": "Parallel"
},
"ReturnOperation": "OR:com.ptc.windchill.mpml.processplan.operation.MPMOperation:351574",
"EXPORTCONTROL": "LNC"
}
]
}
Example: Assigning Security Labels for Sequences in Context of a Specific Sequence
This example shows you how to assign multiple security labels for each of the two Sequences in the context of a Sequence. Use the following POST URI with the request body
URI
POST /Windchill/servlet/odata/MfgProcMgmt/Sequences('VR:com.ptc.windchill.mpml.processplan.sequence.MPMSequence:351683')/PTC.MfgProcMgmt.CreateMPMSequencesInSequenceContext
Request Header
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"SequencesToCreate": [
{
"Name": "Sequence 1.2",
"Unit": {
"Value": "ea"
},
"Category": {
"Value": "parallel"
},
"ReturnOperation": "OR:com.ptc.windchill.mpml.processplan.operation.MPMOperation:351705",
"Context@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:113008')",
"EXPORTCONTROL": "LNC",
"SecrecyLabel": "KindOfSecret,Secret"
},
{
"Name": "Sequence 2.2",
"Unit": {
"Value": "ea"
},
"Category": {
"Value": "parallel"
},
"ReturnOperation": "OR:com.ptc.windchill.mpml.processplan.operation.MPMOperation:351705",
"Context@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:113008')",
"EXPORTCONTROL": "LNC",
"SecrecyLabel": "KindOfSecret,Secret"
}
]
}