Business Objects and Data Sources > States > Defining States in XML > BiSONET States

The class IltBiSONETObjectStateSAXInfo is the XML serialization class that allows you to read and write BiSONET states in the XML format.

The following table describes the XML elements that can be used:

Table 12.13 XML Elements in the BiSONET State System 
XML Element 
Attributes 
Possible Values 
Description 
<state> 
None 
Disabled, Inactive, Active, ActiveProtecting, TroubledProtected, TroubledUnprotected 
BiSONET primary state 
<reverseState> 
None 
Disabled, Inactive, Active, ActiveProtecting, TroubledProtected, TroubledUnprotected 
BiSONET reverse state 
<protection> 

 
Exercisor, ForcedSwitch, Locked, ManualSwitch, Pending, WaitToRestore 
BiSONET protection state 

 
from 
true or false 
This is an optional attribute. It defines whether the protection is set in the "from" end point of the link. By default, the value is true

 
to 
true or false 
This is an optional attribute. It defines whether the protection is set in the "to" end point of the link. By default, the value is true

How to Add a Link with a BiSONET State defined in XML
<addObject id="Link1">
  <class>ilog.tgo.model.IltLink</class>
  <link>  <from>PolyGroup</from>    <to>NE3</to>  </link>
  <attribute name="name">Link1</attribute>
  <attribute name="media">Fiber</attribute>
  <attribute name="objectState"
       javaClass="ilog.tgo.model.IltBiSONETObjectState">
    <state>Active</state>
    <reverseState>ActiveProtecting</reverseState>
    <protection from="true">Exercisor</protection>
    <protection to="true">Locked</protection>
  </attribute>
</addObject>
How to Set BiSONET States to an Existing Object using XML

The following example shows how to set BiSONET states to an object that already exists in the data source. You can achieve this by using the XML tag <updateObject> to modify the attribute objectState:

<updateObject id="Link1">
  <attribute name="objectState" javaClass="ilog.tgo.model.IltBiSONETObjectState">
    <state>Active</state>
    <reverseState>ActiveProtecting</reverseState>
    <protection from="true" to="false">Exercisor</protection>
    <protection>Locked</protection>
  </attribute>
</updateObject>
How to Update BiSONET States Incrementally using XML
<updateObject id="Link1">
  <updateState>
    <reverseState>TroubledProtected</reverseState>
    <protection from="false" to="true">Exercisor</protection>
    <protection from="false" to="false">Locked</protection>
  </updateState>
</updateObject>