I'm not sure which direction you're trying to go - from PR to workflow
attribute, or workflow attribute to PR....
The email at bottom says "add a value to PR attribute ATT1"
The email just below says "set workflow variable ATT1 to PR attribute
ECN_SAP" (other way around). For that, it would be more like...
com.ptc.core.lwc.server.LWCNormalizedObject obj = new
com.ptc.core.lwc.server.LWCNormalizedObject(primaryBusinessObject,null,null,
null);
obj.load("ECN_SAP");
Object softAttribValue = obj.get("ECN_SAP");
if (softAttribValue instanceof String) {
ATT1 = (String) softAttribValue;
}
Or if you mean the workflow variable is ATT1, and you wish to push it to the
PR, where the PR's attribute is ECN_SAP, then something close to:
com.ptc.core.lwc.server.LWCNormalizedObject obj = new
com.ptc.core.lwc.server.LWCNormalizedObject(primaryBusinessObject,null,null,
new com.ptc.core.meta.common.UpdateOperationIdentifier());
obj.load("ECN_SAP");
obj.set("ECN_SAP",ATT1);
obj.apply();
wt.fc.PersistenceHelper.manager.modify(primaryBusinessObject);