//GET a boolean
//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 Bool (undefined)
try
{
//Defines a attributeDefinition of type AttributeDefDefaultView that gets the variable in question (logical name in type/atribute manager. This case "PBOBooleanAttr"
wt.iba.definition.litedefinition.AttributeDefDefaultView attributeDefinition=defService.getAttributeDefDefaultViewByPath("PBOBooleanAttr");
System.out.println("Size:"+attributeContainer.getAttributeValues(attributeDefinition).length);

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

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

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


//Set a boolean
//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 Bool (undefined)
try 
{
//Defines a attributeDefinition of type AttributeDefDefaultView that gets the variable in question (logical name in type/atribute manager. This case "PBOBooleanAttr"
wt.iba.definition.litedefinition.AttributeDefDefaultView attributeDefinition=defService.getAttributeDefDefaultViewByPath("PBOBooleanAttr");
System.out.println("Size:"+attributeContainer.getAttributeValues(attributeDefinition).length);

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

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

//Updates the Attributevalue (refresh to check for more) 
attributeContainer.updateAttributeValue(attValue);
System.out.println("Value is now "+ attValue.isValue());
 
//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());
}