How to retrieve the "promoted from state" for promotion targets using an expression robot in a promotion request workflow
We are using Windchill 10.2 M030.
I need to know how to retrieve the "promoted from state" for promotion targets/objects in a promotion request. I know how to query the promotion targets and get attribute values from them, but I have not been able to find where the "promoted from state" value is stored or how to retrieve it.
For example, if an object is submitted for promotion from the "INWORK" state to the "RELEASED" state, I want to retrieve the "INWORK" state value.
Here is the code I am using to get the promotion targets and some of the code for processing them:
wt.maturity.PromotionNotice pn = (wt.maturity.PromotionNotice)primaryBusinessObject;
wt.maturity.StandardMaturityService p = new wt.maturity.StandardMaturityService();
wt.fc.QueryResult pn_targets = (wt.fc.QueryResult) p.getPromotionTargets(pn);
while (pn_targets.hasMoreElements()) {
Object myObject = pn_targets.nextElement();
typeName = wt.type.TypedUtilityServiceHelper.service.getExternalTypeIdentifier((wt.type.Typed)myObject); // store object type
}

