CAA Web Services Home |
|
SelectExpressionOverview of SelectExpression used in ENOVIA LCA V5 CAA Web services |
Technical Article |
AbstractThis article introduces the SelectExpression and its usage in ENOVIA LCA V5 CAA Web service. |
SelectExpression allows you to construct an expression in XML format to be used for filtering ENOVIA Object and its composition in result set. SelectExpression is used in ENOVIA web services, such as query and expand.
A typical SelectExpression is made up of a FILTER element which contains the SELECT, WHERE and ORDERBY clauses. SELECT clause identifies the Object requested. The object names and attribute names used to specify a criteria should exist in the ENOVIA.xsd [1]. In ENOVIA LCA, objects belong to specific domains. The domain information is communicated via the 'Domain' attribute on each of the entities.
WHERE clause is the fetch criterion to be used by Web services in order to constrain the results of a Query or Expand service. ORDERBY clause orders the result set. The results can be ordered only by one attribute.
Overall Structure of SelectExpression
<FILTER See Filter |
<SELECT> See SELECT Clause |
</SELECT> |
<WHERE>
See WHERE Clause
|
</WHERE> |
<ORDERBY/>
The ORDERBY clause is mandatory for
'QueryObject'. |
</FILTER> |
The ENOVIA.xsd identifies the ENOVIA entities and attributes that can be
used as inputs into SelectExpression and the outputs that can be expected from
the ENOVIA LCA V5 CAA Web services. This file can be found in your <install
path>/resources/xsd
directory.
The FilterXML.xsd identifies the grammar for the SelectExpression. Any input
into ENOVIA LCA V5 CAA Web services for SelectExpression should be valid with reference to
this XSD. This file can be found in your <install
path>/resources/xsd
directory.
[Top]
The root element FILTER has the following attributes:
COMMAND |
Default is QUERY. Specify EXPAND for Web Services that pertain to product structure. |
CASESENSITIVE |
Used for 'FILTER COMMAND of QUERY' only. TRUE or FALSE. Specify TRUE for default. |
ENDRANGEVALUE |
Value is not used. |
LASTVERSION |
Value is not used. |
MINORMAX |
Value is not used. |
RESULTPAGE |
Value is not used. |
STARTRANGEVALUE |
Value is not used. |
[Top]
The SELECT clause identifies an ENOVIA entity against which the Web service is performed. ENOVIA entities are uniquely identified by a DOMAIN and a NAME. Only the entities identified in the ENOVIA.xsd are valid for use. The SELECT clause can also constrain the results to specific attribute of the entity in question.
<SELECT> |
|
<OBJECT |
DOMAIN=
NAME=
> |
Default domains are specified in ENOVIA.xsd for the objects specified in the NAME field. | |
Element name for the complex type defined in
ENOVIA.xsd: format, object_name.attribute_name. This allows one to specify attributes to be returned that belong to different objects for 'FILTER COMMAND of EXPAND'. The result set, therefore, can contain a heterogeneous set of objects for 'FILTER COMMAND of EXPAND'. |
|
<ATTRIBUTE |
NAME=
/> |
Specify the object attribute name. | |
</OBJECT> |
|
</SELECT> |
Following is an example of a SELECT clause that asks for 3 attributes of the VPMBOPartInstance entity from the ENOVIA server.
<SELECT> |
[Top]
The WHERE clause contains filter condition used to constrain the results to be returned from ENOVIA LCA V5 CAA Web service. The following elements are defined in the WHERE clause:
<WHERE> |
|
<FILTER_CONDITION |
OPERATOR=
> |
FILTER_CONDITION contains the
specific criteria for ATTRIBUTE_FILTER, and CONFIGURATION. An implicit 'AND' condition is applied to multiple criterion. |
|
Only 'AND' is supported | |
<ATTRIBUTE_FILTER/> |
See Attribute Filter |
</FILTER_CONDITION> |
|
<CONFIGURATION> |
See Configuration Filter |
<PRC |
UUID=
/> |
The Product Root Class identifier is required for EXPAND where the starting (parent) object is not a PRC and you specify FILTER_CONDITION with CONDIFUGRATION or ATTRIBUTE_FILTER. | |
<ATTACHMENT_TYPE/> |
Used only for
expandProductStructure Web service. ATTACHMENT_TYPE is designed to controls the type of documents to be returned for FILTER COMMAND of 'EXPAND'. These documents are attached to either Parts or Products. FilterXML.xsd lists the different attachment types which are detailed below: |
|
|
|
ATTACHMENT_TYPE is also used to
do a zero level(depth 0) expand to retrieve ENOVIA Mods on configured
products and item instances. Syntax :
ATTACHMENT_TYPE is also used to do a zero level(depth 0) expand to retrieve Config Handlers attached to products in ENOVIA. Syntax:
|
<CONFIGURATION/> |
|
</WHERE> |
The following where clause constrains the result set to all Parts where the version and ID attributes satisfy the specified criteria.
<WHERE> |
[Top]
ATTRIBUTE_FILTER specifies the constraints on values of attributes of entities in question.
<ATTRIBUTE_FILTER |
OPERATOR=
> |
Supports 'AND', 'OR', and 'NOT'. Used when there is more than one EXPRESSION | |
<EXPRESSION |
OP=
VALUE=
> |
Supports 'LT', 'GT', 'EQ', 'LIKE', and 'BETWEEN' | |
String to search on. Required for 'LT', 'GT', 'EQ', 'LIKE', and 'BETWEEN' | |
String to search on. Required for 'BETWEEN' | |
<ATTRIBUTE |
NAME=
/> |
Attribute name defined in ENOVIA.xsd. Only one attribute name per EXPRESSION is supported. | |
</EXPRESSION> |
|
</ATTRIBUTE_FILTER> |
The following ATTRIBUTE_FILTER constrains the result set only to versions 'B' whose ID starts with 'A'.
<ATTRIBUTE_FILTER OPERATOR="AND"> |
[Top]
CONFIGURATION filters are used to constrain the results of a query or an expand by a configuration. The format and contents of configuration criteria are explained below:
<CONFIGURATION> |
|
<CONFIG_HANDLER |
UUID=
/> |
Universally Unique Identifier of the config handler in which are stored the filters to apply when expanding a configured product with effectivities. | |
</CONFIGURATION> |
[Top]
The format and contents of ORDERBY are explained below:
<ORDERBY> |
|
Attribute name must exist on Object defined in ENOVIA.xsd and must be a STRING type. | |
</ORDERBY> |
The following SelectExpression will deliver the attributes listed in the SELECT clause for the ENOVIA_ECO object specified in the Identifier:
<?xml version="1.0" encoding="UTF-8"?> |
[Top]
The following SelectExpression will deliver ENOVIA_ECO objects with the attributes listed in the SELECT clause for ENOVIA_ECO objects in Approved status and whose priority is 1.
<?xml version="1.0" encoding="UTF-8"?> |
[Top]
The following SelectExpression will return part instances with only one attribute specified in the SELECT clause. The Parent in this case is another Part Instance, so the PRC CATJsyUUID value is passed in the <PRC UUID="" />. Also, we want to apply the CONFIG_HANDLER, so it's CATJsyUUID value is passed in.
<?xml version="1.0"
encoding="UTF-8" ?> <FILTER CASESENSITIVE="FALSE" COMMAND="EXPAND"> <SELECT> <OBJECT DOMAIN="PRODUCT" NAME="VPMBOPartInstance"> <ATTRIBUTE NAME="ENOVIA_VPMItemInstance.V_instance_ID" /> <ATTRIBUTE NAME="ENOVIA_VPMPartMaster.V_ID" /> </OBJECT> </SELECT> <WHERE> <PRC UUID="108333B469000021D840FBEDB00005AE1F0000000007454E4F564C52345C00000005446F63496430000104454E4F56085644656661756C741F003C44424D533E3C7264623E3C454E4F434F4D4D4F4E3E454E4F434F4D4D4F4E2000000080A2B3BD0000520C383BE4980006C143454E4F44525F50524F44554354202020" /> <FILTER_CONDITION OPERATOR="AND"> <CONFIGURATION> <CONFIG_HANDLER UUID="108333B469000021D840FBEDB00005AE1F0000000007454E4F564C52345C00000005446F63496430000104454E4F56085644656661756C741F003C44424D533E3C7264623E3C454E4F434F4D4D4F4E3E454E4F434F4D4D4F4E2000000080A2B3BD0000520C383BE4980006C143454E4F44525F50524F44554354202020" /> </CONFIGURATION> </FILTER_CONDITION> </WHERE> </FILTER> |
[Top]
The following SelectExpression returns ENOVIA_CMAFFECTED_OBJECT with attributes specified in the SELECT clause for an ECO specified by the Identifier.
<?xml version="1.0" encoding="UTF-8"?> |
[Top]
SelectExpression is used as a filter for ENOVIA LCA V5 CAA Web services to return selected ENOVIA objects and attributes.
[Top]
[1] | Customization |
[Top] |
Version: 1 [May 2005] | Document created |
Version: 2 [Feb 2006] | Document updated |
[Top] |
Copyright © 2006, Dassault Systèmes. All rights reserved.