//GET for a String
//Declares a ibaHolder of type IBAHolder and sets it equal to IBAHolder of the PBO from the function refreshAttributeContainer
wt.iba.value.IBAHolder ibaHolder=wt.iba.value.service.IBAValueHelper.service.refreshAttributeContainer((wt.iba.value.IBAHolder)primaryBusinessObject, null, null, null); 

//Declares a DefService of type StandardIBADefinitionService and sets it to StandardIBADefinitionService function
wt.iba.definition.service.StandardIBADefinitionService defService=new wt.iba.definition.service.StandardIBADefinitionService();

//Declares a attributeContainer of type DefaultAttributeContainer and gets the container with the function getAttributeContainer()
wt.iba.value.DefaultAttributeContainer attributeContainer=(wt.iba.value.DefaultAttributeContainer)ibaHolder.getAttributeContainer();

//Try Block used to catch a blank String 
try
{
//Defines a attributeDefinition of type AttributeDefDefaultView that gets the variable in question (logical name in type/atribute manager. This case "StringVar"
wt.iba.definition.litedefinition.AttributeDefDefaultView attributeDefinition=defService.getAttributeDefDefaultViewByPath("StringVar");
System.out.println("Size:"+attributeContainer.getAttributeValues(attributeDefinition).length);

//Declares attValue of type StringValueDefaultView (string, change for diff values) and sets it equal to the getAttributeValues function
wt.iba.value.litevalue.StringValueDefaultView attValue= (wt.iba.value.litevalue.StringValueDefaultView)attributeContainer.getAttributeValues(attributeDefinition)[0];

//Sets the StringVar = to previously defined attvalue. !!NOTE:MUST USE getValue() NOT isValue() for strings 
StringVar=attValue.getValue();
System.out.println("StringVar");
 }
 catch (Exception e)
 {
   System.out.println("Error getting attribute value,"+e.getMessage());
 }

//SET a String
//Declares a ibaHolder of type IBAHolder and sets it equal to IBAHolder of the PBO from the function refreshAttributeContainer
wt.iba.value.IBAHolder ibaHolder=wt.iba.value.service.IBAValueHelper.service.refreshAttributeContainer((wt.iba.value.IBAHolder)primaryBusinessObject, null, null, null);
 
//Declares a DefService of type StandardIBADefinitionService and sets it to StandardIBADefinitionService function
wt.iba.definition.service.StandardIBADefinitionService defService=new wt.iba.definition.service.StandardIBADefinitionService();

//Declares a attributeContainer of type DefaultAttributeContainer and gets the container with the function getAttributeContainer()
wt.iba.value.DefaultAttributeContainer attributeContainer=(wt.iba.value.DefaultAttributeContainer)ibaHolder.getAttributeContainer();


//Try Block used to catch a blank String
try 
{
//Defines a attributeDefinition of type AttributeDefDefaultView that gets the variable in question (logical name in type/atribute manager. This case "StringVar"
wt.iba.definition.litedefinition.AttributeDefDefaultView attributeDefinition=defService.getAttributeDefDefaultViewByPath("StringVar");
System.out.println("Size:"+attributeContainer.getAttributeValues(attributeDefinition).length);

//Declares attValue of type StringValueDefaultView (String, change for diff values) and sets it equal to the getAttributeValues function
wt.iba.value.litevalue.StringValueDefaultView attValue= (wt.iba.value.litevalue.StringValueDefaultView)attributeContainer.getAttributeValues(attributeDefinition)[0];
System.out.println("Setting value to "+ StringVar);

//Sets StringVar = to the value of the perviously decalred attValue through the isValue() function 
attValue.setValue(StringVar);

//Updates the Attributevalue (refresh to check for more) 
attributeContainer.updateAttributeValue(attValue);
System.out.println("Value is now "+ attValue.getValue());

//Saves it to the PBO without this, user will not see an update on the screen
wt.fc.PersistenceHelper.manager.save(primaryBusinessObject);

}
catch (Exception e)
{
  System.out.println("Error getting attribute value,"+e.getMessage());
}