Personnalisation avancée > Info*Engine User's Guide (en anglais - Guide de l'utilisateur Info*Engine) > Administrative Webjects > Group Webjects
  
Group Webjects
The following webjects compare, combine, or sort one or more existing groups of data that have been generated as a result of query, action, or other group webjects:
Change-Group
Concat-Groups
Copy-Group
Create-Group
Diff-Groups
Extract-Group
Format-Group
Intersect-Groups
Join-Groups
Merge-Groups
Return-Groups
Set-Identity
Set-Metadata
Sort-Group
Subset-Group
Summarize-Groups
Translate-Group
Union-Groups
XOR-Groups
All group webjects use the GRPtype attribute value in the webject tag.
Change-Group
DESCRIPTION
Changes the name of one or more attributes in a group. The resulting group contains the changed attributes and all attributes not affected by the change.
SYNTAX
<ie:webject name="Change-Group" type="GRP">
  <ie:param name="GROUP_IN" data="value"/>
  <ie:param name="GROUP_OUT" data="group_out_name"/>
  <ie:param name="RENAME" data="'old_name'='new_name'"/>
</ie:webject>
PARAMETERS
Required
Select
Optional
GROUP_IN
GROUP_OUT
RENAME
GROUP_IN
Specifies the name of the group with information to be renamed. This parameter is required.
GROUP_OUT
Specifies the name of the resulting group with renamed information. If GROUP_OUT is specified, the original group is replaced by the output group and is no longer available in the VDB. The default for this parameter is for the attribute changes to be made in the original group. This parameter is optional.
RENAME
Specifies the attribute name to be changed. Specific syntax is required when renaming an attribute. For example, to change the attribute name objectClass to XYZclass, the following RENAME parameter would be specified:
<ie:param name="RENAME" data="'objectClass'='XYZclass'">
As shown above, the value of the RENAME parameter must be enclosed in double quotes. The old name and the new name of the attribute both must be enclosed in single quotes. Attribute names are case insensitive, therefore case is ignored when the parameter searches for the existing attribute name.
This parameter is required.
EXAMPLE
The webject changes the attribute names in the input group named “createdgroup” and adds the “results” group to the local output group collection:
<%@page language="java" session="false"%>
<%@taglib uri="http://www.ptc.com/infoengine/taglib/core" prefix="ie"%>

<!-- Creates input group named createdgroup. -->

<ie:task uri="/com/company/CreateGroup.xml"/>

<!-- Renames attributes in a group. -->

<ie:webject name="Change-Group" type="GRP">
  <ie:param name="GROUP_IN" data="createdgroup"/>
  <ie:param name="RENAME" data="'ADDRESS'='HomeAddress'"/>
  <ie:param name="RENAME" data="'NAME'='FullName'"/>
  <ie:param name="RENAME" data="'EMAIL'='email'"/>
  <ie:param name="GROUP_OUT" data="results"/>
</ie:webject>
The XML output from executing the example is the following:
<?xml version="1.0" encoding="UTF-8"?>
<wc:COLLECTION xmlns:wc="http://www.ptc.com/infoengine/1.0">
<EmployeeData NAME="results" TYPE="Object" STATUS="0">
  <wc:INSTANCE>
    <FullName>Sam Johnson</FullName>
    <HomeAddress>1234 Main St.</HomeAddress>
    <email>sjohnson@somewhere.com</email>
  </wc:INSTANCE>
  <wc:INSTANCE>
    <FullName>Harvy Anderson</FullName>
    <HomeAddress>1234 Amber St.</HomeAddress>
    <email>handerson@somewhere.com</email>
  </wc:INSTANCE>
  <wc:INSTANCE>
    <FullName>James O&apos;Connor</FullName>
    <HomeAddress>775 Main St.</HomeAddress>
    <email></email>
  </wc:INSTANCE>
  <wc:INSTANCE>
    <FullName>Harvey Hampton</FullName>
    <HomeAddress>775 Main St.</HomeAddress>
    <email>hhampton@somewhere.com</email>
  </wc:INSTANCE>
</EmployeeData>
</wc:COLLECTION>
Concat-Groups
DESCRIPTION
Links two groups of data together in a series, allowing duplicate information to appear from both groups.
For example, group A contains the elements u, v, and x and group B contains the elements x, y, and z. The Concat-Groups webject links the elements of groups A and B together, one after the other, to form group C. Group C would then contain the elements u, v, x, x, y, and z.
SYNTAX
<ie:webject name="Concat-Groups" type="GRP">
  <ie:param name="CLASS" data="class"/>
  <ie:param name="GROUP_IN" data="group_name1"/>
  <ie:param name="GROUP_IN" data="group_name2"/>
  <ie:param name="GROUP_OUT" data="output_group_name"/>
</ie:webject>
PARAMETERS
Required
Select
Optional
GROUP_IN
CLASS
GROUP_OUT
CLASS
Specifies the type of the objects contained in the output group named by the GROUP_OUT parameter. For example, if a webject specifies CLASS=MyClassName and GROUP_OUT=data_1, then the XML representation of the output group contains the following tags:
<MyClassName NAME="data_1" TYPE="Object" STATUS="0">
</MyClassName>
The default for this parameter is “Unknown-Class-Name.” This parameter is optional.
GROUP_IN
Specifies the two or more groups that are used in the concatenation. This parameter is required.
GROUP_OUT
Specifies the name of the resulting group. This parameter is required.
EXAMPLE
The following example links the two specified groups together:
<%@page language="java" session="false"%>
<%@taglib uri="http://www.ptc.com/infoengine/taglib/core"
                                               prefix="ie"%>

<!-- Form a group by concatenating two groups -->

<ie:task uri="/com/company/CreateGroup.xml"/>
<ie:task uri="/com/company/CreateGroupHr.xml"/>

<ie:webject name="Concat-Groups" type="GRP">
  <ie:param name="GROUP_IN" data="createdgroup"/>
  <ie:param name="GROUP_IN" data="createhrgroup"/>
  <ie:param name="CLASS" data="ConcatGroup"/>
  <ie:param name="GROUP_OUT" data="results"/>
</ie:webject>
Copy-Group
DESCRIPTION
Copies a group to a new group of a different name. For example, the webject might copy all the data in group “A”, creating a new group called “B” with exactly the same information.
SYNTAX
<ie:webject name="Copy-Group" type="GRP">
  <ie:param name="GROUP_IN" data="group_in_name"/>
  <ie:param name="GROUP_OUT" data="group_out_name"/>
</ie:webject>
PARAMETERS
Required
Select
Optional
GROUP_IN
GROUP_OUT
GROUP_IN
Specifies the name of the group to be copied. This parameter is required.
GROUP_OUT
Specifies the name of the new group that is created. This name must not be identical to the GROUP_IN name. This parameter is required.
EXAMPLE
The following example copies the input group named “createdgroup” into the “results” group and returns both groups (using the Return-Groups webject) to the local output group collection:
<%@page language="java" session="false"%>
<%@taglib uri="http://www.ptc.com/infoengine/taglib/core"
                                               prefix="ie"%>

<!-- Copies a group to a new group. -->

<ie:task uri="com/company/CreateGroup.xml"/>

<ie:webject name="Copy-Group" type="GRP">
  <ie:param name="GROUP_IN" data="createdgroup"/>
  <ie:param name="GROUP_OUT" data="results"/>
</ie:webject>

<ie:webject name="Return-Groups" type="GRP">
  <ie:param name="GROUP_IN" data="createdgroup"/>
  <ie:param name="GROUP_IN" data="results"/>
</ie:webject>
The XML output from executing the example is the following:
<?xml version="1.0" encoding="UTF-8"?>
<wc:COLLECTION xmlns:wc="http://www.ptc.com/infoengine/1.0">
<EmployeeData NAME="createdgroup" TYPE="Object" STATUS="0">
  <wc:INSTANCE>
    <NAME>Sam Johnson</NAME>
    <ADDRESS>1234 Main St.</ADDRESS>
    <EMAIL>sjohnson@somewhere.com</EMAIL>
  </wc:INSTANCE>
  <wc:INSTANCE>
    <NAME>Harvy Anderson</NAME>
    <ADDRESS>1234 Amber St.</ADDRESS>
    <EMAIL>handerson@somewhere.com</EMAIL>
  </wc:INSTANCE>
  <wc:INSTANCE>
    <NAME>James O&apos;Connor</NAME>
    <ADDRESS>775 Main St.</ADDRESS>
    <EMAIL></EMAIL>
  </wc:INSTANCE>
  <wc:INSTANCE>
    <NAME>Harvey Hampton</NAME>
    <ADDRESS>775 Main St.</ADDRESS>
    <EMAIL>hhampton@somewhere.com</EMAIL>
  </wc:INSTANCE>
</EmployeeData>
<EmployeeData NAME="results" TYPE="Object" STATUS="0">
  <wc:INSTANCE>
    <NAME>Sam Johnson</NAME>
    <ADDRESS>1234 Main St.</ADDRESS>
    <EMAIL>sjohnson@somewhere.com</EMAIL>
  </wc:INSTANCE>
  <wc:INSTANCE>
    <NAME>Harvy Anderson</NAME>
    <ADDRESS>1234 Amber St.</ADDRESS>
    <EMAIL>handerson@somewhere.com</EMAIL>
  </wc:INSTANCE>
  <wc:INSTANCE>
    <NAME>James O&apos;Connor</NAME>
    <ADDRESS>775 Main St.</ADDRESS>
    <EMAIL></EMAIL>
  </wc:INSTANCE>
  <wc:INSTANCE>
    <NAME>Harvey Hampton</NAME>
    <ADDRESS>775 Main St.</ADDRESS>
    <EMAIL>hhampton@somewhere.com</EMAIL>
  </wc:INSTANCE>
</EmployeeData>
</wc:COLLECTION>
Create-Group
DESCRIPTION
Creates a data group from embedded parameters or from an XML source file. If the XML source conforms to the Info*Engine schema, a group can be created from it directly. Otherwise, this webject allows an XSL stylesheet to be applied in order to translate the source form to the Info*Engine schema.
The Create-Group webject accepts an XML_URL parameter. The value of this parameter can be a fully specified HTTP URL. If so, Create-Group creates an HTTP connection to a remote web server, delivers the URL, and then reads the response from the remote server. The response is expected to be an XML stream. Ideally, the remote web server returns an XML stream that is formatted as a collection of Info*Engine groups (the same format as is produced by the Info*Engine task processor).
In cases where the format of the XML stream is not the same as produced by the Info*Engine task processor, Create-Group accepts an XSL_URL parameter specifying an XSL stylesheet that can be applied to translate the XML stream into Info*Engine format. For a list of the XML Info*Engine output requirements, see Understanding XML Output for Info*Engine Groups.
You can use the Create-Group webject to create an empty group. When you specify only the GROUP_OUT parameter and no ELEMENT parameters, Info*Engine creates an empty group.
SYNTAX
<ie:webject name="Create-Group" type="GRP" >
  <ie:param name="CLASS" data="class"/>
  <ie:param name="DBUSER" data="username"/>
  <ie:param name="DELIMITER" data="delimiter_character"/>
  <ie:param name="ELEMENT" data="key_value_pairs"/>
  <ie:param name="GROUP_OUT" data="group_out_name"/>
  <ie:param name="PASSWD" data="password"/>
  <ie:param name="XML_URL" data="url_of_xml_source"/>
  <ie:param name="XSL_PARAM" data="name_value_pair"/>
  <ie:param name="XSL_URL" data="url_of_xsl_source"/>
</ie:webject>
PARAMETERS
Required
Select
Optional
ELEMENT
CLASS
GROUP_OUT
DBUSER
XML_URL
DELIMITER
XSL_PARAM
PASSWD
XSL_URL
CLASS
Specifies the type of the objects contained in the output group named by the GROUP_OUT parameter. For example if a webject specifies CLASS=MyClassName and GROUP_OUT=data_1, then the XML representation of the output group contains the following tags:
<MyClassName NAME="data_1" TYPE="Object" STATUS="0">
</MyClassName>
The default for this parameter is “Unknown-Class-Name”. This parameter is optional.
DBUSER
Specifies the username to be used to authenticate to XSL_URL. If the XSL templates to be used by the webject reside on a remote HTTP server, then this parameter should be used in conjunction with the PASSWD attribute.
This parameter is optional.
DELIMITER
Specifies the character used to delimit key and value pairs created in the ELEMENT parameter.
If you are using a substitution string containing an asterisk (*) within the ELEMENT parameter, you should not specify the characters that are used in separating multiple elements or values as the delimiter in the Create-Group webject. If you do use the same character, the resulting elements or attribute values may be different from what you expect them to be. Substitution is described in Dynamic Parameter Value Substitution.
The default for this parameter is the colon (:). This parameter is optional.
ELEMENT
Specifies a delimited set of key and value pairs to add to the group specified by the GROUP_OUT parameter. Each key and value pair is specified by key=value. Each ELEMENT parameter creates an instance in the group with the attribute specified by the key value and the value specified by the value portion of the key and value pair.
Multiple ELEMENT parameters can be specified to create multiple instances of objects in the group. At least one ELEMENT parameter is required for this webject if no XML_URL parameter is specified. If both XML_URL and ELEMENT parameters are specified, the resulting group is the sum total of the rows created by the XML source file and the ELEMENT parameters specified.
GROUP_OUT
Specifies the name of the resulting group. The GROUP_OUT parameter is required only when the XML_URL parameter is not specified. When the XML_URL parameter is specified, the XML stream being parsed contains one or more groups. The names of these groups can be specified in the XML stream, so it is not necessary to provide a GROUP_OUT parameter to supply a name for the group(s) in this case.
PASSWD
Specifies the password corresponding to DBUSER.
This parameter is optional.
XML_URL
Identifies the location of an XML source file from which to create the group. A relative URL or a fully qualified URL can be specified. Relative URLs are relative to the Info*Engine Server task template root. The XML source is expected to be in Info*Engine format; the same format as is produced by the Info*Engine task processor. If the contents of the source specified by the XML_URL parameter is not in Info*Engine format, the XSL_URL parameter can be used to specify an XSL stylesheet that can be applied to transform the source into Info*Engine format. In any case, the source (possibly transformed by XSL) can contain definitions for more than one Info*Engine group. Create-Group parses all of them and add them to its collection of output groups.
Fully qualified URLs are dereferenced using the Auth-Map context group data. The Auth-Map is searched for a username and password based on the domain name found in the fully qualified URL. For example, if the fully qualified URL is:
http://machine.com/infoengine/servlet/IE/tasks/createGroupData.xml
then the Auth-Map context group is searched for a username and password that has an INSTANCE name of http://machine.com. If a username and password is found, BASIC authentication is used. If no username or password is found, no authentication information is sent to the remote web server.
If the data value contains the :// string, it is assumed to be a fully qualified internet URL. If the data value does not contain the string, it is assumed to be a local file relative to the current task root directory.
If the data value is input: the webject reads an XML object from the task’s BLOB input stream. This allows XML objects to be submitted from web pages and converted into groups by Create-Group.
XSL_PARAM
Defines XSL parameters that are then passed to the XSL stylesheet named in the XSL_URL parameter. You enter the value for the XSL_PARAM parameter in the form XSL_name=XSL_value, where XSL_name is the name of a parameter in the XSL stylesheet and XSL_value is the value you want set for the parameter.
The default for XSL_PARAM is that no parameters are passed to the stylesheet. Multiple values can be specified for this parameter. This parameter is optional.
XSL_URL
Identifies the location of an XSL stylesheet to apply to the XML source specified by the XML_URL parameter. A relative URL or a fully qualified URL can be specified. Relative URLs are relative to the Info*Engine Server task root.
Fully qualified URLs are dereferenced using the Auth-Map context group data. The Auth-Map is searched for a username and password based on the domain name found in the fully qualified URL. For example, if the fully qualified URL is:
http://machine.com/infoengine/servlet/IE/tasks/createGroupData.xml
the Auth-Map context group is searched for a username and password that has an INSTANCE name of http://machine.com. If a username and password are found, BASIC authentication information is used when accessing the URL. If no username and password are found, no authentication information is sent to the remote web server.
If the data value contains the :// string, it is assumed to be a fully qualified internet URL. If the data value does not contain the string, it is assumed to be a local file relative to the current task root directory.
EXAMPLE: INTERNAL GROUP CREATION
In the following example, the webject specifies the elements in the output group named “createdgroup” and adds the group to the local output group collection:
<%@page language="java" session="false"%>
<%@taglib uri="http://www.ptc.com/infoengine/taglib/core"
                                               prefix="ie"%>

<!-- Create an internal Group -->

<ie:webject name="Create-Group" type="GRP">
  <ie:param name="ELEMENT" data="NAME=Sam
                  Johnson:ADDRESS=1234 Main
                  St.:EMAIL=sjohnson@somewhere.com"/>
  <ie:param name="ELEMENT" data="NAME=Harvy
                  Anderson:ADDRESS=1234 Amber
                  St.:EMAIL=handerson@somewhere.com"/>
  <ie:param name="ELEMENT" data="NAME=James
                  O'Connor:ADDRESS=775 Main St.:EMAIL="/>
  <ie:param name="ELEMENT" data="NAME=Harvey
                   Hampton:ADDRESS=775 Main
                   St.:EMAIL=hhampton@somewhere.com"/>
  <ie:param name="CLASS" data="EmployeeData"/>
  <ie:param name="GROUP_OUT" data="createdgroup"/>
</ie:webject>
The XML output from executing the example is the following:
<?xml version="1.0" encoding="UTF-8"?>
<wc:COLLECTION xmlns:wc="http://www.ptc.com/infoengine/1.0">
<EmployeeData NAME="createdgroup" TYPE="Object" STATUS="0">
  <wc:INSTANCE>
    <NAME>Sam Johnson</NAME>
    <ADDRESS>1234 Main St.</ADDRESS>
    <EMAIL>sjohnson@somewhere.com</EMAIL>
  </wc:INSTANCE>
  <wc:INSTANCE>
    <NAME>Harvy Anderson</NAME>
    <ADDRESS>1234 Amber St.</ADDRESS>
    <EMAIL>handerson@somewhere.com</EMAIL>
  </wc:INSTANCE>
  <wc:INSTANCE>
    <NAME>James O&apos;Connor</NAME>
    <ADDRESS>775 Main St.</ADDRESS>
    <EMAIL></EMAIL>
  </wc:INSTANCE>
  <wc:INSTANCE>
    <NAME>Harvey Hampton</NAME>
    <ADDRESS>775 Main St.</ADDRESS>
    <EMAIL>hhampton@somewhere.com</EMAIL>
  </wc:INSTANCE>
</EmployeeData>
</wc:COLLECTION>
EXAMPLE: EXTERNAL GROUP CREATION
The following example of Create-Group executes a task in a remote Info*Engine Server and adds its output groups to the local output group collection:
<%@page language="java" session="false"%>
<%@taglib uri="http://www.ptc.com/infoengine/taglib/core" prefix="ie"%>

<!-- Create one or more local groups from the output of a remote
                                                     Info*Engine task -->

<ie:webject name="Create-Group" type="GRP">
  <ie:param name="XML_URL" data="http://remote-ie.acme.com/
                                infoengine/servlet/IE/tasks/report.xml"/>
</ie:webject>
Diff-Groups
DESCRIPTION
Computes the difference of two groups and places that difference in an output group.
In general, an element is different for two groups if it is part of the first group but not both groups. For example, if an element x exists in group A and group B, then it is not placed in the output group. Additionally, if an element y exists in group A but not in group B, then it is placed in the output group. However, if an element z exists in group B but not in group A then it is not placed in the output group; only the items unique to group A are placed in the output.
SYNTAX
<ie:webject name="Diff-Groups" type="GRP">
  <ie:param name="CASE_IGNORE" data="[TRUE | FALSE]"/>
  <ie:param name="CLASS" data="class"/>
  <ie:param name="COMPARISON" data="[ALPHA | NUMERIC]"/>
  <ie:param name="DIFFBY" data="attribute"/>
  <ie:param name="GROUP_IN" data="group_name1"/>
  <ie:param name="GROUP_IN" data="group_name2"/>
  <ie:param name="GROUP_OUT" data="output_group_name"/>
  <ie:param name="SORTBY" data="attribute"/>
  <ie:param name="SORTED" data="[ASC | DESC]">
</ie:webject>
PARAMETERS
Required
Select
Optional
DIFFBY
CASE_IGNORE
GROUP_IN
CLASS
GROUP_OUT
COMPARISON
SORTBY
SORTED
CASE_IGNORE
Acts as a flag for case. If TRUE is specified, case is ignored. If FALSE is specified, then case is significant. The default for this parameter is FALSE. This parameter is optional.
CLASS
Specifies the type of the objects contained in the output group named by the GROUP_OUT parameter. For example if a webject specifies CLASS=MyClassName and GROUP_OUT=data_1, then the XML representation of the output group contains the following tags:
<MyClassName NAME="data_1" TYPE="Object" STATUS="0">
</MyClassName>
The default for this parameter is “Unknown-Class-Name”. This parameter is optional.
COMPARISON
Describes how to compare the two groups: either ALPHA for an alpha-numeric comparison, or NUMERIC for a strictly numeric comparison. The default for this parameter is ALPHA. This parameter is optional.
DIFFBY
Identifies the name of the attribute that is used in comparing elements to determine whether they are different. If the groups being compared contain elements with attributes of the same name, then one DIFFBY value can be specified. Otherwise, you must specify two DIFFBY parameters to provide the names of the attributes from each respective group that is compared.
The attribute name placed in the output group is the attribute name of the first DIFFBY parameter used. This parameter is required.
GROUP_IN
Specifies the two groups that are compared for differences. This parameter is required.
GROUP_OUT
Specifies the name of the single resulting group comparison. This parameter is required.
SORTBY
Specifies the name of the attribute on which the sorting is done. If you do not include this parameter, the results are not sorted. This parameter is optional.
SORTED
Determines how values in the resulting group are sorted. The attribute named in the SORTBY parameter determines which values are sorted. Specify ASC to sort in ascending order or specify DESC to sort in descending order. The default for this parameter is ASC. This parameter is optional.
EXAMPLE
The following example uses the Create-Group webject and then finds the difference between the NAME attribute in the groups using the Diff-Groups webject. It creates the output group named “DIFF-RESULTS” and adds the group to the local output group collection:
%@page language="java" session="false"%>
<%@taglib uri="http://www.ptc.com/infoengine/taglib/core"
                                               prefix="ie"%>

<!-- Create Group containing the difference between two
                                                  groups -->

<ie:webject name="Create-Group" type="GRP">
  <ie:param name="ELEMENT" data="NAME=Sam
                  Johnson:ADDRESS=1234 Main
                  St.:EMAIL=sjohnson@somewhere.com"/>
  <ie:param name="ELEMENT" data="NAME=Harvy
                  Anderson:ADDRESS=1234 Amber
                  St.:EMAIL=handerson@somewhere.com"/>
  <ie:param name="ELEMENT" data="NAME=James
                  O'Connor:ADDRESS=775 Main St.:EMAIL="/>
  <ie:param name="ELEMENT" data="NAME=Harvey
                  Hampton:ADDRESS=775 Main
                  St.:EMAIL=hhampton@somewhere.com"/>
  <ie:param name="CLASS" data="EmployeeData"/>
  <ie:param name="GROUP_OUT" data="CREATE-RESULTS"/>
</ie:webject>

<ie:webject name="Create-Group" type="GRP">
  <ie:param name="ELEMENT" data="NAME=Sam
             Johnson:POSITION=Engineer:PHONE=555-111-1111"/>
  <ie:param name="ELEMENT" data="NAME=Harvy
           Anderson:POSITION=Marketing:PHONE=555-222-2222"/>
  <ie:param name="ELEMENT" data="NAME=James
                  O'Connor:POSITION=Management"/>
  <ie:param name="CLASS" data="EmployeeHrData"/>
  <ie:param name="GROUP_OUT" data="CREATE-HR-RESULTS"/>
</ie:webject>

<ie:webject name="Diff-Groups" type="GRP">
  <ie:param name="GROUP_IN" data="CREATE-RESULTS"/>
  <ie:param name="GROUP_IN" data="CREATE-HR-RESULTS"/>
  <ie:param name="DIFFBY" data="NAME"/>
  <ie:param name="CLASS" data="NewEmployees"/>
  <ie:param name="GROUP_OUT" data="DIFF-RESULTS"/>
</ie:webject>
The XML output from executing the example is the following:
<?xml version="1.0" encoding="UTF-8"?>
<wc:COLLECTION xmlns:wc="http://www.ptc.com/infoengine/1.0">
<NewEmployees NAME="DIFF-RESULTS" TYPE="Object" STATUS="0">
  <wc:INSTANCE>
    <NAME>Harvey Hampton</NAME>
    <ADDRESS>775 Main St.</ADDRESS>
    <EMAIL>hhampton@somewhere.com</EMAIL>
  </wc:INSTANCE>
</NewEmployees>
</wc:COLLECTION>
Extract-Group
DESCRIPTION
Searches for one or more attribute names and values and puts them into a new group. This forms a type of subset of a group of attributes. For information on searching for a subset of objects (not attributes on objects), see Subset-Group section.
When used in combination with the EXTRACT parameter, a specific set of attributes are extracted from the specified subset of elements. If the ELEMENT_OFFSET parameter is omitted, its value defaults to 0 (thus, the subset of elements returned begin with the first element of the input group). If the ELEMENT_COUNT parameter is omitted, its value defaults to the size of the input group (thus, the subset of elements returned include all elements of the input group, starting from the one specified by ELEMENT_OFFSET). If ELEMENT_OFFSET + ELEMENT_COUNT exceeds the number of elements in the input group, the output group contains fewer ELEMENT_COUNT elements (it contains as many elements as remain in the input group, beginning with ELEMENT_OFFSET). If the EXTRACT parameter is omitted, all attributes of each selected element are returned. At least one of the EXTRACT, ELEMENT_OFFSET, or ELEMENT_COUNT parameters must be specified. If all three are omitted, an exception is thrown.
SYNTAX
<ie:webject name="Extract-Group" type="GRP">
  <ie:param name="CLASS" data="class"/>
  <ie:param name="EXTRACT" data="attribute_name"/>
  <ie:param name="EXTRACT_MODE" data="[MATCH | NOMATCH]"/>
  <ie:param name="GROUP_IN" data="group_name"/>
  <ie:param name="GROUP_OUT" data="output_group"/>
<ie:param name="ELEMENT_COUNT" data="number of elements to extract" />
<ie:param name="ELEMENT_OFFSET" data="index of the starting element to extract" />
</ie:webject>
PARAMETERS
Required
Select
Optional
GROUP_IN
ELEMENT_COUNT
CLASS
GROUP_OUT
ELEMENT_OFFSET
EXTRACT_MODE
EXTRACT
CLASS
Specifies the type of the objects contained in the output group named by the GROUP_OUT parameter. For example if a webject specifies CLASS=MyClassName and GROUP_OUT=data_1, then the XML representation of the output group contains the following tags:
<MyClassName NAME="data_1" TYPE="Object" STATUS="0">
</MyClassName>
The default for this parameter is “Unknown-Class-Name.” This parameter is optional.
ELEMENT_COUNT
Allows the webject to return a subset of elements from the input group, thus allowing this webject to be used in simulating page-mode queries in cases where true page-mode is not supported by a back-end information system. This parameter specifies the number of elements to extract. The default value is the size of the input group.
ELEMENT_OFFSET
Allows the webject to return a subset of elements from the input group, thus allowing this webject to be used in simulating page-mode queries in cases where true page-mode is not supported by a back-end information system. This parameter specifies the index of the element at which to begin extraction. The default value is 0.
EXTRACT
Specifies the name of the attribute to be extracted. Multiple values can be specified for this parameter. This parameter is required.
EXTRACT_MODE
Specifies the extract mode. The value can be either MATCH or NOMATCH. When EXTRACT_MODE is MATCH, the specified attributes on the EXTRACT parameter are included in the output group. When EXTRACT_MODE is NOMATCH, all but the specified attributes on the EXTRACT parameter are included in the output group. This parameter is optional. If not specified, the default mode of MATCH is assumed.
GROUP_IN
Specifies the name of the input group. This parameter is required.
GROUP_OUT
Specifies the name of the extraction of attributes from the input group. This parameter is required.
EXAMPLE
The following example searches for the specified attribute names and values and puts them into a new group named “extractresults”:
<%@page language="java" session="false"%>
<%@taglib uri="http://www.ptc.com/infoengine/taglib/core"
                                               prefix="ie"%>

<!-- Extract attributes from a group. -->

<ie:task uri="com/company/CreateGroup.xml"/>

<ie:webject name="Extract-Group" type="GRP">
  <ie:param name="GROUP_IN" data="createdgroup"/>
  <ie:param name="EXTRACT" data="NAME"/>
  <ie:param name="EXTRACT" data="ADDRESS"/>
  <ie:param name="CLASS" data="resultGroup"/>
  <ie:param name="GROUP_OUT" data="extractresults"/>
</ie:webject>
Format-Group
DESCRIPTION
Formats specific groups of information by adding special characters to that information. For example, this webject could be used to place the dollar sign at the beginning of each item in a group of salary amounts. This webject can also be used to combine multiple attributes into one long attribute for formatting purposes.
SYNTAX
<ie:webject name=Format-Group type=GRP>
  <ie:param name="ATTRIBUTE" data="attribute_name"/>
  <ie:param name="CLASS" data="class"/>
  <ie:param name="FORMAT" data="format_specifier"/>
  <ie:param name="GROUP_IN" data="input_group_name"/>
  <ie:param name="GROUP_OUT" data="output_group"/>
  <ie:param name="LOCALE" data="language"/>
</ie:webject>
PARAMETERS
Required
Select
Optional
ATTRIBUTE
CLASS
FORMAT
LOCALE
GROUP_IN
GROUP_OUT
ATTRIBUTE
Identifies the string of data in a group to be formatted. These define the attributes that are used in creating the GROUP_OUT. Only the attributes explicitly specified in ATTRIBUTE parameters are used in creating the GROUP_OUT.
Multiple values can be specified for this parameter. This parameter is required.
CLASS
Specifies the type of the objects contained in the output group named by the GROUP_OUT parameter. For example if a webject specifies CLASS=MyClassName and GROUP_OUT=data_1, then the XML representation of the output group contains the following tags:
<MyClassName NAME="data_1" TYPE="Object" STATUS="0">
</MyClassName>
The default for this parameter is “Unknown-Class-Name.” This parameter is optional.
FORMAT
Specifies how to format the string of data specified in the ATTRIBUTE parameter. The value of the FORMAT parameter must be acceptable to the Java class java.text.MessageFormat. Each row of the GROUP_OUT has as many attributes as there are FORMAT parameters.
Each FORMAT parameter can include substitution strings that look like {n}, where n is a non-negative integer. These strings are replaced in the GROUP_OUT by the next unconsumed attribute whose offset is defined by n. The offset is relative to the first unconsumed ATTRIBUTE value as of the start of processing of the FORMAT parameter.
For example, if n is 0, the very next unconsumed ATTRIBUTE value is substituted. If n is 1, the second unconsumed attribute value is substituted. If n is 2, the third unconsumed attribute value is substituted, and so on. When the FORMAT parameter has been processed completely, all ATTRIBUTE values substituted by it are marked as consumed.
Multiple values can be specified for this parameter. This parameter is required.
GROUP_IN
Specifies the group to be formatted. This parameter is required.
GROUP_OUT
Specifies the formatted group. This parameter is required.
LOCALE
A string representation of the Java class locale, such as en-US (ISO language name, dash, ISO country code). If not specified, it currently defaults to the default locale defined for the platform on which Info*Engine is running. This parameter is optional.
EXAMPLE
The following example formats data in the current VDB group using substitution strings. The formatted data is placed in an output group named “formatted results” with a specified Java class locale of “en-US”:
<%@page language="java" session="false"%>
<%@taglib uri="http://www.ptc.com/infoengine/taglib/core"
                                               prefix="ie"%>

<!-- Format elements of a group. -->

<ie:task uri="com/company/CreateGroup.xml"/>

<ie:webject name="Format-Group" type="GRP">
  <ie:param name="GROUP_IN" data="createdgroup"/>
  <ie:param name="ATTRIBUTE" data="NAME"/>
  <ie:param name="ATTRIBUTE" data="EMAIL"/>
  <ie:param name="ATTRIBUTE" data="NAME"/>
  <ie:param name="ATTRIBUTE" data="EMAIL"/>
  <ie:param name="ATTRIBUTE" data="EMAIL"/>
  <ie:param name="ATTRIBUTE" data="NAME"/>
  <ie:param name="FORMAT" data="{0}"/>
  <ie:param name="FORMAT" data="{0}"/>
  <ie:param name="FORMAT" data="Name: {0} lives at {1}"/>
  <ie:param name="FORMAT" data="Email: {0} --- Name: {1}"/>
  <ie:param name="CLASS" data="resultGroup"/>
  <ie:param name="GROUP_OUT" data="formatted results"/>
  <ie:param name="LOCALE" data="en-US"/>
</ie:webject>
Intersect-Groups
DESCRIPTION
Identifies the intersection of two groups and places the result in a new group. For example, say that group A contains the elements u, v, and x and group B contains the elements x, y, and z. This webject identifies the common elements of both groups and uses the results of an intersection to form group C. Group C in this example would contain only the element x.
SYNTAX
<ie:webject name="Intersect-Groups" type="GRP">
  <ie:param name="CLASS" data="class"/>
  <ie:param name="COMPARISON" data="[ALPHA | NUMERIC]/>
  <ie:param name="GROUP_IN" data="input_groups"/>
  <ie:param name="GROUP_OUT" data="output_group_name"/>
  <ie:param name="INTERSECTBY" data="attribute"/>
  <ie:param name="SORTBY" data="attribute"/>
  <ie:param name="SORTED" data="[ASC | DESC]"/>
  <ie:param name="CASE_IGNORE" data="[ TRUE | FALSE]"/>
  </ie:webject>
PARAMETERS
Required
Select
Optional
GROUP_IN
CASE_IGNORE
GROUP_OUT
CLASS
INTERSECTBY
COMPARISON
SORTBY
SORTED
CASE_IGNORE
Acts as a flag for case. If TRUE is specified, case is ignored. If FALSE is specified, then case is significant. The default for this parameter is FALSE. This parameter is optional.
CLASS
Specifies the type of the objects contained in the output group named by the GROUP_OUT parameter. For example if a webject specifies CLASS=MyClassName and GROUP_OUT=data_1, then the XML representation of the output group contains the following tags:
<MyClassName NAME="data_1" TYPE="Object" STATUS="0">
</MyClassName>
The default for this parameter is “Unknown-Class-Name.” This parameter is optional.
COMPARISON
Describes how to compare the two groups: either ALPHA for an alpha-numeric comparison, or NUMERIC for a strictly numeric comparison. The default for this parameter is ALPHA. This parameter is optional.
GROUP_IN
Specifies the names of two input groups that are used in computing an intersection.
To specify two group names, you can include two lines with different values for the GROUP_IN parameter. For example:
<ie:param name="GROUP_IN" data="group1"/>
<ie:param name="GROUP_IN" data="group2"/>
This parameter is required.
GROUP_OUT
Specifies the name of the results of computing the intersection of the two groups. This parameter is required.
INTERSECTBY
Identifies the attribute to be used for comparisons. When an intersection is performed, the named attribute of the first named group is compared with the named attribute of the second named group. If the values are the same, then the element from the first group is placed in the resulting output group. Otherwise, it is discarded.
The attribute name placed in the output group is the attribute name of the first INTERSECTBY parameter used. If all the group INTERSECTBY parameters are the same name, then only one need be specified here. If any of the group INTERSECTBY parameters have different names, then all of them must be specified here.
This parameter is required.
SORTBY
Specifies the name of the attribute on which the sorting is done. If you do not include this parameter, the results are not sorted. This parameter is optional.
SORTED
Determines how values in the resulting group are sorted. The attribute named in the SORTBY parameter determines which values are sorted. Specify ASC to sort in ascending order or specify DESC to sort in descending order. The default for this parameter is ASC. This parameter is optional.
EXAMPLE
The following example creates two groups using the CreateGroup and CreateGroupHr task tags, and then finds the intersection between the NAME attribute in the groups using the Intersect-Groups webject. It creates the output group named “results” and adds the group to the local output group collection:
<%@page language="java" session="false"%>
<%@taglib uri="http://www.ptc.com/infoengine/taglib/core" prefix="ie"%>

<!--Create a group named createdgroup. -->
<ie:task uri="com/company/CreateGroup.xml"/>

<!--Create a group named createdhrgroup. -->
<ie:task uri="com/company/CreateGroupHr.xml"/>

<!-- Form a group by intersecting the two groups. -->

<ie:webject name="Intersect-Groups" type="GRP">
  <ie:param name="GROUP_IN" data="createhrgroup"/>
  <ie:param name="GROUP_IN" data="createdgroup"/>
  <ie:param name="INTERSECTBY" data="NAME"/>
  <ie:param name="CASE_IGNORE" data="YES"/>
  <ie:param name="COMPARISON" data="ALPHA"/>
  <ie:param name="SORTBY" data="NAME"/>
  <ie:param name="SORTED" data="ASC"/>
  <ie:param name="GROUP_OUT" data="results"/>
</ie:webject>
The XML output from executing the example is the following:
<?xml version="1.0" encoding="UTF-8"?>
<wc:COLLECTION xmlns:wc="http://www.ptc.com/infoengine/1.0">
<Unknown-Class-Name NAME="results" TYPE="Object" STATUS="0">
  <wc:INSTANCE>
    <NAME>Harvy Anderson</NAME>
    <POSITION>Marketing</POSITION>
    <PHONE>555-222-2222</PHONE>
  </wc:INSTANCE>
  <wc:INSTANCE>
    <NAME>James O&apos;Connor</NAME>
    <POSITION>Management</POSITION>
    <PHONE></PHONE>
  </wc:INSTANCE>
  <wc:INSTANCE>
    <NAME>Sam Johnson</NAME>
    <POSITION>Engineer</POSITION>
    <PHONE>555-111-1111</PHONE>
  </wc:INSTANCE>
</Unknown-Class-Name>
</wc:COLLECTION>
Join-Groups
DESCRIPTION
Joins similar information from two different groups into one group. By setting the JOIN_TYPE parameter to MAX, dissimilar information within both groups is also included in the new group.
* 
The difference between the Join-Groups webject and the Merge-Groups webject depends on how duplicate information is treated. The results of joining groups is that duplicated information is eliminated. Merging groups of data allows duplicates to be preserved.
SYNTAX
<ie:webject name="Join-Groups" type="GRP">="GRP">
  <ie:param name="CASE_IGNORE" data="[TRUE | FALSE]"/>
  <ie:param name="CLASS" data="class"/>
  <ie:param name="COMPARISON" data="[ALPHA | NUMERIC]"/>
  <ie:param name="GROUP_IN" data="input_groups"/>
  <ie:param name="GROUP_OUT" data="output_group_name"/>
  <ie:param name="JOIN_TYPE" data="MAX"/>
  <ie:param name="JOINBY" data="attribute"/>
  <ie:param name="SORTBY" data="attribute"/>
  <ie:param name="SORTED" data="[ASC | DESC]"/>
  <ie:param name="UNDEFINED" data="somevalue"/>
</ie:webject>
PARAMETERS
Required
Select
Optional
GROUP_IN
CASE_IGNORE
GROUP_OUT
CLASS
JOINBY
COMPARISON
JOIN_TYPE
SORTBY
SORTED
UNDEFINED
CASE_IGNORE
Acts as a flag for case. If TRUE is specified, case is ignored. If FALSE is specified, then case is significant. The default for this parameter is FALSE. This parameter is optional.
CLASS
Specifies the type of the objects contained in the output group named by the GROUP_OUT parameter. For example, if a webject specifies CLASS=MyClassName and GROUP_OUT=data_1, then the XML representation of the output group contains the following tags:
<MyClassName NAME="data_1" TYPE="Object" STATUS="0">
</MyClassName>
The default for this parameter is “Unknown-Class-Name.” This parameter is optional.
COMPARISON
Describes how to compare the two groups: either ALPHA for an alpha-numeric comparison, or NUMERIC for a strictly numeric comparison. The default for this parameter is ALPHA. This parameter is optional.
GROUP_IN
Specifies the names of the two groups to be used in computing a join. To specify two group names, you can include two lines with different values for the GROUP_IN parameter. For example:
<ie:param name="GROUP_IN" data="group1"/>
<ie:param name="GROUP_IN" data="group2"/>
The order of the groups listed in the parameter determines the order in which the groups are joined.
This parameter is required.
GROUP_OUT
Specifies the name of the results of computing the join of the two groups. This parameter is required.
JOINBY
Identifies the attribute or column name to be used for comparisons. When a join is performed, an element of the first named group is joined with an element of the second named group if they contain attributes named by the JOINBY parameter(s) with matching values.
If the attributes used for the comparison in both groups have the same name, then include only one JOINBY parameter. If the attributes used for the comparison do not have the same name, then include two JOINBY parameters. The attribute name placed in the output group is the attribute name of the first JOINBY parameter used.
This parameter is required.
JOIN_TYPE
Specifies that a MAX join is to be performed. Without JOIN_TYPE specified, any information that is not similar within the two groups being joined are omitted from the output. When JOIN_TYPE is set to MAX, the webject joins all information from both groups being joined. For fields without values, the UNDEFINED value is used. For more information, see Join-Groups section.
This parameter is optional.
SORTBY
Specifies the name of the attribute on which the sorting is done. If you do not include this parameter, the results are not sorted. This parameter is optional.
SORTED
Determines how values in the resulting group are sorted. The attribute named in the SORTBY parameter determines which values are sorted. Specify ASC to sort in ascending order or specify DESC to sort in descending order. The default for this parameter is ASC. This parameter is optional.
UNDEFINED
Sets the value to use if no attribute value exists. The default value for this parameter is "". This parameter is optional.
EXAMPLES
There are two examples for the Join-Groups webject. The first is an example task, and the second supplements the definition of the JOIN_TYPE parameter.
The following example creates two groups and then joins them by the NAME attribute using the Join-Groups webject. It creates an output group named “results” and adds the group to the local output group collection:
<%@page language="java" session="false"%>
<%@taglib uri="http://www.ptc.com/infoengine/taglib/core" prefix="ie"%>

<!--Create a group named createdgroup. -->
<ie:task uri="com/company/CreateGroup.xml"/>

<!--Create a group named createdhrgroup. -->
<ie:task uri="com/company/CreateGroupHr.xml"/>

<!-- Form a group by joining two groups -->

<ie:webject name="Join-Groups" type="GRP">
  <ie:param name="GROUP_IN" data="createdgroup"/>
  <ie:param name="GROUP_IN" data="createhrgroup"/>
  <ie:param name="JOINBY" data="NAME"/>
  <ie:param name="JOIN_TYPE" data="MAX"/>
  <ie:param name="SORTBY" data="NAME"/>
  <ie:param name="SORTED" data="ASC"/>
  <ie:param name="GROUP_OUT" data="results"/>
</ie:webject>
This example shows the results of combining Group A with Group B on C3 with the Join-Groups webject. The first two tables show the groups that are joined. Notice that the information in Column 3, Row 3 is not the same in these two groups.
Table 1 Group A
C1
C2
C3
Row 1
a1
b1
c1
Row 2
a2
b2
c2
Row 3
a3
b3
c3
Table 2 Group B
C3
C4
C5
Row 1
c1
d1
e1
Row 2
c2
d2
e2
Row 3
c4
d4
e4
Assume that the following webject executes:
<ie:webject name="Join-Groups" type="GRP">
  <ie:param name="GROUP_IN" data="Group A"/>
  <ie:param name="GROUP_IN" data="Group B"/>
  <ie:param name="JOINBY" data="C3"/>
  <ie:param name="GROUP_OUT" data="Results"/>
</ie:webject>
Table 3 Results Without the JOIN_TYPE Parameter
C1
C2
C3
C4
C5
Row 1
a1
b1
c1
d1
e1
Row 2
a2
b2
c2
d2
e2
This webject does not use the JOIN_TYPE parameter. Notice that the columns from Group A precedes the columns from Group B and that information from Row 3 in Groups A and B is not included.
<ie:webject name="Join-Groups" type="GRP">
  <ie:param name="GROUP_IN" data="Group A"/>
  <ie:param name="GROUP_IN" data="Group B"/>
  <ie:param name="JOINBY" data="C3"/>
  <ie:param name="JOIN_TYPE" data="MAX"/>
  <ie:param name="GROUP_OUT" data="Results"/>
</ie:webject>
The result when the JOIN_TYPE parameter is specified is shown below. All rows of information are included.
In this example, Group A (which had values for Row 3 in C1, C2, and C3) has those values included in Row 3. Group B (which had values for Row 3 in C3, C4, and C5) has those values included in Row 4. The default value that is included for information that is dissimilar between the groups is "".
Table 4 Results With the JOIN_TYPE Parameter
C1
C2
C3
C4
C5
Row 1
a1
b1
c1
d1
e1
Row 2
a2
b2
c2
d2
e2
Row 3
a3
b3
c3
""
""
Row 4
""
""
c4
d4
e4
Joining Group B with Group A results in the same data joined in a different order. The C3 column is derived from Group B. Data from Group B is first, followed by the data from Group A. If Group B is joined with Group A, you get the following:
Table 5 Results With the JOIN_TYPE Parameter
C3
C4
C5
C1
C2
Row 1
c1
d1
e1
a1
b1
Row 2
C2
d2
e2
a2
b2
Row 3
C3
""
""
a3
b3
Row 4
C4
d4
e4
""
""
Merge-Groups
DESCRIPTION
Combines two groups into one and allows duplication of information contained in one or both groups.
* 
The difference between the Join-Groups webject and the Merge-Groups webject depends on how duplicate information is treated. The results of joining groups is that duplicated information is eliminated. Merging groups of data allows duplicates to be preserved.
SYNTAX
<ie:webject name="Merge-Groups "type="GRP">
  <ie:param name="CASE_IGNORE" data="[TRUE | FALSE]"/>
  <ie:param name="CLASS" data="class"/>
  <ie:param name="COMPARISON" data="[ALPHA | NUMERIC]"/>
  <ie:param name="GROUP_IN" data="input_groups"/>
  <ie:param name="GROUP_OUT" data="output_group_name"/>
  <ie:param name="SORTBY" data="attribute"/>
  <ie:param name="SORTED" data="[ASC | DESC]"/>
</ie:webject>
PARAMETERS
Required
Select
Optional
GROUP_IN
CASE_IGNORE
GROUP_OUT
CLASS
COMPARISON
SORTBY
SORTED
CASE_IGNORE
Acts as a flag for case. If TRUE is specified, case is ignored. If FALSE is specified, then case is significant. The default for this parameter is FALSE. This parameter is optional.
CLASS
Specifies the type of the objects contained in the output group named by the GROUP_OUT parameter. For example if a webject specifies CLASS=MyClassName and GROUP_OUT=data_1, then the XML representation of the output group contains the following tags:
<MyClassName NAME="data_1" TYPE="Object" STATUS="0">
</MyClassName>
The default for this parameter is “Unknown-Class-Name.” This parameter is optional.
COMPARISON
Describes how to compare the two groups: either ALPHA for an alpha-numeric comparison or NUMERIC for a strictly numeric comparison. The default for this optional parameter is ALPHA.
GROUP_IN
Specifies the names of the two groups to be used in computing a merge. To specify two group names, you can include two lines with different values for the GROUP_IN parameter. For example:
<ie:param name="GROUP_IN" data="group1"/>
<ie:param name="GROUP_IN" data="group2"/>
This parameter is required.
GROUP_OUT
Identifies the name of the resulting merge of the two groups specified using the GROUP_IN and MERGEBY parameters. This parameter is required.
SORTBY
Specifies the name of the attribute on which the sorting is done. If you do not include this parameter, the results are not sorted. This parameter is optional.
SORTED
Determines how values in the resulting group are sorted. The attribute named in the SORTBY parameter determines which values are sorted. Specify ASC to sort in ascending order or specify DESC to sort in descending order. The default for this parameter is ASC. This parameter is optional.
EXAMPLE
The following example combines the two specified GROUP_INs, sorts the data by the NAME attribute in ascending order, and places the resulting merged and sorted data in an output group named “results”:
<%@page language="java" session="false"%>
<%@taglib uri="http://www.ptc.com/infoengine/taglib/core"
                                               prefix="ie"%>

<!-- Form a group by merging two groups -->

<ie:task uri="com/company/CreateGroup.xml"/>
<ie:task uri="com/company/CreateGroupHr.xml"/>

<ie:webject name="Merge-Groups" type="GRP">
  <ie:param name="GROUP_IN" data="createdgroup"/>
  <ie:param name="GROUP_IN" data="createhrgroup"/>
  <ie:param name="SORTBY" data="NAME"/>
  <ie:param name="SORTED" data="ASC"/>
  <ie:param name="GROUP_OUT" data="results"/>
</ie:webject>
Return-Groups
DESCRIPTION
Returns multiple groups from a task. These groups can then be used by calling tasks or JSP pages.
By default, only the last group that is created is available to the caller of a task.
SYNTAX
<ie:webject name="Return-Groups" type="GRP">
  <ie:param name="GROUP_IN" data="group_names"/>
</ie:webject>
PARAMETERS
Required
Select
Optional
GROUP_IN
GROUP_IN
Specifies the names of the multiple groups to return. The special value “ * ” can be specified to return all groups produced by a task.
To specify multiple group names, you can include multiple lines with different values for the GROUP_IN parameter. For example:
<ie:param name="GROUP_IN" data="group1"/>
<ie:param name="GROUP_IN" data="group2"/>
<ie:param name="GROUP_IN" data="group3"/>
This parameter is required.
EXAMPLE
The following example creates two groups using the CreateGroup and CreateGroupHr task tags and then returns the groups using the Return-Groups webject:
<%@page language="java" session="false"%>
<%@taglib uri="http://www.ptc.com/infoengine/taglib/core"
                                               prefix="ie"%>

<!--Create a group named createdgroup. -->
<ie:task uri="com/company/CreateGroup.xml"/>

<!--Create a group named createdhrgroup. -->
<ie:task uri="com/company/CreateGroupHr.xml"/>

<!-- Return multiple groups. -->

<ie:webject name="Return-Groups" type="GRP">
  <ie:param name="Group_in" data="createdgroup"/>
  <ie:param name="Group_in" data="createhrgroup"/>
</ie:webject>
The XML output from executing the ReturnGroups.xml file is the following:
<?xml version="1.0" encoding="UTF-8"?>
<wc:COLLECTION xmlns:wc="http://www.ptc.com/infoengine/1.0">
<EmployeeData NAME="createdgroup" TYPE="Object" STATUS="0">
  <wc:INSTANCE>
    <NAME>Sam Johnson</NAME>
    <ADDRESS>1234 Main St.</ADDRESS>
    <EMAIL>sjohnson@somewhere.com</EMAIL>
  </wc:INSTANCE>
  <wc:INSTANCE>
    <NAME>Harvy Anderson</NAME>
    <ADDRESS>1234 Amber St.</ADDRESS>
    <EMAIL>handerson@somewhere.com</EMAIL>
  </wc:INSTANCE>
  <wc:INSTANCE>
    <NAME>James O&apos;Connor</NAME>
    <ADDRESS>775 Main St.</ADDRESS>
    <EMAIL></EMAIL>
    </wc:INSTANCE>
  <wc:INSTANCE>
    <NAME>Harvey Hampton</NAME>
    <ADDRESS>775 Main St.</ADDRESS>
    <EMAIL>hhampton@somewhere.com</EMAIL>
  </wc:INSTANCE>
</EmployeeData>
<EmployeeHrData NAME="createhrgroup" TYPE="Object" STATUS="0">
  <wc:INSTANCE>
    <NAME>Sam Johnson</NAME>
    <POSITION>Engineer</POSITION>
    <PHONE>555-111-1111</PHONE>
  </wc:INSTANCE>
  <wc:INSTANCE>
    <NAME>Harvy Anderson</NAME>
    <POSITION>Marketing</POSITION>
    <PHONE>555-222-2222</PHONE>
  </wc:INSTANCE>
  <wc:INSTANCE>
    <NAME>James O&apos;Connor</NAME>
    <POSITION>Management</POSITION>
    <PHONE></PHONE>
  </wc:INSTANCE>
</EmployeeHrData>
</wc:COLLECTION>
Set-Identity
DESCRIPTION
Adds attributes and meta-attributes to every element of a group. These attributes specify the UFID (unique federation identifier) and object class of each element. Task delegation can then be easily applied to the group by providing it as the value of the GROUP_IN parameter of the Dispatch-Tasks webject.
SYNTAX
<ie:webject name="Set-Identity" type="GRP">
  <ie:param name="GROUP_IN" data="input_group_name"/>
</ie:webject>
PARAMETERS
Required
Select
Optional
GROUP_IN
DOMAIN
CLASS
DOMAIN_ATTRIBUTE
CLASS_ATTRIBUTE
UFID
GUID
GUID_ATTRIBUTE
LOCAL_ID
LOCAL_ID_ATTRIBUTE
UFID_ATTRIBUTE
CLASS
Specifies a logical object class name. This value is added to each element of the input group as the value of an attribute whose name is specified by CLASS_ATTRIBUTE. This parameter may be specified more than once. If the number of values is less than the number of elements in the input group, the last value specified is reused as many times as necessary to accommodate the remaining elements. If this parameter is omitted, no class name attribute is added to any elements of the input group. This parameter is optional.
CLASS_ATTRIBUTE
Specifies the name of the attribute in which logical class names specified by CLASS is stored. The default value of this parameter is class. If the CLASS parameter is omitted, CLASS_ATTRIBUTE is ignored. This parameter is optional.
DOMAIN
Specifies the domain name of an information repository. This value is combined with LOCAL_ID and GUID to form a UFID (unique federation identifier) value that is added to each element of the input group. This parameter may be specified more than once. If the number of values is less than the number of elements in the input group, the last value specified is reused as many times as necessary to accommodate the remaining elements. If this parameter is omitted, then either the DOMAIN_ATTRIBUTE or UFID parameter must be specified.
DOMAIN_ATTRIBUTE
Specifies the name of an attribute that each element of the input group contains. The value of each such attribute identifies the domain name of an information repository. Each value is combined with LOCAL_ID and GUID to form a UFID (unique federation identifier) value that is added to each element of the input group. If this parameter is omitted, then either the DOMAIN or UFID parameter must be specified.
GROUP_IN
Specifies the name of a group to which class and UFID attributes are added, which is modified in place (this webject has no GROUP_OUT parameter). This parameter is required.
GUID
Specifies the globally unique identifier of an information repository. This value is combined with LOCAL_ID and DOMAIN to form a UFID (unique federation identifier) value that is added to each element of the input group. This parameter may be specified more than once. If the number of values is less than the number of elements in the input group, the last value specified is reused as many times as necessary to accommodate the remaining elements. If this parameter is omitted, and GUID_ATTRIBUTE is also omitted, the globally unique identifier is derived from the DOMAIN value. This parameter is optional.
GUID_ATTRIBUTE
Specifies the name of an attribute contained in each element of the input group. Each such value provides the globally unique identifier of an information repository. This value is combined with LOCAL_ID and DOMAIN to form a UFID (unique federation identifier) value that is added to each element of the input group. If this parameter is omitted, and GUID is also omitted, the globally unique identifier is derived from the DOMAIN value. This parameter is optional.
LOCAL_ID
Specifies the repository-specific identifier of the object represented by an element of the input group. This value is combined with GUID and DOMAIN to form a UFID (unique federation identifier) value that is added to each element of the input group. This parameter may be specified more than once. If the number of values specified is less than the number of elements in the input group, then only those elements with assigned values have a UFID. If this parameter is omitted, and both LOCAL_ID_ATTRIBUTE and UFID are also omitted, then no UFID attribute is added to any elements of the input group. This parameter is optional.
LOCAL_ID_ATTRIBUTE
Specifies the name of an attribute contained in each element of the input group. Each such value provides the repository-specific identifier of the object represented by the element that contains it. This value is combined with GUID and DOMAIN to form a UFID (unique federation identifier) value that is added to each element of the input group. If this parameter is omitted, and both LOCAL_ID and UFID are also omitted, then no UFID attribute is added to any elements of the input group. This parameter is optional.
UFID
Directly specifies the value that is added as a UFID to each element of the input group. This parameter may be specified more than once. If the number of values specified is less than the number of elements in the input group, then only those elements with assigned values have a UFID. If this parameter is omitted, and both LOCAL_ID and LOCAL_ID_ATTRIBUTE are also omitted, then no UFID attribute is added to any elements of the input group. This parameter is optional.
UFID_ATTRIBUTE
Specifies the name of the attribute that is added to each element of the input group to identify each element's UFID. The default value of this parameter is obid. This parameter is optional.
Set-Metadata
DESCRIPTION
Registers metadata values for groups, for individual elements within a group, and for attributes within elements. This metadata can then be read by higher layer applications, which can affect the processing of group, element, or attribute data.
* 
The Set-Metadata webject does not generate a new output group. Instead, it modifies the group specified by its GROUP_IN parameter.
SYNTAX
<ie:webject name="Set-Metadata" type="GRP">
  <ie:param name="ATTRIBUTE" data="name_of_attribute"/>
  <ie:param name="ELEMENT" data="index_of_element"/>
  <ie:param name="GROUP_IN" data="input_group_name"/>
  <ie:param name="NAME" data="name_of_meta_attribute"/>
  <ie:param name="SCOPE" data="[GROUP | ELEMENT | ATTRIBUTE]"/>
  <ie:param name="VALUE" data="value_of_meta_attribute"/>
</ie:webject>
PARAMETERS
Required
Select
Optional
GROUP_IN
SCOPE
VALUE
NAME
ELEMENT
ATTRIBUTE
ATTRIBUTE
Identifies the attribute for which the metadata is set.
If SCOPE is ATTRIBUTE, then you must specify both the ELEMENT and ATTRIBUTE parameters in order to identify the attribute against which the metadata is set.
ELEMENT
Identifies the element for which the metadata is set. The value of the parameter can be a simple integer that specifies the index of the element within the group, or can be specified as name=value where name is the name of an attribute, and value is the corresponding value of the attribute. If a name and value pair are specified, the webject locates the first element that contains an attribute with the specified name and value, and it sets the metadata for that element.
The value of ELEMENT can also be specified as “ * ”. In this case, all elements of the group are selected.
If the SCOPE parameter is ELEMENT, then you must specify the ELEMENT parameter. If the SCOPE parameter is ATTRIBUTE, then you must specify both the ELEMENT and ATTRIBUTE parameters in order to identify the attribute for which the metadata is set.
GROUP_IN
Specifies the name of the group for which metadata is registered. This parameter is required.
NAME
Specifies the name of the metadata attribute that is set. Multiple NAME and VALUE parameter pairs can be specified in order to set multiple metadata attributes in a single call to the webject. This parameter is required.
VALUE
Specifies the metadata value associated with the corresponding metadata named in the NAME parameter. Multiple NAME and VALUE parameter pairs may be specified in order to set multiple metadata attributes in a single call to the webject.
The default for this parameter is the null character. This parameter is optional.
SCOPE
Specifies the metadata scope. Valid values for this parameter are the following:
GROUP – Sets the metadata for the group as a whole.
ELEMENT – Sets the metadata for a particular element within the group. If SCOPE is specified as ELEMENT, then the ELEMENT parameter must also be specified.
ATTRIBUTE – Sets the metadata for an particular attribute of an element within the group. If SCOPE is specified as ATTRIBUTE, then both the ELEMENT and ATTRIBUTE parameters must also be specified.
The default value for this parameter is GROUP.
EXAMPLE
The following example JSP page registers metadata with a name of meta_data and a value of met_value on the group named “createdgroup” at the group level:
<%@page language="java" session="false"
       errorPage="XML_IEError.jsp" contentType="text/xml"%>

<%@ taglib uri="http://www.ptc.com/infoengine/taglib/core" prefix="ie"%>

<ie:task uri="com/company/CreateGroup.xml"/>

<ie:webject name="Set-Metadata" type="GRP">
  <ie:param name="GROUP_IN" data="createdgroup"/>
  <ie:param name="SCOPE"  data="GROUP"/>
  <ie:param name="NAME"   data="meta_name"/>
  <ie:param name="VALUE"  data="met_value"/>
</ie:webject>

<ie:webject name="Display-XML" type="DSP">
  <ie:param name="MODE" data="FULL"/>
</ie:webject>
The following SetMetadataLevels.jsp file sets metadata for all three SCOPE values and displays the XML output using Display-XML:
<%@page language="java" session="false" errorPage="../IEError.jsp"%>

<%@taglib uri="http://www.ptc.com/infoengine/taglib/core" prefix="ie"%>

<ie:webject name="Create-Group" type="GRP">
  <ie:param name="ELEMENT" data="NAME=Sam Johnson:
          ADDRESS=1234 Main St.:EMAIL=sjohnson@somewhere.com"/>
  <ie:param name="ELEMENT" data="NAME=Harvy Anderson:
          ADDRESS=1234 Amber St.:EMAIL=handerson@somewhere.com"/>
  <ie:param name="ELEMENT" data="NAME=&lt;&gt;'&amp;&quot;:
          EMAIL=joconnor@somewhere.com"/>
  <ie:param name="GROUP_OUT" data="CREATE-RESULTS"/>
</ie:webject>

<ie:webject name="SeT-Metadata" type="GRP">
  <ie:param name="GROUP_IN" data="CREATE-RESULTS"/>
  <ie:param name="NAME" data="testattribute"/>
  <ie:param name="VALUE" data="attribute metadata"/>
  <ie:param name="SCOPE" data="ATTRIBUTE"/>
  <ie:param name="ELEMENT" data="*"/>
  <ie:param name="ATTRibute" data="name"/>
</ie:webject>

<ie:webject name="Set-Metadata" type="GRP">
  <ie:param name="GROUP_IN" data="CREATE-RESULTS"/>
  <ie:param name="NAME" data="testelement"/>
  <ie:param name="VALUE" data="element metadata"/>
  <ie:param name="SCOPE" data="ELEMENT"/>
  <ie:param name="ELEMENT" data="0"/>
</ie:webject>

<ie:webject name="Set-Metadata" type="GRP">
  <ie:param name="GROUP_IN" data="CREATE-RESULTS"/>
  <ie:param name="NAME" data="testgroup"/>
  <ie:param name="VALUE" data="group metadata"/>
  <ie:param name="SCOPE" data="GROUP"/>
</ie:webject>

<ie:webject name="Display-Xml" type="DSP">
  <ie:param name="Mode" data="FULL"/>
</ie:webject>
The XML output from executing the example is as follows:
  <?xml version="1.0" encoding="UTF-8" ?>
- <wc:COLLECTION xmlns:wc="http://www.ptc.com/infoengine/1.0">
  - <Unknown-Class-Name NAME="CREATE-RESULTS" TYPE="Object" STATUS="0">
    - <wc:INSTANCE>
      - <NAME>
          Sam Johnson
       - <wc:Meta>
          <testattribute>attribute metadata</testattribute>
         </wc:Meta>
       </NAME>
       <ADDRESS>1234 Main St.</ADDRESS>
       <EMAIL>sjohnson@somewhere.com</EMAIL>
       - <wc:Meta>
          <testelement>element metadata</testelement>
         </wc:Meta>
      </wc:INSTANCE>
    - <wc:INSTANCE>
      - <NAME>
          Harvy Anderson
       - <wc:Meta>
          <testattribute>attribute metadata</testattribute>
         </wc:Meta>
       </NAME>
       <ADDRESS>1234 Amber St.</ADDRESS>
       <EMAIL>handerson@somewhere.com</EMAIL>
      </wc:INSTANCE>
    - <wc:INSTANCE>
      - <NAME>
          &lt;&gt;'&amp;&quot;
       - <wc:Meta>
          <testattribute>attribute metadata</testattribute>
         </wc:Meta>
       </NAME>
       <EMAIL>joconnor@somewhere.com</EMAIL>
      </wc:INSTANCE>
      - <wc:Meta>
          <Class>Unknown-Class-Name</Class>
          <testgroup>group metadata</testgroup>
          <Status>0</Status>
        </wc:Meta>
     </Unknown-Class-Name>
  </wc:COLLECTION>
Sort-Group
DESCRIPTION
Sorts the information in a group of objects by one or more attributes. For example, in a group containing employee names, numbers, and salaries, the Sort-Group webject can be used to specify an alphanumeric ordering of the information by either name, number, salary, or a combination of any or all of the three attributes.
SYNTAX
<ie:webject name="Sort-Group" type="GRP">
  <ie:param name="GROUP_IN" data="input_group_name"/>
  <ie:param name="SORTBY" data="attribute"/>
  <ie:param name="SORTED" data="[ASC | DESC]"/>
  <ie:param name="COMPARISON" data="[ALPHA | NUMERIC]"/>
  <ie:param name="CASE_IGNORE" data="[TRUE | FALSE]"/>
  <ie:param name="CLASS" data="class"/>
  <ie:param name="GROUP_OUT" data="output_group_name"/>
</ie:webject>
PARAMETERS
Required
Select
Optional
GROUP_IN
CASE_IGNORE
GROUP_OUT
CLASS
SORTBY
COMPARISON
SORTED
CASE_IGNORE
Acts as a flag for case. If TRUE is specified, case is ignored. If FALSE is specified, then case is significant. The default for this parameter is FALSE. Multiple values can be specified for this parameter. This parameter is optional.
CLASS
Specifies the type of the objects contained in the output group named by the GROUP_OUT parameter. For example if a webject specifies CLASS=MyClassName and GROUP_OUT=data_1, then the XML representation of the output group contains the following tags:
<MyClassName NAME="data_1" TYPE="Object" STATUS="0">
</MyClassName>
The default for this parameter is “Unknown-Class-Name”. This parameter is optional.
COMPARISON
Describes how to compare the attribute values: either ALPHA for an alpha-numeric comparison or NUMERIC for a strictly numeric comparison. The default for this parameter is ALPHA. Multiple values can be specified for this parameter. This parameter is optional.
GROUP_IN
Specifies the group to be sorted. This parameter is required.
GROUP_OUT
Specifies the name of the sorted group. This parameter is required.
SORTBY
Identifies the field or column name to be used for sorting. Note that null values sort before all numbers and letters in ascending sorting and after all numbers and letters in descending sorting.
Multiple values can be specified for this parameter. If more values are specified for SORTBY than for SORTED, COMPARISON, or CASE_IGNORE, then the last value specified for SORTED, COMPARISON, or CASE_IGNORE is used against the remaining SORTBY values. This parameter is required.
SORTED
Describes how to order the output of the two groups: either ASC for ascending order of output or DESC for a descending order of output. The default of this parameter is ASC. Multiple values can be specified for this parameter. This parameter is optional.
EXAMPLE: SINGLE-COLUMN SORTING
The following example sorts the group named “createdgroup” by name, alphabetically, in ascending order, ignoring case, and places the resulting sorted data in an output group named “results”:
<%@page language="java" session="false"%>
<%@taglib uri="http://www.ptc.com/infoengine/taglib/core" prefix="ie"%>

<!-- Sort the elements in a group. -->

<ie:task uri="com/company/CreateGroup.xml"/>

<ie:webject name="Sort-Group" type="GRP">
  <ie:param name="GROUP_IN" data="createdgroup"/>
  <ie:param name="SORTBY" data="NAME"/>
  <ie:param name="CASE_IGNORE" data="TRUE"/>
  <ie:param name="COMPARISON" data="ALPHA"/>
  <ie:param name="SORTED" data="ASC"/>
  <ie:param name="GROUP_OUT" data="results"/>
</ie:webject>
EXAMPLE: MULTI-COLUMN SORTING
The following Sort-Group webject example shows sorting on multiple columns.
First, a group is created, containing employee last names and department numbers.
<%@page language="java" session="false"%>
<%@taglib uri="http://www.ptc.com/infoengine/taglib/core" prefix="ie"%>

<ie:webject name="Create-Group" type="GRP">
  <ie:param name="ELEMENT" data="DEPT=300:NAME=Smith"/>
  <ie:param name="ELEMENT" data="DEPT=300:NAME=Johnson"/>
  <ie:param name="ELEMENT" data="DEPT=200:NAME=Reilly"/>
  <ie:param name="ELEMENT" data="DEPT=100:NAME=Sinclair"/>
  <ie:param name="ELEMENT" data="DEPT=300:NAME=Michaels"/>
  <ie:param name="ELEMENT" data="DEPT=500:NAME=King"/>
  <ie:param name="GROUP_OUT" data="employees"/>
</ie:webject>

<ie:webject name="Display-Table" type="DSP"/>
The resulting output group named “employees” would display in the following form:
DEPT
NAME
300
Smith
300
Johnson
200
Reilly
100
Sinclair
300
Michaels
500
King
The group “employees” is then sorted by department number, in ascending order.
<ie:webject name="Sort-Group" type="GRP">
  <ie:param name="GROUP_IN" data="employees"/>
  <ie:param name="SORTBY" data="DEPT"/>
  <ie:param name="SORTED" data="ASC"/>
  <ie:param name="GROUP_OUT" data="results"/>
</ie:webject>

<ie:webject name="Display-Table" type="DSP"/>
The output group named “results” would display in the following form:
DEPT
NAME
100
Sinclair
200
Reilly
300
Smith
300
Johnson
300
Michaels
500
King
* 
The employee names in Department 300 are in no particular order.
The group “employees” is then sorted by department number and name, both in ascending order.
<ie:webject name="Sort-Group" type="GRP">
  <ie:param name="GROUP_IN" data="employees"/>
  <ie:param name="SORTBY" data="DEPT,NAME" delim=","/>
  <ie:param name="SORTED" data="ASC"/>
  <ie:param name="GROUP_OUT" data="results"/>
</ie:webject>

<ie:webject name="Display-Table" type="DSP"/>
The output group named “results” would display in the following form:
DEPT
NAME
100
Sinclair
200
Reilly
300
Johnson
300
Michaels
300
Smith
500
King
* 
The employee names in Department 300 are now listed in ascending alphabetical order.
The group “employees” is then sorted by department number, ascending, and name, descending.
<ie:webject name="Sort-Group" type="GRP">
  <ie:param name="GROUP_IN" data="employees"/>
  <ie:param name="SORTBY" data="DEPT,NAME" delim=","/>
  <ie:param name="SORTED" data="ASC,DESC" delim=","/>
  <ie:param name="GROUP_OUT" data="results"/>
</ie:webject>

<ie:webject name="Display-Table" type="DSP"/>
The output group named “results” would display in the following form:
DEPT
NAME
100
Sinclair
200
Reilly
300
Smith
300
Michaels
300
Johnson
500
King
* 
The employee names in Department 300 are now listed in reverse alphabetical order.
Subset-Group
DESCRIPTION
Uses pattern matching on single or multiple parameters to see if a string matches a specified pattern as a whole or to see if a substring within a string matches a specified pattern. Matching is done using regular expressions (part of the POSIX Standard). Case can be ignored.
SYNTAX
<ie:webject name="Subset-Group" type="GRP">
  <ie:param name="CASE_IGNORE" data="[TRUE | FALSE]"/>
  <ie:param name="CLASS" data="class"/>
  <ie:param name="FILTER" data="string_pattern"/>
  <ie:param name="FILTER_MODE" data="[MATCH | NOMATCH]"/>
  <ie:param name="FILTER_TYPE" data="[IE | REGEXP]"/>
  <ie:param name="GROUP_IN" data="input_group_name"/>
  <ie:param name="GROUP_OUT" data=" output_group_name"/>
</ie:webject>
PARAMETERS
Required
Select
Optional
FILTER
CASE_IGNORE
GROUP_IN
CLASS
GROUP_OUT
FILTER_MODE
FILTER_TYPE
CASE_IGNORE
Acts as a flag for case. If TRUE is specified, case is ignored when searching for matches. If FALSE is specified, then case is significant. The default for this parameter is FALSE. This parameter is optional.
CLASS
Specifies the type of the objects contained in the output group named by the GROUP_OUT parameter. For example if a webject specifies CLASS=MyClassName and GROUP_OUT=data_1, then the XML representation of the output group contains the following tags:
<MyClassName NAME="data_1" TYPE="Object" STATUS="0">
</MyClassName>
The default for this parameter is “Unknown-Class-Name.” This parameter is optional.
FILTER
Specifies the pattern to which a string or substring must match. The set of wildcard characters you can include in the pattern is determined by the type of filter you specify. For additional information, see the FILTER_TYPE parameter description.
This parameter is required.
FILTER_MODE
Specifies whether to pass the values that match the specified pattern or the values that do not match the specified pattern. Valid values are MATCH and NOMATCH. The default for this parameter is MATCH. This parameter is optional.
FILTER_TYPE
Specifies the type of filter to use in pattern matching. Valid values are IE for Info*Engine or REGEXP for regular expressions.
If IE is specified, the following characters are translated into the corresponding regular expressions:
IE
Regular Expression
?
.
*
.*
pattern
^pattern$
After the translation from IE characters to regular expressions is complete, then pattern matching is performed.
The IE characters listed in the previous table can be used when the required pattern is a relatively simple pattern. If a more complex pattern is required, specify REGEXP as the value for the FILTER_TYPE parameter and include the required regular expression in the FILTER parameter pattern.
The default for this parameter is IE. This parameter is optional.
GROUP_IN
Specifies the group from which to select a particular subset. This parameter is required.
GROUP_OUT
Specifies the name of the output group into which the subset is stored. This parameter is required.
EXAMPLE
The following example uses pattern matching to see if a string matches a specified pattern as a whole or to see if a substring within a string matches a specified pattern. The first Subset-Group webject passes items which match the specified FILTER, placing those items in an output group named “matched”. The second Subset-Group webject passes items which do not match the specified FILTER, placing those items in a output group named “nomatch”.
<%@page language="java" session="false"%>
<%@taglib uri="http://www.ptc.com/infoengine/taglib/core"
                                               prefix="ie"%>

<!-- Form a new group that is a subset of a group.-->

<ie:task uri="com/company/CreateGroup.xml"/>

<ie:webject name="Subset-Group" type="GRP">
  <ie:param name="GROUP_IN" data="createdgroup"/>
  <ie:param name="FILTER" data="NAME='^J'"/>
  <ie:param name="FILTER_TYPE" data="REGEXP"/>
  <ie:param name="FILTER_MODE" data="MATCH"/>
  <ie:param name="CASE_IGNORE" data="TRUE"/>
  <ie:param name="CLASS" data="MATCHEDITEMS"/>
  <ie:param name="GROUP_OUT" data="matched"/>
</ie:webject>

<ie:webject name="Subset-Group" type="GRP">
  <ie:param name="GROUP_IN" data="createdgroup"/>
  <ie:param name="FILTER" data="NAME='^J'"/>
  <ie:param name="FILTER_TYPE" data="REGEXP"/>
  <ie:param name="FILTER_MODE" data="NOMATCH"/>
  <ie:param name="CASE_IGNORE" data="TRUE"/>
  <ie:param name="CLASS" data="NONMATCHEDITEMS"/>
  <ie:param name="GROUP_OUT" data="nomatch"/>
</ie:webject>

<ie:webject name="Return-Groups" type="GRP">
  <ie:param name="Group_in" data="matched"/>
  <ie:param name="Group_in" data="nomatch"/>
</ie:webject>
Summarize-Groups
DESCRIPTION
Provides descriptive information about groups.
SYNTAX
<ie:webject name="Summarize-Groups" type="GRP">
  <ie:param name="CLASS" data="class"/>
  <ie:param name="GROUP_IN" data="group_in"/>
  <ie:param name="GROUP_OUT" data="group_out"/>
</ie:webject>
PARAMETERS
Required
Select
Optional
GROUP_IN
CLASS
GROUP_OUT
CLASS
Specifies the type of the objects contained in the output group named by the GROUP_OUT parameter. For example if a webject specifies CLASS=MyClassName and GROUP_OUT=data_1, then the XML representation of the output group contains the following tags:
<MyClassName NAME="data_1" TYPE="Object" STATUS="0">
</MyClassName>
The default for this parameter is “Unknown-Class-Name.” This parameter is optional.
GROUP_IN
Specifies the groups to be summarized. Multiple values can be specified for this parameter. This parameter is required.
GROUP_OUT
Specifies the name of the results of summarizing the input groups. Each node or row has the following attributes:
NAME -- the name of the GROUP_IN
TYPE -- the type of the group (Unknown, Object, Status, or Stream)
SIZE -- currently 0
COUNT -- the number of elements in the group
MIMETYPE -- currently an empty string
MESSAGE -- the message, if any, associated with the group
STATUS -- the integer status associated with the group
This parameter is required.
EXAMPLE
The following example uses Summarize-Groups to provide descriptive information about the specified GROUP_IN and places the resulting data in an output group named “result”:
<%@page language="java" session="false"%>
<%@taglib uri="http://www.ptc.com/infoengine/taglib/core"
                                               prefix="ie"%>

<!-- Summarize the contents of a set of groups. -->

<ie:task uri="com/company/CreateGroup.xml"/>
<ie:task uri="com/company/CreateGroupHr.xml"/>

<ie:webject name="Summarize-Groups" type="GRP">
  <ie:param name="GROUP_IN" data="createdgroup"/>
  <ie:param name="GROUP_IN" data="createhrgroup"/>
  <ie:param name="CLASS" data="SUMMARIZEGROUPS"/>
  <ie:param name="GROUP_OUT" data="result"/>
</ie:webject>
Translate-Group
DESCRIPTION
Allows translation of data from a specified Info*Engine data group in one or more of the following ways:
Rename attributes within elements in the group;
Translate data types of attribute values in the output group;
Remove attributes from elements in the output group;
Apply an XSL stylesheet to the Info*Engine data group specified on the GROUP_IN parameter.
This webject can be used for generalized schema translation.
SYNTAX
<ie:webject name="Translate-Group" type="GRP">
  <ie:param name="CLASS" data="class"/>
  <ie:param name="COPY_UNTRANSLATED" data="[YES | NO]"/>
  <ie:param name="DBUSER" data="username"/>
  <ie:param name="DEFAULT_TABLE" data="group_name"/>
  <ie:param name="GROUP_IN" data="group_in"/>
  <ie:param name="GROUP_OUT" data="GROUP_OUT_name"/>
  <ie:param name="NAME_TRANS_TABLE" data="group_name"/>
  <ie:param name="PASSWD" data="password"/>
  <ie:param name="TYPE_TRANS_TABLE" data="group_name"/>
  <ie:param name="XSL_PARAM" data="name_value_pair"/>
  <ie:param name="XSL_URL" data="url_of_xsl_source"/>
</ie:webject>
PARAMETERS
Required
Select
Optional
GROUP_IN
COPY_UNTRANSLATED
CLASS
GROUP_OUT
DEFAULT_TABLE
DBUSER
NAME_TRANS_TABLE
PASSWD
TYPE_TRANS_TABLE
XSL_PARAM
XSL_URL
CLASS
Specifies the type of the objects contained in the output group named by the GROUP_OUT parameter. For example if a webject specifies CLASS=MyClassName and GROUP_OUT=data_1, then the XML representation of the output group contains the following tags:
<MyClassName NAME="data_1" TYPE="Object" STATUS="0">
</MyClassName>
The default for this parameter is “Unknown-Class-Name”. This parameter is optional.
COPY_UNTRANSLATED
Specifies the action to be taken against attributes found in GROUP_IN elements that are not matched by attributes of the same names defined in the NAME_TRANS_TABLE or TYPE_TRANS_TABLE parameters. If the value of the parameter is specified as YES, then the name of an attribute of a GROUP_IN element which does not match the name of an attribute in the NAME_TRANS_TABLE or TYPE_TRANS_TABLE is copied to the GROUP_OUT element unmodified. If COPY_UNTRANSLATED is not specified, its value defaults to NO, in which case any such attribute is not included in the GROUP_OUT element.
If you specify the COPY_UNTRANSLATED parameter, then you must also specify either the NAME_TRANS_TABLE or the TYPE_TRANS_TABLE parameter.
DBUSER
Specifies the username to be used to authenticate to XSL_URL. If the XSL templates to be used by the webject reside on a remote HTTP server, then this parameter should be used in conjunction with the PASSWD attribute.
This parameter is optional.
DEFAULT_TABLE
Specifies the name of a group that provides default attribute names and values to the GROUP_OUT group. The group is assumed to contain exactly one element. If more than one element is contained within the group, then the additional elements are ignored. Each attribute of the element specifies a default name and value.
After the NAME_TRANS_TABLE and TYPE_TRANS_TABLE parameters have been applied to each element of the GROUP_IN group to produce an element of the GROUP_OUT group, the GROUP_OUT element is checked for attributes having names matching attributes defined in the DEFAULT_TABLE. For each attribute defined in the DEFAULT_TABLE that does not have a matching name in the GROUP_OUT element, the attribute of the DEFAULT_TABLE is added to the GROUP_OUT element. For example, if the DEFAULT_TABLE contains an attribute named “Factory” and a value named “Unknown”, and after translation a GROUP_OUT element does not contain an attribute named “Factory”, then an attribute with name “Factory” and value “Unknown” are added.
If you specify the DEFAULT_TABLE parameter, then you must also specify either the NAME_TRANS_TABLE or the TYPE_TRANS_TABLE parameter.
GROUP_IN
Specifies the group to convert to XML and to which an XSL stylesheet is applied. This parameter is required.
GROUP_OUT
Specifies the name of the results of translating the input group. This parameter is required.
NAME_TRANS_TABLE
Specifies the name of a group that defines an attribute name translation table. The group is assumed to contain exactly one element. If more than one element is contained within the group, then the additional elements are ignored. The name of each attribute of the element identifies an attribute name to be translated. The value of each attribute specifies the new name. For example, if an attribute in the NAME_TRANS_TABLE group has the name “PartNo” and the value “PartNumber”, then every attribute named “PartNo” in the GROUP_IN group is renamed to “PartNumber” in the GROUP_OUT group.
NAME_TRANS_TABLE and TYPE_TRANS_TABLE can be specified together to change both the names and data types of attributes and their values. When both parameters are specified, it is important to remember that the attribute names specified by TYPE_TRANS_TABLE identify attributes in the GROUP_OUT group, after NAME_TRANS_TABLE has been applied. If TYPE_TRANS_TABLE specifies names of attributes that occur in the GROUP_IN group, but one or more of these are not translated using NAME_TRANS_TABLE, then these attributes are copied to the GROUP_OUT group with their names unchanged, but their values translated using TYPE_TRANS_TABLE into different data types.
The NAME_TRANS_TABLE and TYPE_TRANS_TABLE parameters can be specified in addition to the XSL_URL parameter. In this case, the XSL-based translation is executed first; the NAME_TRANS_TABLE and/or TYPE_TRANS_TABLE based translations are then applied to the output group produced by the XSL-based translation. Thus, the attribute names specified in the NAME_TRANS_TABLE identify attributes of the group produced by the XSL-based translation, not attributes of the original GROUP_IN group. In all cases, the attribute names specified in TYPE_TRANS_TABLE identify attributes of the final GROUP_OUT group.
PASSWD
Specifies the password corresponding to DBUSER.
This parameter is optional.
TYPE_TRANS_TABLE
Specifies the name of a group that defines an attribute value data type translation table. The group is assumed to contain exactly one element. If more than one element is contained within the group, then the additional elements are ignored. The name of each attribute identifies the name of an attribute in the GROUP_OUT group whose values are to be translated. The value of each attribute specifies the desired data type. For example, if an attribute in the TYPE_TRANS_TABLE group has the name “Quantity” and the value “Integer”, then every value of every attribute named “Quantity” in the GROUP_OUT group is converted to the data type INTEGER. The data types currently supported are:
BYTE – 8-bit value.
DOUBLE – double precision floating point value.
FLOAT – single precision floating point value.
INTEGER – integer value with default range.
LONG – integer value with long range.
SHORT – integer value with short range.
STRING – character string value.
NAME_TRANS_TABLE and TYPE_TRANS_TABLE can be specified together to change both the names and data types of attributes and their values. When both parameters are specified, the attribute names specified by TYPE_TRANS_TABLE identify attributes in the GROUP_OUT group, after NAME_TRANS_TABLE has been applied. If TYPE_TRANS_TABLE specifies names of attributes that occur in the GROUP_IN group, but one or more of these are not translated using NAME_TRANS_TABLE, then these attributes are copied to the GROUP_OUT group with their names unchanged, but their values are translated using TYPE_TRANS_TABLE into different data types.
The NAME_TRANS_TABLE and TYPE_TRANS_TABLE parameters can be specified in addition to the XSL_URL parameter. In this case, the XSL-based translation is executed first. The NAME_TRANS_TABLE and/or TYPE_TRANS_TABLE based translations are then applied to the output group produced by the XSL-based translation. Thus, the attribute names specified in the NAME_TRANS_TABLE identify attributes of the group produced by the XSL-based translation, not attributes of the original GROUP_IN group. In all cases, the attribute names specified in TYPE_TRANS_TABLE identify attributes of the final GROUP_OUT group.
XSL_PARAM
Defines XSL parameters that are then passed to the XSL stylesheet named in the XSL_URL parameter. Enter the value for the XSL_PARAM parameter in the form XSL_name=XSL_value, where XSL_name is the name of a parameter in the XSL stylesheet and XSL_value is the value you want set for the parameter.
The default for XSL_PARAM is that no parameters are passed to the stylesheet. Multiple values can be specified for this parameter. This parameter is optional.
XSL_URL
Identifies the location of an XSL stylesheet to apply to the group specified in the GROUP_IN parameter. A relative URL or a fully qualified URL can be specified. Relative URLs are relative to the Info*Engine Server task template root. The XSL stylesheet should be constructed to apply to the Info*Engine XML format (the format shown in all examples in this guide, and produced by the Display-XML webject). The stylesheet must also produce Info*Engine XML format.
The NAME_TRANS_TABLE and TYPE_TRANS_TABLE parameters can be specified in addition to the XSL_URL parameter. In this case, the XSL-based translation is executed first; the NAME_TRANS_TABLE and/or TYPE_TRANS_TABLE based translations are then applied to the output group produced by the XSL-based translation.
Fully qualified URLs are dereferenced using Auth-Map context group data. The Auth-Map is searched for a username and password based on the domain name found in the fully qualified URL. For example, if the fully qualified URL is http://machine.com/servlet/IE/createGroupData.xml, the Auth-Map context group is searched for a username and password that has an INSTANCE name of http://machine.com. If a username and password are found, BASIC authentication information is used when accessing the URL. If no username and password are found, no authentication information is sent to the remote web server.
If the data value contains the :// string, it is assumed to be a fully qualified internet URL. If the data value does not contain the :// string, the stylesheet is assumed to be a local file relative to the current task template root directory.
This parameter is optional.
EXAMPLE
The following example translates the data from the group named “createdgroup” by renaming the attributes. The resulting data is placed in the group named “RenamedGroup”:
<%@page language="java" session="false"%>
<%@taglib uri="http://www.ptc.com/infoengine/taglib/core"
                                               prefix="ie"%>

<!-- Create a test Group -->

<ie:task uri="com/company/CreateGroup.xml"/>

<!-- Create attribute translation Group -->

<ie:webject name="Create-Group" type="GRP">
  <ie:param name="ELEMENT"
                  data="NAME=FullName:EMAIL=EmailAddress"/>
  <ie:param name="GROUP_OUT" data="NewNames"/>
</ie:webject>

<!-- Translate the attribute names -->

<ie:webject name="Translate-Group" type="GRP">
  <ie:param name="GROUP_IN" data="createdgroup"/>
  <ie:param name="NAME_TRANS_TABLE" data="NewNames"/>
  <ie:param name="GROUP_OUT" data="RenamedGroup"/>
</ie:webject>

<!-- Translate some of the attribute names -->

<ie:webject name="Translate-Group" type="GRP">
  <ie:param name="GROUP_IN" data="createdgroup"/>
  <ie:param name="NAME_TRANS_TABLE" data="NewNames"/>
  <ie:param name="COPY_UNTRANSLATED" data="YES"/>
  <ie:param name="GROUP_OUT" data="RenamedGroup"/>
</ie:webject>
Union-Groups
DESCRIPTION
Identifies the union of two groups and places the results in a new group. For example, group A contains the elements u, v, and x, and group B contains the elements x, y, and z. The Union-Groups webject identifies the elements in either group A or group B or both and uses the results to form group C. Group C, in this example, would contain the elements u, v, x, y, and z.
SYNTAX
<ie:webject name="Union-Groups" type="GRP">
  <ie:param name="CASE_IGNORE" data="[ TRUE | FALSE]"/>
  <ie:param name="CLASS" data=" class"/>
  <ie:param name="COMPARISON" data="[ALPHA | NUMERIC]"/>
  <ie:param name="GROUP_IN" data="input_groups"/>
  <ie:param name="GROUP_OUT" data="output_group_name"/>
  <ie:param name="SORTBY" data="attribute"/>
  <ie:param name="SORTED" data="[ASC | DESC]"/>
  <ie:param name="UNIONBY" data="attribute"/>
</ie:webject>
PARAMETERS
Required
Select
Optional
GROUP_IN
CASE_IGNORE
GROUP_OUT
CLASS
UNIONBY
COMPARISON
SORTBY
SORTED
CASE_IGNORE
Acts as a flag for case. If TRUE is specified, case is ignored. If FALSE is specified, then case is significant. The default for this parameter is FALSE. This parameter is optional.
CLASS
Specifies the type of the objects contained in the output group named by the GROUP_OUT parameter. For example if a webject specifies CLASS=MyClassName and GROUP_OUT=data_1, then the XML representation of the output group contains the following tags:
<MyClassName NAME="data_1" TYPE="Object" STATUS="0">
</MyClassName>
The default for this optional parameter is “Unknown-Class-Name.”
COMPARISON
Describes how to compare the two groups: either ALPHA for an alphanumeric comparison or NUMERIC for a strictly numeric comparison. The default for this parameter is ALPHA. This parameter is optional.
GROUP_IN
Specifies the names of the two groups to be used in computing a union.
To specify two group names, you can include two lines with different values for the GROUP_IN parameter. For example:
<ie:param name="GROUP_IN" data="group1"/>
<ie:param name="GROUP_IN" data="group2"/>
This parameter is required.
GROUP_OUT
Specifies the name of the results of computing the union of the two groups. This parameter is required.
SORTBY
Specifies the name of the attribute on which the sorting is done. If you do not include this parameter, the results are not sorted. This parameter is optional.
SORTED
Determines how values in the resulting group are sorted. The attribute named in the SORTBY parameter determines which values are sorted. Specify ASC to sort in ascending order or specify DESC to sort in descending order. The default for this parameter is ASC. This parameter is optional.
UNIONBY
Identifies the field or column name to be used for comparison. This parameter is required.
EXAMPLE
The following example finds the union of the two specified input groups by the NAME attribute, compares them alphabetically and places them in an output group named “results”:
<%@page language="java" session="false"%>
<%@taglib uri="http://www.ptc.com/infoengine/taglib/core"
                                               prefix="ie"%>

<!-- Form a new group from the Union of multiple groups -->

<ie:task uri="com/company/CreateGroup.xml"/>
<ie:task uri="com/company/CreateGroupA.xml"/>

<ie:webject name="Union-Groups" type="GRP">
  <ie:param name="GROUP_IN" data="createdgroup"/>
  <ie:param name="GROUP_IN" data="createdgroupa"/>
  <ie:param name="UNIONBY" data="NAME"/>
  <ie:param name="COMPARISON" data="ALPHA"/>
  <ie:param name="GROUP_OUT" data="results"/>
  <ie:param name="CLASS" data="ALLEMPLOYEES"/>
</ie:webject>
XOR-Groups
DESCRIPTION
Identifies the symmetric difference or the 'exclusive or' of two groups. For example, group A contains the elements u, v, and x, and group B contains the elements x, y, and z. The XOR-Groups webject identifies the unique elements of groups A and B and uses the results to form group C. All elements that appear in either group A or group B, but not in both groups, are returned. Group C, in this example, would contain the elements u, v, y, and z.
SYNTAX
<ie:webject name="XOR-Group" type="GRP">
  <ie:param name="CASE_IGNORE" data="[TRUE | FALSE]"/>
  <ie:param name="CLASS" data="class"/>
  <ie:param name="COMPARISON" data="[ALPHA | NUMERIC]"/>
  <ie:param name="GROUP_IN" data="input_groups"/>
  <ie:param name="GROUP_OUT" data="output_group_name"/>
  <ie:param name="SORTBY" data="attribute"/>
  <ie:param name="SORTED" data="[ASC | DESC]"/>
  <ie:param name="XORBY" data="attribute"/>
</ie:webject>
PARAMETERS
Required
Select
Optional
GROUP_IN
CASE_IGNORE
GROUP_OUT
CLASS
XORBY
COMPARISON
SORTBY
SORTED
CASE_IGNORE
Acts as a flag for case. If TRUE is specified, case is ignored. If FALSE is specified, then case is significant. The default for this parameter is FALSE. This parameter is optional.
CLASS
Specifies the type of the objects contained in the output group named by the GROUP_OUT parameter. For example if a webject specifies CLASS=MyClassName and GROUP_OUT=data_1, then the XML representation of the output group contains the following tags:
<MyClassName NAME="data_1" TYPE="Object" STATUS="0">
</MyClassName>
The default for this parameter is “Unknown-Class-Name.” This parameter is optional.
COMPARISON
Describes how to compare the two groups: either ALPHA for an alpha-numeric comparison or NUMERIC for a strictly numeric comparison. The default for this parameter is ALPHA. This parameter is optional.
GROUP_IN
Specifies the names of the two groups to be used in computing the symmetric difference.
To specify two group names, you can include two lines with different values for the GROUP_IN parameter. For example:
<ie:param name="GROUP_IN" data="group1"/>
<ie:param name="GROUP_IN" data="group2"/>
This parameter is required.
GROUP_OUT
Specifies the name of the results of computing the symmetric difference. This parameter is required.
SORTBY
Specifies the name of the attribute on which the sorting is done. If you do not include this parameter, the results are not sorted. This parameter is optional.
SORTED
Determines how values in the resulting group are sorted. The attribute named in the SORTBY parameter determines which values are sorted. Specify ASC to sort in ascending order or specify DESC to sort in descending order. The default for this parameter is ASC. This parameter is optional.
XORBY
Identifies the attribute name to be used for comparison. If the groups being compared contain elements with attributes of the same name, then one XORBY value can be specified. Otherwise, you must specify two XORBY parameters to provide the names of the attributes from each respective group that are compared.
The attribute name placed in the output group is the attribute name of the first XORBY parameter used.
This parameter is required.
EXAMPLE
The following example finds the exclusive or of the two specified input groups, and places the resulting data in an output group named “results”.
<%@page language="java" session="false"%>
<%@taglib uri="http://www.ptc.com/infoengine/taglib/core"
                                               prefix="ie"%>

<!-- Form a new group from the "exclusive or" of
                                              two groups -->

<ie:task uri="examples/CreateGroup.xml"/>
<ie:task uri="examples/CreateGroupA.xml"/>

<ie:webject name="XOR-Groups" type="GRP">
  <ie:param name="GROUP_IN" data="createdgroup"/>
  <ie:param name="GROUP_IN" data="createdgroupa"/>
  <ie:param name="XORBY" data="NAME"/>
  <ie:param name="GROUP_OUT" data="results"/>
  <ie:param name="CLASS" data="partial"/>
</ie:webject>