Windchill REST Services > Windchill REST Services Framework Capabilities > Getting Information About Windchill Life Cycle States
Getting Information About Windchill Life Cycle States
Business information and objects become more mature throughout the product development cycle. As the object progresses in the cycle, it moves through various life cycle states of maturity. In Windchill, every object type can have a unique set of life cycle states.
The life cycle administrator in Windchill can create various life cycle states for an object, and can associate these states with a template. A business object which has a life cycle template associated with it can transition between the defined life cycle states.
The function GetValidStateTransitions() returns the life cycle states that the entity can transition from its current state. The life cycle states are retrieved as EnumType.
The function is bound to an entity that has a life cycle template associated with it. The function is available for all the entities that are life cycle managed. The list of life cycle states returned by the function depends on the life cycle template which is associated to the bound entity.
If the URL used to execute the function is not formed correctly, the function throws the URL malformed exception.
A bound function GetLifeCycleTemplate() is available on entities which inherit the lifecycleManaged capability. This function returns the life cycle template associated with the lifecycle managed, along with all its states. The list of states is an array of Complex Type PTC.EnumType.
This function can be used to show all states such as In Work, Released, Canceled for a given object, similar to the Windchill Information Page.
Refer the following example:
Request
GET /v6/ProdMgmt/Parts(‘<PartOID>’)/PTC.ProdMgmt.GetLifeCycleTemplate()
Response
{
"@odata.context": "http://vagrant.ptcnet.ptc.com:2280/Windchill/servlet/odata/v6/ProdMgmt/$metadata#PTC.LifeCycleTemplate",
"@PTC.AppliedContainerContext.LocalTimeZone": "America/Chicago",
"Name": "test_template_name",
"States": [
{
"Value": "WIP",
"Display": "Work In Progress"
},
{
"Value": "WITHDRAWN",
"Display": "Withdrawn"
},
{
"Value": "VERIFICATION REQUIRED",
"Display": "Verification Required"
}
]
}
Was this helpful?