I am integrating the Documentum repository into our product. In doing so, I have been required to duplicate a page that mimics WebTop’s Advanced Search (WTAS) page. I have two issues described in the 2 parts below.
Part 1:
The WTAS page shows a list of 104 Object Types. I produced the following PassThrough query which, I hoped, would return that same list of 104 Object Types so that I can load them in my Object Type drop-down control. However, when I execute the Query 1 shown below and draw out the data from the DataPackage, I only get 33 Object Types. If I remove the sub-select clause shown in Query 2 below, I get 296 Object Types. Both are obviously wrong in that they don’t return 104 Object Types.
Query 1:
string dql = "SELECT label_text, type_name FROM dmi_dd_type_info " +
" WHERE type_name in " +
"(SELECT r_type_name FROM dmi_type_info " +
"WHERE any r_supertype = 'dm_document') " +
"ORDER BY label_text, type_name ";
Query 2:
string dql = "SELECT label_text, type_name FROM dmi_dd_type_info ";
Part 1 Questions:
1: Is there a better way to do this (i.e.: not use a query but use a DFS API – if so, what API)?
2: If a query is the best way, then explain what needs to be done to the query to return the 104 Object Types.
Part 2:
Keeping in mind that I’m replicating the Advanced Search page of WebTop, if an Object Type is selected from the drop-down list, I get back an unexpected number of entries when attempting to get the properties as well. For example, when selecting “dm_document” as the Object Type via WebTop, I get 46 entries loaded into the Properties list; however, when I execute my code, I get 87 entries.
For instance, for a given Type Name, such as “dm_document”, the following method returns a TypeInfo object which contains 87 Properties – not the expected 46 entries as WebTop provides.
public TypeInfo GetTypeInfo(string typeName) {
SchemaProfile schemaProfile = new SchemaProfile();
schemaProfile.IncludeProperties = true;
schemaProfile.IncludeValues = true;
serviceContext.SetProfile(schemaProfile);
OperationOptions operationOptions = null;
ServiceFactory serviceFactory = ServiceFactory.Instance;
ISchemaService schemaService =
serviceFactory.GetRemoteService<ISchemaService>
(DMServiceContext);
TypeInfo typeInfo = schemaService.GetTypeInfo(repository, null,
typeName, operationOptions);
return typeInfo;
}
Part 2 Questions:
1: My code uses an API to return the data (shown above). Am I missing a parameter to limit the number of returned Properties? Something else?
2: Would a PassThrough query be better? If so, what is the proper DQL syntax?
Thank you in advance.