Updating Attributes of Sequence
To update the Description attribute of an existing Sequence object or its subtype, you must first check out the object. You can also update modeled and all other types of attributes, including IBAs such as enumerated lists.
If you perform Undo Checkout on the Sequence object, the changes are rolled back. When you update the Sequence object, the version of the Sequence object will be iterated upon checking it in. You can specify the OID of any iteration/revision/view of the Sequence object or its subtype.
To update an attribute, you must specify the value with its valid internal name. If a constraint is applied to the attribute, you must specify the internal name of the value specified in the constraint.
If you want to clear the value of an attribute, you can specify its value as null in the request.
If you do not specify an attribute in the request body, then the attribute retains its existing value.
* 
You cannot modify the following attributes: Name, Number, Category, Unit.
Example: Updating Attributes of a Sequence
This example shows you how to update the attributes of a Sequence object. Use the following PATCH URI with the request body.
URI
PATCH /Windchill/servlet/odata/MfgProcMgmt/Sequences('OR:com.ptc.windchill.mpml.processplan.sequence.MPMSequence:300107')
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"Description": "Sequence1",
"CustomAttributeForSeq": "TestSeq"
}
Example: Updating Attributes of Multiple Sequences
This example shows you how to update the attributes of two Sequence objects specified in the request body. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/MfgProcMgmt/UpdateSequences
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"Sequences": [
{
"ID": "OR:com.ptc.windchill.mpml.processplan.sequence.MPMSequence:300107",
"Description": "Seq2",
"CustomAttributeForSeq": "Test2"
},
{
"ID": "OR:com.ptc.windchill.mpml.processplan.sequence.MPMSequence:300116",
"Description": "Seq3",
"CustomAttributeForSeq": "Test3"
}
]
}
Updating Sequences in Context of Change
This example shows you how to update two Sequences in the context of Change. In this example, one change task object is specified for each Sequence object in the request body. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/MfgProcMgmt/UpdateSequences
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"Sequences": [
{
"ID": "OR:com.ptc.windchill.mpml.processplan.sequence.MPMSequence:205871",
"Description": "Description1",
"ResultedByObjects@odata.bind": [
"ChangeTasks('VR:wt.change2.WTChangeActivity2:205227')"
]
},
{
"ID": "OR:com.ptc.windchill.mpml.processplan.sequence.MPMSequence:205857",
"Description": "Description2",
"ResultedByObjects@odata.bind": [
"ChangeTasks('VR:wt.change2.WTChangeActivity2:205227')"
]
}
]
}
The request updates and adds the modified Sequence object as a Resultant object to the specified Change object.
Was this helpful?