Setting Pending Effectivities on Process Plans/Operations/Sequences
You can set single or multiple pending effectivities (Date, Lot, Unit, or Serial) on single or multiple Process Plans, Operations, or Sequences and their subtypes in the context of Change.
To set pending effectivities, you must specify the ResultingLink OIDs and the pending effectivities in the request body.
To set the pending effectivity, you must reserve the relevant change task for Edit.
|
The request fails and returns an error if you—
• Do not have Modify permissions to the existing change task related to the ResultingLink object.
• Do not reserve the change task for Edit.
• Specify an invalid object OID.
• Do not provide all required attributes.
• Specify an invalid effectivity context, effectivity range, or effectivity type.
• Provide a Trace Code that is not compatible with the specified effectivity type.
|
Example: Setting Pending Date Effectivities on Multiple Process Plans
This example shows you how to set pending Date effectivities on two Process Plan objects. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/ChangeMgmt/SetPendingEffectivities?$expand=ResultingLinkItem($expand=ResultingObjects,PendingEffectivities)
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"ResultingLinkItem": [
{
"ID": "OR:wt.change2.ChangeRecord2:200348"
},
{
"ID": "OR:wt.change2.ChangeRecord2:203139"
}
],
"PendingEffectivities": [
{
"@odata.type": "#PTC.ChangeMgmt.PendingDateEffectivity",
"EffectivityQualifier": {
"Value": "EXACT",
"Display": "Exact"
},
"PendingDateRange": {
"StartDate": "2021-09-14T00:00:00+02:00",
"EndDate": "2021-09-17T00:00:00+02:00"
}
},
{
"@odata.type": "#PTC.ChangeMgmt.PendingDateEffectivity",
"EffectivityQualifier": {
"Value": "EXACT",
"Display": "Exact"
},
"PendingDateRange": {
"StartDate": "2021-09-19T00:00:00+02:00",
"EndDate": "2021-09-22T00:00:00+02:00"
}
}
]
}
Similarly, you can set other types of pending effectivities.
Example: Setting Pending Lot Effectivities on Multiple Sequences
This example shows you how to set pending Lot effectivities on two Sequence objects. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/ChangeMgmt/SetPendingEffectivities?$expand=ResultingLinkItem($expand=ResultingObjects,PendingEffectivities)
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"ResultingLinkItem": [
{
"ID": "OR:wt.change2.ChangeRecord2:200710"
},
{
"ID": "OR:wt.change2.ChangeRecord2:203495"
}
],
"PendingEffectivities": [
{
"@odata.type": "#PTC.ChangeMgmt.PendingLotEffectivity",
"EffectivityQualifier": {
"Value": "EXACT",
"Display": "Exact"
},
"PendingUnitRange": {
"RangeStart": "61",
"RangeEnd": "70"
}
},
{
"@odata.type": "#PTC.ChangeMgmt.PendingLotEffectivity",
"EffectivityQualifier": {
"Value": "EXACT",
"Display": "Exact"
},
"PendingUnitRange": {
"RangeStart": "121",
"RangeEnd": "130"
}
}
]
}
Similarly, you can set other types of pending effectivities.
Example: Setting Pending Serial Effectivities on Multiple Operations
This example shows you how to set pending Lot effectivities on two Operation objects. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/ChangeMgmt/SetPendingEffectivities?$expand=ResultingLinkItem($expand=ResultingObjects,PendingEffectivities)
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"ResultingLinkItem": [
{
"ID": "OR:wt.change2.ChangeRecord2:200482"
},
{
"ID": "OR:wt.change2.ChangeRecord2:203267"
}
],
"PendingEffectivities": [
{
"@odata.type": "#PTC.ChangeMgmt.PendingSerialNumberEffectivity",
"EffectivityQualifier": {
"Value": "EXACT",
"Display": "Exact"
},
"PendingUnitRange": {
"RangeStart": "70",
"RangeEnd": "80"
}
},
{
"@odata.type": "#PTC.ChangeMgmt.PendingSerialNumberEffectivity",
"EffectivityQualifier": {
"Value": "EXACT",
"Display": "Exact"
},
"PendingUnitRange": {
"RangeStart": "131",
"RangeEnd": "140"
}
}
]
}
Similarly, you can set other types of pending effectivities.