I have a need to view an integer from my ChangeRequest and make a decision based on the value. I have part of the code below, but do not know how to complete getting the value and then comparing it. The value comes from an Attribute (FinalCost) that is assigned to the ChangeRequest and is defined as an integer.
public static String getECRTotalCost(WTChangeRequest2 primaryBusinessObject)
throws WTException {
String result = ";
wt.change2.WTChangeRequest2 tc = (wt.change2.WTChangeRequest2) primaryBusinessObject;
wt.iba.value.IBAHolder ibaHolder = (wt.iba.value.IBAHolder)tc;
ibaHolder = wt.iba.value.service.IBAValueHelper.service.refreshAttributeContainer(ibaHolder, null, null, null);
wt.iba.value.DefaultAttributeContainer attributeContainer = (wt.iba.value.DefaultAttributeContainer)ibaHolder.getAttributeContainer();
wt.iba.definition.service.StandardIBADefinitionService defService = new wt.iba.definition.service.StandardIBADefinitionService();
wt.iba.definition.litedefinition.AttributeDefDefaultView attributeDefinition = defService.getAttributeDefDefaultViewByPath("FinalCost");
wt.iba.value.litevalue.AbstractValueView svc = attributeContainer.getAttributeValues(attributeDefinition)[0];
?????????????????????????????????????
if (svcint == (5000))
{result = "Low";}
else if (svcint >=(5000) && svcint <=(25000))
{result = "Med";}
else
{result = "High";}
return result;
}
any help would be appreciated.
Regards,
James Little
CAD Administrator
Corning Cable Systems
james.little@corning.com