Checking in/Checking Out/Revising/Changing the State of Co-produce Objects
You can check in, check out, revise, perform state change operations on single or multiple Co-produce objects.
Example: Checking out Multiple Co-produce Objects
The following example shows how you can check out two Co-produce objects using the following POST URI with the request body.
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
URI
POST Windchill/servlet/odata/BomTransformation/CheckOutCoproduces
Request Body
{
"Workables": [
{
"ID": "OR:wt.part.WTPart:312935"
},
{
"ID": "OR:wt.part.WTPart:312436"
}
]
}
Example: Checking out a Specific Co-produce Object
The following example shows how you can check out a specific Co-produce object using the following POST URI.
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
URI
POST Windchill/servlet/odata/BomTransformation/Coproduces('OR:wt.part.WTPart:312869')/PTC.BomTransformation.CheckOut
Request Body
{}
Example: Undo Checkout of Multiple Co-produce Objects
This example shows you how to undo check out of two Co-produce objects. Use the following POST URI with the request body.
URI
POST Windchill/servlet/odata/BomTransformation/UndoCheckOutCoproduces
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"Workables": [
{
"ID": "OR:wt.part.WTPart:312935"
},
{
"ID": "OR:wt.part.WTPart:312436"
}
]
}
Example: Undo Checkout of a Specific Co-produce Object
This example shows you how to undo check out of a specific Co-produce object. Use the following POST URI with the request body.
URI
POST Windchill/servlet/odata/BomTransformation/Coproduces('OR:wt.part.WTPart:312869')/PTC.BomTransformation.UndoCheckOut
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{}
Example: Checking in Multiple Co-produce Objects
The following example shows how you can check in two Co-produce objects using the following POST URI with the request body.
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
URI
POST Windchill/servlet/odata/BomTransformation/CheckInCoproduces
Request Body
{
"Workables": [
{
"ID": "OR:wt.part.WTPart:312935"
},
{
"ID": "OR:wt.part.WTPart:312436"
}
]
}
Example: Checking in a Specific Co-produce Object
The following example shows how you can check in a specific Co-produce object using the following POST URI.
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
URI
POST Windchill/servlet/odata/BomTransformation/Coproduces('OR:wt.part.WTPart:312869')/PTC.BomTransformation.CheckIn
Request Body
{}
Example: Changing the State of Multiple Co-produce Objects
The following example shows how you can change the (life cycle) state of two Co-produce objects with multiple versions. In this request, you can specify the OID of only the latest iteration of a particular revision of the object. For example, if one Co-produce object has versions A.1 and A.2 and the other Co-produce object has versions C.1, C.2, and C.3, then the request changes the state only for A.2 and C.3, respectively. Use the following POST URI with the request body.
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
URI
POST Windchill/servlet/odata/BomTransformation/SetStateCoproduces
Request Body
{
"Coproduces": [
{
"ID": "OR:wt.part.WTPart:312901"
},
{
"ID": "OR:wt.part.WTPart:314761"
}
],
"State": {
"Value": "CANCELLED"
}
}
Example: Changing the State of a Specific Co-produce Object
The following example shows how you can change the (life cycle) state of a Co-produce object with multiple versions. In this request, you can specify only the latest iteration of a particular revision of the object. For example, consider a Co-produce object with three iterations of its Revision A – A.1, A.2 and A.3. The request changes the state only for A.3. Use the following POST URI with the request body.
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
URI
POST Windchill/servlet/odata/BomTransformation/Coproduces('OR:wt.part.WTPart:310540')/PTC.BomTransformation.SetState
Request Body
{
"State": {
"Value": "CANCELLED"
}
}
Revising Multiple Co-produce Objects
This example shows you how to increment the revision of each of the two Co-produce objects, by one. For example, if you specify the OID of one Co-produce object of Revision M and the OID of other Co-produce object of Revision C in the request body, then the request revises the objects to Revision N and Revision D, respectively. Use the following POST URI with the request body.
|
If you want to revise each of the two objects simultaneously from Revision A to J, then you must send the request nine times by replacing the older Revision OIDs of the objects with their newer Revision OIDs in each subsequent request. For example, if you send the first request that revises the objects from Revision A to B, then in the second request, you must specify the OIDs of Revision B in the request body to revise the objects from Revision B to C. Similarly, in the third request, you must specify the OIDs of Revision C to revise the objects from Revision C to D, and so on.
|
URI
POST /Windchill/servlet/odata/BomTransformation/ReviseCoproduces
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"Coproduces": [
{
"ID": "OR:wt.part.WTPart:312901"
},
{
"ID": "OR:wt.part.WTPart:312851"
}
]
}
Revising a Specific Co-produce Object
This example shows how you can revise a specific Co-produce object to the desired Revision directly. For example, if the existing Revision of the object is B, then the request revises the specified Co-produce object to Revision P, directly. Use the following POST URI.
URI
POST /Windchill/servlet/odata/BomTransformation/Coproduces('OR:wt.part.WTPart:312854')/PTC.BomTransformation.Revise
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"VersionId": "P"
}
Retrieving Check out Allowed Information for a Co-produce Object
This example shows you how to retrieve check out allowed information for a Co-produce object. Use the following GET URI.
URI
GET /Windchill/servlet/odata/BomTransformation/Coproduces('OR:wt.part.WTPart:310540')/PTC.BomTransformation.IsCheckoutAllowed()