Set an IBA value to a soft-type into a workflow
Hi,
This is my first question, so please apologize if it's not precise enough.
I'm working on a workflow and I'm wondering how can I define an IBA value of a soft type.
I tried to do with an "Expression" robot, but I lack knowledge about programmatically setting an attribute in Java.
Here is the code I used to get an attribute value.
<code>
if (primaryBusinessObject instanceof wt.doc.WTDocument) {
wt.doc.WTDocument doc=(wt.doc.WTDocument)primaryBusinessObject;
wt.iba.definition.litedefinition.StringDefView def;
def= (wt.iba.definition.litedefinition.StringDefView)wt.iba.definition.service.IBADefinitionHelper.service.getAttributeDefDefaultViewByPath("ATTRIBUTE_NAME");
doc = (wt.doc.WTDocument)wt.iba.value.service.IBAValueHelper.service.refreshAttributeContainer(doc, null, null, null);
wt.iba.value.DefaultAttributeContainer dac = (wt.iba.value.DefaultAttributeContainer)doc.getAttributeContainer();
wt.iba.value.litevalue.AbstractValueView[] avv = dac.getAttributeValues(def);
if(avv != null && avv.length == 1) {
wt.iba.value.litevalue.StringValueDefaultView svdv = (wt.iba.value.litevalue.StringValueDefaultView)avv[0];
String atr=svdv.getValue();
if (atr != null && atr.trim().equals("check_value")){
result="Forward";
}
}
}
</code>
I've read Windchill's API JavaDoc, but there is no mention about "getAttributeDefDefaultViewByPath" for example. Si I'm completely lost.
Please help me understand this part.
Thanks in advance !

