Creating a Change Task with Affected or Resulting Objects for an Existing Change Notice
You can create a Change Task with one or more Affected Objects or Resulting Objects for an existing Change Notice by providing the Change Notice OID, Changeables OIDs that you want to add as Affected Objects or Resulting Objects, and required attributes in the request body. To create such a Change Task, you must have Create permission.
The Affected Objects or Resulting Objects that you want to add must exist and you must have Read permissions to those. You can add the Affected Objects or Resulting Objects according to the defined association rules.
You can add any of the Changeables such as parts, documents, subtypes of parts, or subtypes of documents as Affected Objects or Resulting Objects.
|
You cannot add Change Management Revision (BOM Redline) objects as Affected Objects or Resulting Objects to a Change Task. If you specify any such objects to be added as Affected Objects or Resulting Objects, the request fails and returns an error.
|
Example: Creating a Change Task with Multiple Affected Objects
This example shows you how to create a Change Task with multiple Affected Objects for the Change Notice specified in the request body. In this example, the request creates a Change Task with four Changeable objects (parts, in this example) as its Affected Objects for the given Change Notice. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/ChangeMgmt/ChangeTasks
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"Name": "CT12",
"ChangeNotice@odata.bind": "ChangeNotices('OR:wt.change2.WTChangeOrder2:265068')",
"AffectedObjects@odata.bind": [
"Changeables('OR:wt.part.WTPart:122556')",
"Changeables('OR:wt.part.WTPart:123864')",
"Changeables('OR:wt.part.WTPart:123833')",
"Changeables('OR:wt.part.WTPart:123771')"
],
"Assignee@odata.bind": [
"Users('OR:wt.org.WTUser:12')"
],
"Reviewer@odata.bind": [
"Users('OR:wt.org.WTUser:12')"
]
}
If you do not specify Changeables OIDs, then the request creates a Change Task but does not add Affected Objects to it.
Example: Creating a Change Task with Multiple Resulting Objects
This example shows you how to create a Change Task with multiple Resulting Objects for the Change Notice specified in the request body. In this example, the request creates a Change Task with four Changeable objects (parts, in this example) as its Resulting Objects for the given Change Notice. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/ChangeMgmt/ChangeTasks
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"Name": "CT12",
"ChangeNotice@odata.bind": "ChangeNotices('OR:wt.change2.WTChangeOrder2:265068')",
"ResultingObjects@odata.bind": [
"Changeables('OR:wt.part.WTPart:122556')",
"Changeables('OR:wt.part.WTPart:123864')",
"Changeables('OR:wt.part.WTPart:123833')",
"Changeables('OR:wt.part.WTPart:123771')"
],
"Assignee@odata.bind": [
"Users('OR:wt.org.WTUser:12')"
],
"Reviewer@odata.bind": [
"Users('OR:wt.org.WTUser:12')"
]
}
If you do not specify Changeables OIDs, then the request creates a Change Task but does not add Resulting Objects to it.