——————— INSTALLATION / SERVER CONFIG ————————–


• Config folder Security

DQL>select folder_security from dm_docbase_config;
1 = enable

 

• Locales of docbase “Data Dictionary Locales”:

DQL>select  dd_locales from dm_docbase_config;
fr
en

 

• ACL default mode => 1 : folder

DQL>select default_acl from dm_server_config;

 

• DOCBASE OWNER (alias “dm_dbo”) represents the docbase owner.

DQL>select owner_name  from dm_docbase_config;
=> DEV : DEMAT_ADMIN_DEV
=> PROD : DEMAT_ADMIN_PROD

select operator_name  from dm_server_config;
=> DEV : DEMAT_ADMIN_DEV
=> PROD : DEMAT_ADMIN_PROD

SELECT * from dm_user where user_name = 'dm_dbo';
OR SELECT * from dm_user where user_name = 'DEMAT_ADMIN_DEV'; 
OR SELECT * from dm_user where user_name = 'DEMAT_ADMIN_PROD'; 

=> DEV :  
r_object_id=110157xxxxxxxxx1
user_name=DEMAT_ADMIN_DEV
user_os_name=DEMAT_ADMIN_DEV
user_group_name=docu

=> PROD : 
r_object_id=1101c0xxxxxxxxx1
user_name=DEMAT_ADMIN_PROD
user_os_name=DEMAT_ADMIN_PROD
user_group_name=docu

 

• DOCBASE ID from r_object_id : In Documentum every object has a unique identifier (r_object_id) in the repository for accessing it and this unique identifier is composed of a 16 digit hexadecimal(4-bits) value (8 bytes). The structure of the object id is composed of 2-digit hexadecimal id (object type – not the same as r_object_type attribute of an object), a 6 digit hexadecimal docbase id and a 8 digit unique identifier for the corresponding object.

  • Each Object Type is defined by a 2 digit hexadecimal identifier by Documentum Server internally : ’09’ for dm_document type, ‘0b’ for dm_folder type etc.
  • Each Object has the next 6 digits as the docbase id to which it belongs to. The docbase id is theoretically unique globally.
  • The rest of the 8 digit hexadecimal identifier defines a unique identifier to the object in the repository.


To get the DocbaseId :
– get a r_object_id : 090220c58052xxxx
– extract the 6 digits corresponding to the docbase id : 0220c5
– convert this hexa value to decimal : 0220c5 (HEXA) => 139461 (DECIMAL) (http://www.binaryhexconverter.com/hex-to-decimal-converter)
 


——————— CREATION DOCUMENT ————————–


• Creation instance of custom type via pure API (example 1 : with transaction)

API> begintran,c
API> create,c,my_huo_custom_type
...
0xxxxxxxxxxcf7
API> set,c,l,object_name
My object for document 09xxxxxx61
...
OK
API> set,c,l,acl_domain
dm_dbo
...
OK
API> set,c,l,acl_name
my_acl_business
...
OK
API> set,c,l,my_tgt_object_id
09xxxxxx61
...
OK
API> set,c,l,my_date,'dd/mm/yyyy hh:mi:ss'
27/02/2016 15:23:37
...
OK
API> set,c,l,my_title
Title reclassification
...
OK
API> set,c,l,my_description
From 'AAAAA' / 'BBBBB' / 'CCCCC'
...
OK
API> save,c,l
...
OK
API> commit,c

 
• Creation instance of custom type via pure API (example 2 : one-line commands, repeating, setfile)

API>create,c,my_huo_custom_type
...
09xxxxxxxdf
API> set,c,l,ref_doc,'SCAN-HUO-JAVA123456789'
...
OK
API> set,c,l,acl_name,'MY-ACL-HUO'
...
OK
API> set,c,l,acl_domain,dm_dbo
...
OK
API> set,c,l,status,6
...
OK
API> set,c,l,category,2
...
OK
API> set,c,l,is_reprise,0
...
OK
API> set,c,l,my_repeat_field1[0],'JAVALU123'
...
OK
API> set,c,l,my_repeat_field1[1],'JAVALU456'
...
OK
API> set,c,l,my_repeat_field2[0],'009'
...
OK
API> set,c,l,my_date1,DATE(now)
...
OK
API> set,c,l,my_date2,DATE(’05/31/2115’)

...
OK
API> set,c,l,my_date3,DATE('NULLDATE')

...
OK
API> set,c,l,object_name,'MY_DOC_JAVALU123456'

...
OK
API> set,c,l,a_content_type
pdf
...
OK
API> setfile,c,l,T:\HUO\myPDFfile.pdf
...
OK
API> link,c,l,'/Cabinet1/Folder1/Folder12/01 - Mon Dossier 1' 
...
OK
API> link,c,l,'/Cabinet1/Folder2/Folder22/01 - Mon Dossier 2'
...
OK
API> save,c,l
...
OK

 
• Creation instance of custom type via pure API (example 3 : repeating, setfile)

API> create,c,my_huo_custom_type
...
090xxxxxx08
API> set,c,l,acl_domain
dm_dbo
...
OK
API> set,c,l,acl_name
MY-ACL-HUO
...
OK
API> set,c,l,status
6
...
OK
API> set,c,l,my_repeat_field1[0]
70130069
...
OK
API> set,c,l,my_repeat_field1[1]
70017877
...
OK
API> set,c,l,my_repeat_field2[0]
009
...
OK
API> set,c,l,my_date1
31/05/2016
...
OK
API> set,c,l,my_date2
31/05/2115
...
OK
API> set,c,l,my_date3
NULLDATE
...
OK
API> set,c,l,ref_doc
SCAN-HUO-JAVA123456789
...
OK
API> set,c,l,is_reprise
0
...
OK
API> set,c,l,object_name
MY_DOC_JAVALU123456
...
OK
API> set,c,l,category
2
...
OK
API> link,c,l,'/Cabinet1/Folder1/Folder12/01 - Mon Dossier 1' 
...
OK
API> link,c,l,'/Cabinet1/Folder2/Folder22/01 - Mon Dossier 2'
...
OK
API> set,c,l,a_content_type
pdf
...
OK
API> setfile,c,l,T:\HUO\myPDFfile.pdf
...
OK
API> save,c,l
...
OK

 
• Creation instance of custom type via pure API (example 4 : DM_API_E_CANT_UPDATE error, m_DMCLEAN, )

API> create,c,my_huo_custom_type
...
090xxxxxca

090xxxxxca = r_object_id of the newly created object

API> set,c,090xxxxxca,object_name
DATA=MY_DOC_JAVALU123456
...
API> set,c,090xxxxxca,a_content_type
DATA=pdf
...
API> setfile,c,090xxxxxca,T:\HUO\myPDFfile.pdf
...
API> link,c,090xxxxxca,'/Temp'
...
API> save,c,090xxxxxca
...
[DM_API_E_CANT_UPDATE]error:  "Cannot Save/Check-in object <> because the object is marked invalid.  This is most likely due to an error from a prior operation performed on the object."

As explained in https://community.emc.com/thread/132068?tstart=0, This error occurs if the previous operation on this object Id has got into trouble due to Network / docbase errors.
To get around this clear the _status attribute of the object by reset, c, Object_Id

API> reset,c,090xxxxxca
...
OK
API> save,c,090xxxxxca
...
OK

…checking of creation and deleting

DQL>select r_object_id, i_contents_id from my_huo_custom_type WHERE r_object_id = '090xxxxxca';
090xxxxxca	060yyyyyyyyyyyb8

DQL>select r_object_id, parent_id  from dmr_content WHERE r_object_id = '060yyyyyyyyyyyb8';
060yyyyyyyyyyyb8	090xxxxxca

DQL>execute get_path for '060yyyyyyyyyyyb8';
D:\Documentum\data\mydocbase\content_storage_01\xxxxxx\80\02\6c\6b.pdf

DQL>SELECT  * FROM dm_document WHERE folder('/Temp');
090xxxxxca	MY_DOC_JAVALU123456 ....

DQL>DELETE my_huo_custom_type objects where r_object_id = '090xxxxxca';
1

DQL>select r_object_id, i_contents_id from my_huo_custom_type WHERE r_object_id = '090xxxxxca';
=> nothing

DQL>select r_object_id, parent_id  from dmr_content WHERE r_object_id = '060yyyyyyyyyyyb8';
060yyyyyyyyyyyb8 ''

DA>EXECUTION DU JOB dm_DMCLEAN

DQL>select r_object_id, parent_id  from dmr_content WHERE r_object_id = '060yyyyyyyyyyyb8';
=> nothing

 


——————— UPDATE DOCUMENT ————————–


• Updating a document via API using DQL

API> execquery,c,F,UPDATE my_doc_pj OBJECTS SET my_attr1=0, SET my_attr2=1, SET my_attr3=1, SET object_name='MY_DOC PIECE IDENTITE' WHERE r_object_id = '0901xxxxxxxf'
...
OK

 
• Updating a document in pure API (SOLUTION 1)

API> fetch,c,0901xxxxxf
...
OK
API> set,c,l,object_name
MY_DOC_PIECE IDENTITE
...
OK
API> set,c,l,my_attr1,0
...
OK
API> set,c,l,my_attr2,1
...
OK
API> set,c,l,my_attr3,1
...
OK
API> save,c,l
...
OK

 
• Updating a document in pure API (SOLUTION 2)

API> retrieve,c,my_doc_pj where r_object_id = '090xxxxxxxx6df'
...
090xxxxxxxx6df
API> set,c,l,my_attr1,0
...
OK
API> set,c,l,my_attr2,1
...
OK
API> set,c,l,my_attr3,1
...
OK
API> set,c,l,object_name
MY_DOC_PIECE IDENTITE
...
OK
API> save,c,l
...
OK

 
• Updating a document in pure API (SOLUTION 3)

API> set,c,080xxxxxxxxxx7a,event_date,'dd/mm/yyyy hh:mi:ss'
27/02/2017 13:11:19
...
OK
API> save,c,080xxxxxxxxxx7a
...
OK
API> set,c,080xxxxxx1d,event_date,'dd/mm/yyyy hh:mi:ss'
27/02/2017 13:11:19
...
OK
API> save,c,080xxxxxx1d
...
OK
API> set,c,080xxxxxxc50,event_date,'dd/mm/yyyy hh:mi:ss'
27/02/2017 13:11:19
...
OK
API> save,c,080xxxxxxc50
...
OK

 
• Updating a document in pure DQL

DQL>UPDATE my_doc_pj  (ALL) OBJECTS set owner_name='myuser1' where owner_name='myuser2';
UPDATE my_doc_pj  OBJECTS set my_attr10='6' where r_object_id ='[id]';

 
• Updating a repeating attribute of document in pure DQL

DQL>UPDATE my_doc_pj  (ALL) OBJECTS SET my_attr_repeating1[0]='0111', SET my_attr_repeating1[1] = '7878', SET my_attr_repeating1[2] = '4545', SET my_attr_repeating2[0] = '814', SET my_attr_repeating2[1] = '001', SET my_attr10=5  where r_object_id='090xxxxxxxxx62';

 
• Deleting a value in a repeating attribute of document in pure API

API> remove,c,0901xxxxxxxxxxx62,my_attr_repeating1[1]
...
OK
API> remove,c,0901xxxxxxxxxxx62,my_attr_repeating1[2]
...
[DM_OBJECT_W_DELETE_ATTR_POSITION_ERROR]warning:  "attempt to delete non-existent attribute 86"
API> remove,c,0901xxxxxxxxxxx62,my_attr_repeating1[1]
...
OK
API> save,c,0901xxxxxxxxxxx62
...
OK
API> remove,c,0901xxxxxxxxxxx62,my_attr_repeating2[1]
...
OK
API> save,c,0901xxxxxxxxxxx62
...
OK

 
• Updating a value in simple attribute, repeating attribute and attached aspect’s attribute of a immutable document in pure API.
Note: For the aspect’s attributes, it is necessary to execute these command through DFC (via DA), NOT through DLL (dqMan) otherwise a “[DM_API_E_BADATTRNAME]error: “Bad attribute name ‘my_huo_afs.my_attr’ for document/object.”” occurs.

API>set,c,{r_object_id},r_immutable_flag
SET>0
...
OK
API>insert,c,{r_object_id},my_huo_aspect.projects_number[{pos}]
SET>{project_number}
...
OK
API>set,c,{r_object_id},my_attribute1
SET>my_value1
...
OK
API>save,c,{r_object_id}
...
OK
API>set,c,{r_object_id},r_immutable_flag
SET>1
...
OK
API>save,c,{r_object_id}
...
OK

 


——————— CONTENT/RENDITON ————————–


• Document with a XML rendition

DQL> select r_object_id, rendition, parent_count, content_size, full_format, format, page, page_modifier, storage_id from dmr_content where any parent_id = '09xxxxxxxxxxxxxxx4';
...
060xxxxxxxxxxx50	0	1	11739	pdf	270xxxxxxxxxxxxc9	0		280xxxxxxxxxx100
060xxxxxxxxxxx51	2	1	2447	xml	270xxxxxxxxxxxxff	0		280xxxxxxxxxx100

### Get the CONTENT (or primary rendition) of first logical page

API>  getfile,c,09xxxxxxxxxxxxxxx4
...
C:\APP\dqMan\MYSERVER\dmcl\00xxxx5\....\mydoc.pdf

### Get the CONTENT of a XML rendition of first logical page

API> getfile,c,09xxxxxxxxxxxxxxx4,,xml
...
C:\APP\dqMan\MYSERVER\dmcl\00xxxx5\....\mydoc.xml

 

• Count of content by subtype of dm_document:

DQL> select d.r_object_type, count(d.i_contents_id) from dmr_content c, dm_document d where any c.parent_id = d.r_object_id group by d.r_object_type;
dm_document	21366
my_subytpe1_document	66
my_subytpe2_document	185
...

 

• Size of all contents in repository/docbase in Mo, only of CURRENT version of dm_document, only of all versions of dm_document:

DQL> select sum(content_size)/(1024*1024) from dmr_content;
TEST = 6388.72165775299 (~6Go)
PROD = 1021340.92345428 (~1To)
...
DQL> select sum(r_full_content_size)/(1024*1024) from dm_document;
42646.2632694244
...
DQL> select sum(r_full_content_size)/(1024*1024) from dm_document (ALL);
59575.4518547058
...
select (((sum(full_content_size)/1024)/1024)/1024) as sizein_GB from dmr_content
sizein_GB
73.3642595726997

 


——————— FOLDER/CABINET ————————–


• Count of subdirectories in a directory

DQL>SELECT count(object_name) FROM dm_folder WHERE FOLDER('/Temp') AND object_name LIKE 'dm%' ;
0
DQL>SELECT count(object_name) FROM dm_folder WHERE FOLDER('/Temp',descend) AND object_name LIKE 'dm%' ;
42

 

• Count of documents (all versions) in a directory

DQL> SELECT count(mytype.r_object_id) FROM my_subtype_document (ALL) mytype, dm_folder dmfolder  
WHERE FOLDER('/MY_CLIENTS',descend)
	AND any mytype.i_folder_id=dmfolder.r_object_id 
	AND dmfolder.r_folder_path IS NOT NULLSTRING
	AND dmfolder.r_folder_path like '/MY_CLIENTS/1789%'
ENABLE (ROW_BASED);
123

 

• Get the physical folderpath of CONTENT (or primary rendition) of first logical page

API> getpath,c,090xxxxxxxx27
...
\\MYFILESERVER\data\MY_DOCBASE_DEV\content_storage_01\000xxxx5\yy\xx\ce\8e.xls

### Get the physical folderpath of CONTENT on CENTERA

API> getpath,c,090xxxxxxxxfc
...
8HP8XXXXXXXXXXXXXXPU

 


——————— LEFT OUTER JOIN ————————–


• Use of LEFT OUTER JOIN in DQL:

DQL> select d.r_object_id, p.project_id, c.company_id 
from my_document d 
left outer join dm_dbo.myproject p on d.project_id = p.project_id
left outer join dm_dbo.mycompany c on d.company_id = c.company_id
where r_object_id IN(
'09xxxxxxxxxxx3'
) order by r_modify_date desc;
...
r_object_id=09xxxxxxxxxxx3
project_id=
company_id=123456

 

• Use of LEFT OUTER JOIN in DQL with sub-query calculating the position of 2 aliasnames ‘MyFirstAlias’ and ‘MySecondAlias’ in aliasset whose name begins with ‘AS_project_%’ and does not end with ‘% _archived’:

DQL> select alias_set.r_object_id, myfirstalias.pos as myfirstalias_pos, mysecondalias.pos as mysecondalias_pos 
from dm_alias_set alias_set 
left outer join (select r_object_id, -(i_position+1) as pos from dm_dbo.dm_alias_set_r where alias_name in ('MyFirstAlias')) myfirstalias on alias_set.r_object_id = myfirstalias.r_object_id 

left outer join (select r_object_id, -(i_position+1) as pos from dm_dbo.dm_alias_set_r where alias_name in ('MySecondAlias')) mysecondalias on alias_set.r_object_id = mysecondalias.r_object_id 

where alias_set.object_name LIKE 'AS\_project\_%'  escape '\' AND  LOWER(alias_set.object_name) NOT LIKE '%_archived' ;

............
66xxxxxxxxxx11	0	2
66xxxxxxxxxx01	1	3
66xxxxxxxxxxe2	1	3

...........
#Generation of API script via dqMan:

remove,c,{r_object_id},alias_name[{myfirstalias_pos}]
remove,c,{r_object_id},alias_value[{myfirstalias_pos}]
remove,c,{r_object_id},alias_category[{myfirstalias_pos}]
remove,c,{r_object_id},alias_usr_category[{myfirstalias_pos}]
remove,c,{r_object_id},alias_description[{myfirstalias_pos}]
remove,c,{r_object_id},alias_name[{mysecondalias_pos}]
remove,c,{r_object_id},alias_value[{mysecondalias_pos}]
remove,c,{r_object_id},alias_category[{mysecondalias_pos}]
remove,c,{r_object_id},alias_usr_category[{mysecondalias_pos}]
remove,c,{r_object_id},alias_description[{mysecondalias_pos}]
append,c,{r_object_id},alias_name
MyNewAlias
append,c,{r_object_id},alias_value
all_teams_users
append,c,{r_object_id},alias_category
2
append,c,{r_object_id},alias_usr_category
-1
append,c,{r_object_id},alias_description
Alias entry for all teams
save,c,{r_object_id}

 


——————— REPEATING ATTRIBUTE ————————–


• Calculate the POSITION of aliasnames ‘Readers’ and ‘Editors’ in ALIAS SETs (repeating attribute):

DQL> describe dm_dbo.dm_alias_set_r;
...
alias_category	Integer	
alias_description	Char(255)	
alias_name	Char(32)	
alias_usr_category	Integer	
alias_value	Char(255)	
i_position	Integer	
r_object_id	Char(16)	

DQL>describe dm_dbo.dm_alias_set_s;
...
i_is_replica	Integer	
i_vstamp	Integer	
object_description	Char(128)	
object_name	Char(32)	
owner_name	Char(255)	
r_object_id	Char(16)	

DQL>select r_object_id, -(i_position+1) as pos, alias_name from dm_dbo.dm_alias_set_r where alias_name in ('Readers','Editors') order by 1 asc, 2 desc;
...
660xxxxxxxxxxx36	16	Editors
660xxxxxxxxxxx36	14	Readers
660xxxxxxxxxxxc7	3	Editors
660xxxxxxxxxxxc7	1	Readers

API> dump,c,660xxxxxxxxxxxc7
...
USER ATTRIBUTES
  owner_name                 : mysuper001
  object_name                : AS_myproject_123456
  object_description         : Alias set for my docs of project 123456
  alias_name             [ 0]: OtherTeamMembers
                         [ 1]: Readers
                         [ 2]: Contributors
                         [ 3]: Editors
                         [ 4]: Administrators
  alias_value            [ 0]: my_grp_nobody
                         [ 1]: my_grp_all
                         [ 2]: my_grp_nobody
                         [ 3]: my_grp_nobody
                         [ 4]: my_grp_nobody
  alias_category         [ 0]: 2
                         [ 1]: 2
                         [ 2]: 2
                         [ 3]: 2
                         [ 4]: 2
  alias_usr_category     [ 0]: -1
                         [ 1]: -1
                         [ 2]: -1
                         [ 3]: -1
                         [ 4]: -1
  alias_description      [ 0]: 
                         [ 1]: 
                         [ 2]: 
                         [ 3]: 
                         [ 4]: 
SYSTEM ATTRIBUTES
  r_object_id                : 660xxxxxxxxxxxc7
APPLICATION ATTRIBUTES
INTERNAL ATTRIBUTES
  i_is_replica               : F
  i_vstamp                   : 15

 


——————— DOCUMENT PROPERTIES ————————–


• Displaying all the attributes of an object (except of aspect’s attributes attached)

API>dump,c,4c01cxxxxxxae
...
r_object_id : 4c01cxxxxxxae
object_name : test name
title :
...

 

• Generate the query in order to create a custom type (via SAMSON)

DQL> genesis my_type;
...
CREATE TYPE my_type (
id_client CHAR(32) REPEATING,
format INT,
date_reception DATE,
date_creation DATE,
statut_valid INT,
type_doc CHAR(7) REPEATING,
category INT,
refs_operation CHAR(25) REPEATING,
reprise BOOL,
date_validite DATE,
ref_doc CHAR(100),
scan_date DATE,
my_comments_hist CHAR(255) REPEATING,
merging_parents_id ID REPEATING,
code CHAR(32),
my_comment CHAR(255)
)
WITH SUPERTYPE dm_document
go

ALTER TYPE my_type MODIFY 
my_comments_hist CHAR(512),
my_comment CHAR(512)
go

 

• Display the attribute informations of a custom type

DQL> describe my_type;
or
API> describe,c,type,my_type;

.....
DQL> describe my_type;
Type Name:	my_type
SuperType Name:	dm_document

Attributes:	   112

object_name                       CHAR(255) 
r_object_type                     CHAR(32)  
title                             CHAR(400) 
subject                           CHAR(192) 
authors                           CHAR(48)    REPEATING
keywords                          CHAR(48)    REPEATING
a_application_type                CHAR(32)  
a_status                          CHAR(16)  
r_creation_date                   TIME      
r_modify_date                     TIME      
r_modifier                        CHAR(32)  
r_access_date                     TIME      
a_is_hidden                       BOOLEAN   
i_is_deleted                      BOOLEAN   
a_retention_date                  TIME      
a_archive                         BOOLEAN   
a_compound_architecture           CHAR(16)  
a_link_resolved                   BOOLEAN   
i_reference_cnt                   INTEGER   
i_has_folder                      BOOLEAN   
i_folder_id                       ID          REPEATING
r_composite_id                    ID          REPEATING
[...]
r_immutable_flag                  BOOLEAN   
r_frozen_flag                     BOOLEAN   
r_has_events                      BOOLEAN   
acl_domain                        CHAR(32)  
acl_name                          CHAR(32)  
[...]
i_partition                       INTEGER   
i_is_replica                      BOOLEAN   
i_vstamp                          INTEGER   
[...]
id_client CHAR(32)                REPEATING
format                            INTEGER   
date_reception                    DATE
date_creation                     DATE
statut_valid                      INTEGER   
type_doc                          CHAR(7) REPEATING
category                          INTEGER   
refs_operation                    CHAR(25) REPEATING
reprise                           BOOL
date_validite                     DATE
ref_doc                           CHAR(100)
scan_date                         DATE
my_comments_hist                  CHAR(512) REPEATING
merging_parents_id                ID REPEATING
code                              CHAR(32)
my_comment                        CHAR(512)

 


——————— INDEX ————————–


• Creation of DCTM INDEX via MAKE_INDEX DQL command. The Superuser privileges is needed to use this method.
The attribute belongs to my_huo_type type, creation of simple index via the following sentence:

dql>EXECUTE make_index WITH type_name = 'my_huo_type', attribute = 'my_huo_field1'

 
The attributes and belong to my_huo_type type, creation of composite index via the following sentence:

dql>EXECUTE make_index WITH type_name = 'my_huo_type', attribute = 'my_huo_field12', attribute = 'my_huo_field34'

 
IN ORACLE : Creation of an index (DataBase level) in my table MY_TABLE whith the next command:

CREATE INDEX indice_huo_1 ON MY_HUO_TABLE_S (ID_OBJECT,MY_HUO_FIELD2)

 
Creation of index on attributes my_huo_field96 belongs to my_huo_aspect ASPECT, via the following sentence:

  1. Find the internal name (aspect table) of an aspect:
    dql>select i_attr_def from dmc_aspect_type   where object_name = 'my_huo_aspect';
    dmi_030xxxxxx0b
    
  2. Make the index
    dql>EXECUTE make_index WITH type_name = 'dmi_030xxxxxx0b', attribute='my_huo_field96'

 
• Destroying a user-defined object type index via DROP_INDEX DQL command :
The Superuser privileges is needed to use this method.
These examples illustrate using EXECUTE to drop a user-defined index on the dm_user object type. The first example identifies the index by its name, user_index, and the second example identifies the index by its object ID.

dql>EXECUTE drop_index WITH name=’user_index’
dql>EXECUTE drop_index FOR ’1f00000011231563a’

 
• List the indexes on my_huo_type type

dql>select i.r_object_id as index_id, i.index_type as type_id, i.attribute as attributes, i.attr_count, i.name as index_name, i.data_space 
from dmi_index i  
where any i.attribute >= 0 and i.index_type in (select t.r_object_id from dm_type t where t.name='my_huo_type'); 
...
1fxxxxx00	030xxxxxx25a	117	1	IDX_HUO_TYPE_MY_HUO_FIELD_1 DM_MY_DOCBASE_DEV_INDEX
1fxxxxx52	030xxxxxx25a	101,114	2	IDX_HUO_TYPE_MY_HUO_FIELD_1_AND_3	DM_MY_DOCBASE_DEV_INDEX


select * from dm_type t where t.name='my_huo_type';
  name                       : my_huo_type
  attr_name             [117]: my_huo_field1
                        [101]: my_huo_field2
                        [114]: my_huo_field3

 
• List the indexes on my_huo_aspect ASPECT:

dql>select i.r_object_id as index_id, i.index_type as type_id, i.attribute as attributes, i.attr_count, i.name as index_name, i.data_space 
from dmi_index i  
where any i.attribute >= 0 and i.index_type in (select t.r_object_id from dm_type t where t.name='dmi_03xxxxxx57'); 

1f0xxxxxxxxe45	030xxxxxxx257	2	1	IDX_MAILASP_APPROVERS	DM_MY_DOCBASE_DEV_INDEX
1f0xxxxxxxxe46	030xxxxxxx257	3	1	IDX_MAILASP_REQUESTER	DM_MY_DOCBASE_DEV_INDEX
1f0xxxxxxxxe48	030xxxxxxx257	3	2	IDX_MAILASP_STATUS_REQ	DM_MY_DOCBASE_DEV_INDEX
1f0xxxxxxxxe48	030xxxxxxx257	0	2	IDX_MAILASP_STATUS_REQ	DM_MY_DOCBASE_DEV_INDEX

• Check if an index exists on an attribute my_huo_field123 of my_huo_type:

dql>select i.r_object_id as index_id, i.index_type as type_id, i.attribute as attributes, i.attr_count, i.name as index_name, i.data_space 
from dmi_index i  
where any i.attribute >= 0 and i.index_type in (select t.r_object_id from dm_type t where t.name='my_huo_type')
and any i.attribute IN (
	select -(r.i_position+1) 
	from dm_dbo.dm_type_r r, dm_dbo.dm_type_s s 
	where r.attr_name in ('my_huo_field123') 
		and r.r_object_id = s.r_object_id 
	and s.name = 'my_huo_type'
); 

 


——————— WORKFLOW ————————–


• Getting a List of All the Installed Workflows.
->Workflow template must be “installed”, which means that all of its associated activities are all valid and installed.

select * from dm_process where r_definition_state=2;
...
r_definition_state
0 = Draft
1 = Validated
2 = Installed

 

• To view task in inbox
The following query will return the items in myuser1’s inbox. In this query, the item_id is the r_object_id of the document in the inbox and the stamp is the r_object_id of the dmi_queue_item that represents the work item.

SELECT stamp, item_id, item_name, date_sent, priority FROM dm_queue WHERE name = 'myuser1'

 


——————— TRANSACTION ————————–


• Transaction management in pure API.

begintran,c
#
retrieve,c,my_custom_type where r_object_id = '090xxxxxxxxxd' AND my_title = '123456 JAVA.LU'
set,c,l,acl_name
my_acl_huo123
save,c,l
#
commit,c
### abort,c

 

• Transaction management in pure DQL.

########### Example 1 : NO TRANSACTION -> COMMIT AUTO
UPDATE my_custom_document objects SET company_name='ICAP PlcXXXXX' WHERE project_id=0 AND r_object_id IN ('090220c5804ebb5d','090220c5804ebb5e','090220c5804ebb61');


########### Example 2 : COMMIT AUTO
BEGIN TRAN;
UPDATE my_custom_document objects SET company_name='ICAP PlcXXXXX' WHERE project_id=0 AND r_object_id IN ('090220c5804ebb5d','090220c5804ebb5e','090220c5804ebb61');


########### Example 3 : EXPLICIT TRANSACTION COMMITED
BEGIN TRAN;
UPDATE my_custom_document objects SET company_name='ICAP PlcXXXXX' WHERE project_id=0 AND r_object_id IN ('090220c5804ebb5d','090220c5804ebb5e','090220c5804ebb61');
COMMIT TRAN;


########### Example 4 : EXPLICIT TRANSACTION ABORTED
BEGIN TRAN;
UPDATE my_custom_document objects SET company_name='ICAP PlcXXXXX' WHERE project_id=0 AND r_object_id IN ('090220c5804ebb5d','090220c5804ebb5e','090220c5804ebb61');
ABORT TRAN;

 


——————— COUNT HAVING ————————–


• Example 1:

select r_object_id, count(my_repeat_field1), count(my_repeat_field2)
from my_subtype_document 
group by r_object_id 
HAVING count(my_repeat_field1)>1 AND count(my_repeat_field2)>1
enable (ROW_BASED) ;

 


——————— AUDIT TRAIL ————————–


• Creation of AuditTrail object via pure API:

create,c,dm_audittrail
set,c,l,event_name
my_event_huo_name
set,c,l,event_source
My process
set,c,l,user_name
My process
set,c,l,audited_obj_id
09xxxxxx62
set,c,l,string_1
Value Str 1
set,c,l,string_2
Value Str 2
set,c,l,string_3
Value Str 3
set,c,l,id_1
09xxxxx621
set,c,l,id_2
09xxxxxx622
set,c,l,sid_3
09xxxxxx623
save,c,l

The informations user_id, session_id, owner_name, time_stamp, time_stamp_utc, host_name are filled automatically by Content Server. Yet, the informations acl_name, acl_domain, chronicle_id, object_type, version_label, object_name are extracted from the audited object (audited_obj_id).
 
• Deleting of existing AuditTrail object via pure API:

API> retrieve,c,dm_audittrail where r_object_id ='5f0xxxxxx7'
...
5f0xxxxxx7
API> destroy,c,l
...
OK

 
• Updating of existing AuditTrail object via DQL or API => It is not possible.

DQL> UPDATE dm_audittrail OBJECTS set user_name='huseyin1' where event_name = 'my_event' and r_object_id ='5f02xxxxxxxa'
...
[DM_QUERY_E_UP_NOT_UPDATEABLE]error:  "You have specified a non updateable type name (dm_audittrail)."
...

API> fetch,c,5f02xxxxxxxa
...
OK
API> set,c,l,user_name
huseyin1
...
OK
API> save,c,l
...
[DM_AUDITTRAIL_E_CANT_MODIFY]error:  "You can not modify any existing AuditTrail object 5f02xxxxxxxa."

 


——————— GROUP / USER ————————–


• User creation via API:

create,c,dm_user
set,c,l,user_name
my_browse_user
set,c,l,user_os_name
my_browse_user
set,c,l,user_privileges
0
set,c,l,client_capability
0
save,c,l

 
• Group creation via API:

create,c,dm_group
set,c,l,group_name
access-browse-my-group
set,c,l,owner_name
dm_dbo
set,c,l,is_private
F
set,c,l,globally_managed
F
set,c,l,group_class
group
set,c,l,description
Browse access to all documents 
save,c,l

 
• Add group and user to group via API/DQL:

execquery,c,F,alter group 'access-main-delete-group' add 'my-sub-group-1';
execquery,c,F,alter group 'access-main-delete-group' add 'MyHuoUser1';
close,c,q0
...
# access-main-delete-group / groups_names            []: <none>
retrieve,c,dm_group where group_name = 'access-main-delete-group'
append,c,l,groups_names
my-sub-group-1
append,c,l,groups_names
my-sub-group-2
save,c,l

 
• Remove subgroup and user from group via API/DQL:

execquery,c,F,alter group 'access-main-delete-group' drop 'my-sub-group-1';
execquery,c,F,alter group 'access-main-delete-group' drop 'MyHuoUser1';
close,c,q0
...
# access-main-delete-group / groups_names            [0]: my-sub-group-1 [1]: my-sub-group-2
retrieve,c,dm_group where group_name = 'access-main-delete-group'
remove,c,l,groups_names[1]
save,c,l

 
• The groups of an user via DQL:

select g.group_name from dm_group g, dm_user u where any g.users_names = u.user_name and u.user_name IN ('huseyin1');
...
development_team
ecm_team

 
• Number of users in a group (not including subgroup users) via DQL:

select count(u.user_name), g.group_name from dm_group g, dm_user u 
where any g.users_names = u.user_name and (g.group_name like 'ecm_team%') 
group by g.group_name;
...
10	ecm_team

 
• Number of users in a group including subgroup users via DQL:

SELECT count(DISTINCT i_all_users_names),group_name FROM dm_group g 
WHERE (g.group_name like 'grp-%' or group_name like 'ecm_team%') 
group by g.group_name;
...
80	ecm_team

 
• Users in a group (not including subgroup users) via DQL:

select u.user_name from dm_group g, dm_user u  where any g.users_names = u.user_name and g.group_name = 'ecm_team';
huseyin1
...
10 rows

 
• Users in a group including subgroup users via DQL:

select i_all_users_names from dm_group g where g.group_name = 'ecm_team';
huseyin1
...
80 rows

 
• Subgroup and supergroup of ‘grp_all’ and ‘ecm_team’ groups via DQL:

select distinct group_name, groups_names, i_supergroups_names from DM_GROUP where group_name IN ('grp_all') ENABLE (ROW_BASED);
...
grp_all		ecm_team	grp_all

select distinct group_name, groups_names, i_supergroups_names from DM_GROUP where group_name IN ('ecm_team') ENABLE (ROW_BASED);
...
ecm_team	____		grp_all

 
• Number of users according to each state via DQL:

select count(user_name), user_state from dm_user where user_name not  like 'dm_%' group by user_state;
...
count(dm_user.user_name)  user_state  
5128	1
131205	0
2	3
...
0, indicating a user who can log in (= active)
1, indicating a user who cannotlog in (= inactive)
2, meaniing a user who is locked
3, meaning a user who is locked and inactive

 
• Group docu : The docu group is the default documentum group which contains repository_owner, installation_owner, dm_autorender_win32, dm_autorender_mac, dm_mediaserver, superusers:

select owner_name  from dm_docbase_config;
DEMAT_ADMIN_DEV
....
select operator_name  from dm_server_config;
DEMAT_ADMIN_DEV
....
SELECT * from dm_group where group_name = 'docu';
  i_all_users_names       [0]: DEMAT_ADMIN_DEV
                          [1]: dm_autorender_mac
                          [2]: mysuperuser
                          [3]: dm_mediaserver
                          [4]: dm_autorender_win31
                          
  users_names             [0]: DEMAT_ADMIN_DEV
                          [1]: mysuperuser
                          [2]: dm_autorender_win31
                          [3]: dm_autorender_mac
                          [4]: dm_mediaserver
 

 
• Group admingroup = When you grant Superuser privileges to a user, you may also need to add that user to the admingroup group to enable them to run jobs or administration methods. The admingroup group is created at server installation or upgrade, when the administration tool suite is installed. It contains all the Superusers in the repository. At server installation, there are the repository owner and installation owner. After an upgrade, it contains all Superusers in the repository. Members of the admingroup group have no inherent privileges other than those they have as Superusers. However, administrative jobs, methods, and other related objects use an ACL which restricts their use to the admingroup group.

select owner_name  from dm_docbase_config;
DEMAT_ADMIN_DEV
....
select operator_name  from dm_server_config;
DEMAT_ADMIN_DEV
....
SELECT * from dm_group where group_name = 'admingroup';
  users_names             [1]: DEMAT_ADMIN_DEV
                          [2]: dm_fulltext_index_user
                          [3]: mysuperuser
                          
  i_all_users_names       [0]: mysuperuser
                          [1]: dm_fulltext_index_user
                          [2]: DEMAT_ADMIN_DEV

 

 
 


——————— ACL ————————–


• Creation of User ACL (acl_class=0) via API

API> begintran,c
...
OK
API> create,c,dm_acl
...
450xxxxxxxxxxxx23
API> set,c,l,object_name
TEST ACL HUO World Write
...
OK
API> set,c,l,owner_name
dm_dbo
...
OK
API> set,c,l,description
All Users have Write Access
...
OK
API> grant,c,l,dm_world,AccessPermit,,6
...
OK
API> grant,c,l,dm_owner,AccessPermit,,7
...
OK
API> grant,c,l,mysuperuser,AccessPermit,,7
...
OK
API> save,c,l
...
OK
API> commit,c
...
OK


API> dump,c,450xxxxxxxxxxxx23
...
USER ATTRIBUTES

  object_name                : TEST ACL HUO World Write
  description                : All Users have Write Access
  owner_name                 : MYDOCBASEDEV
  globally_managed           : F
  acl_class                  : 0

SYSTEM ATTRIBUTES

  r_object_id                : 450xxxxxxxxxxxx23
  r_is_internal              : F
  r_accessor_name         [0]: dm_world
                          [1]: dm_owner
                          [2]: mysuperuser
  r_accessor_permit       [0]: 6
                          [1]: 7
                          [2]: 7
  r_accessor_xpermit      [0]: 0
                          [1]: 0
                          [2]: 0
  r_is_group              [0]: F
                          [1]: F
                          [2]: F
  r_has_events               : F
  r_permit_type           [0]: 0
                          [1]: 0
                          [2]: 0
  r_application_permit    [0]: 
                          [1]: 
                          [2]: 
  r_template_id              : 0000000000000000
  r_alias_set_id             : 0000000000000000

APPLICATION ATTRIBUTES


INTERNAL ATTRIBUTES

  i_has_required_groups      : F
  i_has_required_group_set   : F
  i_has_access_restrictions  : F
  i_partition                : 0
  i_is_replica               : F
  i_vstamp                   : 0

 
 
• Modification of previous ACL via API

API> retrieve,c,dm_acl where object_name = 'TEST ACL HUO World Write'
...
450xxxxxxxxxxxx23
API> grant,c,l,dm_world,AccessPermit,,1
...
OK
API> save,c,l
...
OK

# Others instructions:
#grant,c,l,dm_world,AccessPermit,,1
#grant,c,l,my_grp1,AccessPermit,,7
#grant,c,l,my_grp2,AccessPermit,,5
#revoke,c,l,dm_world,ExtendedPermit,,EXECUTE_PROC
#grant,c,l,my_grp1,ExtendedPermit,,CHANGE_LOCATION
#grant,c,l,my_grp2,ExtendedPermit,,CHANGE_PERMIT



API> dump,c,450xxxxxxxxxxxx23
...
USER ATTRIBUTES

  object_name                : TEST ACL HUO World Write
  description                : All Users have Write Access
  owner_name                 : MYDOCBASEDEV
  globally_managed           : F
  acl_class                  : 0

SYSTEM ATTRIBUTES

  r_object_id                : 450xxxxxxxxxxxx23
  r_is_internal              : F
  r_accessor_name         [0]: dm_world
                          [1]: dm_owner
                          [2]: mysuperuser
  r_accessor_permit       [0]: 1		--- modified ---
                          [1]: 7
                          [2]: 7
  r_accessor_xpermit      [0]: 0
                          [1]: 0
                          [2]: 0
  r_is_group              [0]: F
                          [1]: F
                          [2]: F
  r_has_events               : F
  r_permit_type           [0]: 0
                          [1]: 0
                          [2]: 0
  r_application_permit    [0]: 
                          [1]: 
                          [2]: 
  r_template_id              : 0000000000000000
  r_alias_set_id             : 0000000000000000

APPLICATION ATTRIBUTES


INTERNAL ATTRIBUTES

  i_has_required_groups      : F
  i_has_required_group_set   : F
  i_has_access_restrictions  : F
  i_partition                : 0
  i_is_replica               : F
  i_vstamp                   : 2

 
 
• Deleting of ACL via API

API> retrieve,c,dm_acl where object_name = 'TEST ACL HUO World Write'
...
450xxxxxxxxxxxx23
API> destroy,c,l
...
OK

 
 


——————— ALIAS SET / TEMPLATE ACL (PERMISSION SET TEMPLATE) ————————–


• Creation of Alias Set (dm_alias_set) via API

API> begintran,c
...
OK
API> create,c,dm_alias_set
...
660xxxxxxd3e
API> set,c,l,object_name
TEST AS HUO Simple
...
OK
API> set,c,l,owner_name
dm_dbo
...
OK
API> set,c,l,object_description
Desc 4 TEST AS HUO Simple
...
OK
API> append,c,l,alias_name
AS4MyGroup
...
OK
API> append,c,l,alias_value
huo_grp_all_users
...
OK
API> append,c,l,alias_category
2
...
OK
API> append,c,l,alias_usr_category
-1
...
OK
API> append,c,l,alias_description
Entry for a group alias (huo_grp_all_users)
...
OK
API> append,c,l,alias_name
AS4SuperUser
...
OK
API> append,c,l,alias_value
myuser001
...
OK
API> append,c,l,alias_category
1
...
OK
API> append,c,l,alias_usr_category
-1
...
OK
API> append,c,l,alias_description
Entry for a user alias (myuser001)
...
OK
API> save,c,l
...
OK
API> commit,c
...
OK

API> dump,c,660xxxxxxd3e
...
USER ATTRIBUTES
  owner_name                 : dm_dbo
  object_name                : TEST AS HUO Simple
  object_description         : Desc 4 TEST AS HUO Simple
  alias_name              [0]: AS4MyGroup
                          [1]: AS4SuperUser
  alias_value             [0]: huo_grp_all_users
                          [1]: myuser001
  alias_category          [0]: 2
                          [1]: 1
  alias_usr_category      [0]: -1
                          [1]: -1
  alias_description       [0]: Entry for a group alias (huo_grp_all_users)
                          [1]: Entry for a user alias (myuser001)

SYSTEM ATTRIBUTES
  r_object_id                : 660xxxxxxd3e

APPLICATION ATTRIBUTES

INTERNAL ATTRIBUTES
  i_is_replica               : F
  i_vstamp                   : 0

Concerning the the category (alias_category ) for the alias in the specified index position in the alias set. This value is set by the creator of the alias object and used by Documentum client applications. The server does not verify the category value against the alias value to ensure that alias value is in the specified category.
Currently, only the following values are allowed:

  • 0 (Unknown)
  • 1 (User, alias_value is a user)
  • 2 (Group, alias_value is a group)
  • 3 (User or Group, alias_value is either a user or a group)
  • 4 (Cabinet Path, alias_value is a cabinet path)
  • 5 (Folder Path, alias_value is a folder path)
  • 6 (ACL Name, alias_value is an ACL name)


 
• Creation of Template ACLs or Permission Set Template (acl_class=1) via API

API> begintran,c
...
OK
API> create,c,dm_acl
...
450xxxxxxx94f
API> set,c,l,object_name
TEST PST HUO Simple
...
OK
API> set,c,l,owner_name
dm_dbo
...
OK
API> set,c,l,acl_class
1
...
OK
API> set,c,l,description
Desc 4 TEST PST HUO Simple
...
OK
API> grant,c,l,dm_world,AccessPermit,,3
...
OK
API> grant,c,l,dm_owner,AccessPermit,,3
...
OK
API> grant,c,l,%AS4MyGroup,AccessPermit,,6
...
OK
API> grant,c,l,%AS4SuperUser,AccessPermit,,7
...
OK
API> save,c,l
...
OK
API> commit,c
...
OK

API> dump,c,450xxxxxxx94f
...
USER ATTRIBUTES
  object_name                : TEST PST HUO Simple
  description                : Desc 4 TEST PST HUO Simple
  owner_name                 : MYDOCBASEDEV
  globally_managed           : F
  acl_class                  : 1

SYSTEM ATTRIBUTES
  r_object_id                : 450xxxxxxx94f
  r_is_internal              : F
  r_accessor_name         [0]: dm_world
                          [1]: dm_owner
                          [2]: %AS4MyGroup
                          [3]: %AS4SuperUser
  r_accessor_permit       [0]: 3
                          [1]: 3
                          [2]: 6
                          [3]: 7
  r_accessor_xpermit      [0]: 0
                          [1]: 0
                          [2]: 0
                          [3]: 0
  r_is_group              [0]: F
                          [1]: F
                          [2]: F
                          [3]: F
  r_has_events               : F
  r_permit_type           [0]: 0
                          [1]: 0
                          [2]: 0
                          [3]: 0
  r_application_permit    [0]: 
                          [1]: 
                          [2]: 
                          [3]: 
  r_template_id              : 0000000000000000
  r_alias_set_id             : 0000000000000000

APPLICATION ATTRIBUTES

INTERNAL ATTRIBUTES
  i_has_required_groups      : F
  i_has_required_group_set   : F
  i_has_access_restrictions  : F
  i_partition                : 0
  i_is_replica               : F
  i_vstamp                   : 0

 

• Modification of Template ACLs or Permission Set Template (acl_class=1) via API

API> begintran,c
API> retrieve,c,dm_acl where r_object_id='450xxxxxxx4c’
API> revoke,c,l,%AS4MyGroup,AccessPermit,,6
API> revoke,c,l,%AS4SuperUser,AccessPermit,,7
API> save,c,l
API> commit,c

 

• Creation of Instance of Template ACL using the PST previous and AS (acl_class=2) via API
An instance of an ACL template is created when an AliasSet and PST are associated to a document. It is not possible to create directly manually an instance of PST.
The error DM_ACL_E_CANT_CHANGE_INSTANCE occurs if the user tries to modify a instance of PST (acl_class=2). To modify the instances of PST, it is necessary to modify the PST or PST/AliasSet associated to theses instances.

API> begintran,c
...
OK
API> create,c,dm_document
...
090xxxxxx321
API> set,c,l,object_name
Test DOC HUO WITH AS AND PST
...
OK
API> set,c,l,a_content_type
pdf
...
OK
API> setfile,c,l,C:\temp\test.pdf
...
OK
API> link,c,l,'/Temp'
...
OK
API> set,c,l,r_alias_set_id
660xxxxxxd3e
...
OK
API> set,c,l,acl_domain
dm_dbo
...
OK
API> set,c,l,acl_name
TEST PST HUO Simple
...
OK
API> save,c,l
...
OK
API> commit,c
...
OK


API> dump,c,090xxxxxx321
...
USER ATTRIBUTES
  object_name                : Test DOC HUO WITH AS AND PST
  acl_domain                 : MYDOCBASEDEV
  acl_name                   : dm_450xxxxxxx94_xxxxd3e

SYSTEM ATTRIBUTES
  r_object_id                : 090xxxxxx321
  r_object_type              : dm_document

 

So, the association between document, AliasSet and Templace ACL generates an instance of Templace ACL (acl_class=2) with name like dm_450xxxxxxx94_xxxxd3e. This instance is created only if its is not already exist.

API> dump,c,450xxxxx950
...
USER ATTRIBUTES
  object_name                : dm_450xxxxxxx94_xxxxd3e
  description                : dm_450xxxxxxx94_xxxxd3e
  owner_name                 : MYDOCBASEDEV
  globally_managed           : F
  acl_class                  : 2

SYSTEM ATTRIBUTES
  r_object_id                : 450xxxxx950
  r_is_internal              : T
  r_accessor_name         [0]: dm_world
                          [1]: dm_owner
                          [2]: huo_grp_all_users
                          [3]: myuser001
  r_accessor_permit       [0]: 3
                          [1]: 3
                          [2]: 6
                          [3]: 7
  r_accessor_xpermit      [0]: 0
                          [1]: 0
                          [2]: 0
                          [3]: 0
  r_is_group              [0]: F
                          [1]: F
                          [2]: F
                          [3]: F
  r_has_events               : F
  r_permit_type           [0]: 0
                          [1]: 0
                          [2]: 0
                          [3]: 0
  r_application_permit    [0]: 
                          [1]: 
                          [2]: 
                          [3]: 
  r_template_id              : 450xxxxxxx94f
  r_alias_set_id             : 660xxxxxxd3e

APPLICATION ATTRIBUTES

INTERNAL ATTRIBUTES
  i_has_required_groups      : F
  i_has_required_group_set   : F
  i_has_access_restrictions  : F
  i_partition                : 0
  i_is_replica               : F
  i_vstamp                   : 0

 

• Deleting of AliasSet, Template ACL (PST) and Instance of Template ACL via API:

## Give DELETE permission to super user on TEMPLATE ACL (PST) in order to delete the elements
API> retrieve,c,dm_acl where object_name = 'TEST PST HUO Simple'
...
450xxxxxxx94f
API> grant,c,l,mysuper001,AccessPermit,,7
...
OK
API> save,c,l
...
OK



API> retrieve,c,dm_document where object_name like 'Test DOC HUO WITH AS AND PST';
...
090xxxxxx321
API> destroy,c,l
...
OK
API> retrieve,c,dm_acl where object_name = 'dm_450xxxxxxx94_xxxxd3e'
...
450xxxxx950
API> destroy,c,l
...
OK
API> retrieve,c,dm_acl where object_name = 'TEST PST HUO Simple'
...
450xxxxxxx94f
API> destroy,c,l
...
OK
API> retrieve,c,dm_alias_set where object_name = 'TEST AS HUO Simple'
...
660xxxxxxd3e
API> destroy,c,l
...
OK

 


——————— LINKING ————————–


• Link a document to other folder:

API> retrieve,c,my_custom_type where r_object_id = '090xxxxxxxx6df'
...
090xxxxxxxx6df
API> set,c,l,my_attr1,0
...
OK
API> set,c,l,my_attr2,1
...
OK
API> set,c,l,my_attr3,1
...
OK
API> link,c,l,'/MYCABINET/My Folder1, Fondation/SubFolder2 of Folder1' 
...
OK
API> save,c,l
...
OK

DQL> UPDATE my_custom_type OBJECTS LINK '/MYCABINET/My Folder1, Fondation/SubFolder2 of Folder1' WHERE r_object_id = '090xxxxxxxx6df'


DQL>select r_object_id, count(i_folder_id) from my_custom_type group by r_object_id having count(i_folder_id)>1 enable (ROW_BASED) ;

090xxxxxxxx6df
i_folder_id = Parent Folder IDs - REPEATING of ID
i_cabinet_id = Primary Cabinet - ID

i_folder_id[0]: 0b0xxxxxx16 = /MYCABINET/My Folder1, Fondation/SubFolder1 of Folder1
i_folder_id[1]: 0b0xxxxxxaa = /MYCABINET/My Folder1, Fondation/SubFolder2 of Folder1
i_cabinet_id : 0c0xxxxxx02 = /MYCABINET

 


 


——————— VALUES MAPPINGS / ASSISTANCE ————————–


• Values mapping of custom type:

DQL>select label_text, map_display_string, map_data_string from dm_nls_dd_info 
where parent_id in (select r_object_id from dm_aggr_domain where type_name='my_subtype_document' and any attr_name='doc_type')  
#and any map_display_string like '____-%'
;
...
select * from dm_nls_dd_info where parent_id in (select r_object_id from dm_aggr_domain where type_name='my_subtype_document');
...

 

• Check whether a specific data should be deployed via DataDictionnary:

DQL>select resync_needed  From dmi_dd_attr_info Where type_name=’<type>’ AND attr_name=’<attr>’;

Exemple: Select resync_needed  From dmi_dd_attr_info Where type_name='my_subtype_document' AND attr_name='type_doc';
0 = no needed
1 = needed

 


——————— TYPES ————————–


• Get informations concerning types (supertype…):

DQL>select r_object_id, r_type_name, r_supertype from dmi_type_info where r_type_name IN ('dm_document', 'dm_sysobject','my_client_document','my_company_document')
;
...
2exxxxxx105	dm_sysobject	dm_sysobject
2exxxxx0129	dm_document	dm_document,dm_sysobject
2exxxxx4500	my_company_document	dm_sysobject,my_company_document,dm_document
2exxxxx4501	my_client_document	my_company_document,my_client_document,dm_document,dm_sysobject
...

 


——————— ASPECTS ————————–


• Find the internal name (aspect table) of an aspect:

DQL>select i_attr_def from dmc_aspect_type   where object_name = 'my_huo_aspect'
;
...
dmi_030xxxxxx0b
...

 
• Find attributes of an ASPECT via 2 internal tables for repeating and simple fields:

DQL>select i_attr_def from dmc_aspect_type   where object_name = 'my_huo_aspect2'
;
...
dmi_03xxxxxx30c
...
DQL> describe dmi_03xxxxxx30c_r;
....
i_partition	Integer	
i_position	Integer	
r_object_id	Char(16)	
my_repeating_field1	Integer	
my_repeating_field2	Char(255)	
...
DQL> describe dmi_03xxxxxx30c_s;
....
i_partition	Integer	
r_object_id	Char(16)
my_simple_field1  Char(512)	

 
• Default aspect of a type. Multiple default aspects can be associated with one object type. An object type inherits all the default aspects defined for its supertypes. When you add a default aspect to a type, the newly added aspect is only associated with new instances of the type or subtype created after the addition. Existing instances of the type or its subtypes are not affected. Similarly, removal of a default aspect does not affect the existing instances of the type. Default aspects for an object type are recorded in the default_aspects property in the corresponding dmi_type_info object.

DQL>select r_object_id, r_type_name, r_supertype, default_aspects from dmi_type_info where r_type_name IN ('dm_document', 'dm_sysobject','my_client_document','dmi_030xxxxxx30a','dmi_0302xxxxx30b','my_company_document')
;
...
2exxxxxx105	dm_sysobject	dm_sysobject
2exxxxx0129	dm_document	dm_document,dm_sysobject
2exxxxx4500	my_company_document	dm_sysobject,my_company_document,dm_document
2exxxxx4501	my_client_document	my_company_document,my_client_document,dm_document,dm_sysobject
2exxxxxx901	dmi_030xxxxxx30a	dmi_030xxxxxx30a
2exxxxxxd00	dmi_0302xxxxx30b	dmi_0302xxxxx30b
...

 

 
 
 

….TO BE CONTINUED