Info*Engine Groups
The serializable objects used for manipulating Info*Engine groups stores the values of the webject CLASS and GROUP_OUT parameters that were specified when the group was created. The value of the CLASS parameter is used to define the element name for the root element of the group data, and the value of the GROUP_OUT parameter is used as the NAME attribute for this element. For example, if a CLASS parameter is set to “DemoGrp” and the GROUP_OUT parameter is set to “salesGrp,” then Info*Engine generates the following XML document elements:
<?xml version="1.0" encoding="UTF-8" ?>
<wc:COLLECTION xmlns:wc="http://www.ptc.com/infoengine/1.0">
<DemoGrp NAME="salesGrp" TYPE="Object" STATUS="0">
</DemoGrp>
</wc:COLLECTION>
If the webject CLASS parameter is undefined or omitted, then Info*Engine uses “Unknown-Class-Name” as the element name. Though it is not technically an error to omit the CLASS parameter, the task writer should always include the CLASS parameter. Omitting the CLASS parameter makes the XML document vague. For example the following XML elements define two groups of information: “employees” and an unnamed group. In the example, it is more difficult to understand what data the unnamed group represents:
<wc:COLLECTION xmlns:wc="http://www.ptc.com/infoengine/1.0">
<Employees NAME="group1" TYPE="Object" STATUS="0"/>
</Employees>
<Unknown-Class-Name NAME="group2" TYPE="Object" STATUS="0"/>
</Unknown-Class-Name>
</wc:COLLECTION>
The group element contains two other attributes: TYPE and STATUS. The TYPE attribute indicates the group type. For data groups, this value is always Object. The STATUS attribute indicates the completion status for the generation of this group. A status of zero (0) indicates that no errors occurred. A non-zero value indicates that data is incomplete due to some error. Although the status values for groups no longer need to be checked, the STATUS attribute remains for backward compatibility. Info*Engine currently throws an exception whenever a webject cannot generate the requested group.