Windchill REST Services Domain Capabilities > Examples for Basic REST Operations > Examples for the PTC Change Management Domain > Creating a Change Task with Affected Objects for an Existing Change Notice
Creating a Change Task with Affected Objects for an Existing Change Notice
You can create a Change Task with one or more Affected Objects for an existing Change Notice by providing the Change Notice OID, the Changeables OIDs that you want to add as Affected Objects, and the required attributes in the request body. To create such a Change Task, you must have Create permission.
The Affected Objects that you want to add must exist and you must have Read permissions to those. You can add the Affected 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.
 
You cannot add Change Management Revision (BOM Redline) objects as Affected Objects.
Example: Creating a Change Task with Multiple Affected Objects
This example shows you how to create a Change Task with multiple Affected Objects for an existing Change Notice specified in the request body.
In this example, the request creates a Change Task with four Changeables (here, parts) added as Affected Objects.
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')"
]
}
When you do not specify the Changeables OIDs, the request creates a Change Task for the specified Change Notice but with no Affected Objects added to it.