//GET for a Realnumber
//MUST USE java.lang.Double in the Work Flow variable
//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 double 
try
{
//Defines a attributeDefinition of type AttributeDefDefaultView that gets the variable in question (logical name in type/atribute manager. This case "RealNum"
wt.iba.definition.litedefinition.AttributeDefDefaultView attributeDefinition=defService.getAttributeDefDefaultViewByPath("RealNum");
System.out.println("Size:"+attributeContainer.getAttributeValues(attributeDefinition).length);

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

//Sets the RealNum = to previously defined attvalue. !!NOTE:MUST USE getValue() NOT isValue() for real nums 
RealNum=attValue.getValue();
System.out.println("ReamNum");

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


//SET a Realnum
//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 double
try 
{
wt.iba.definition.litedefinition.AttributeDefDefaultView attributeDefinition=defService.getAttributeDefDefaultViewByPath("RealNum");
System.out.println("Size:"+attributeContainer.getAttributeValues(attributeDefinition).length);

wt.iba.value.litevalue.FloatValueDefaultView attValue= (wt.iba.value.litevalue.FloatValueDefaultView)attributeContainer.getAttributeValues(attributeDefinition)[0];
System.out.println("Setting value to "+ RealNum);

attValue.setValue(RealNum);

//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());
}