Sunday, November 7, 2010

Creating Custom Object Type in Documentum

I followed the below steps to create custom object type derived or inherited from dm_document object type. 


Before moving on new object type creation steps, mentioning the dm_document object type hierarchy in diagram. 
dm_document object type is for all the documents created in content server repository, that document would be any thing like MS office files, picture files, PDF, xml files etc... 


Why do we need new Custom Object Type in Documentum?
dm_document object type provides limited attributes to describe a document attributes like creator, creation date, modify date, title, object_name, etc. 
If we need custom attributes for a document such as type of document (sales document, legal document, customer feedback) or any other information, new custom object type need to be created by inheriting dm_document with additional attribute name such document_type, etc...


Create Custom Object type using DQL
Syntax to create new custom object type with dm_document as super type is
CREATE TYPE objecttype_name (attribute_name attribute_type) WITH SUPERTYPE dm_document/


DQL command to describe object type is DESCRIBE object_type_name


Documentum API command to describe the object type is DESCRIBE,c,object_type_name


Alter the existing object type attribute 
ALTER TYPE objecttype_name MODIFY attribute_name attribute_type


Documentum Attribute Type
Documentum provides below attribute types by default to describe attribute in object type
DM_STRING   
DM_INTEGER
DM_BOOLEAN
DM_ID


DM_STRING attribute allows to store maximum 255 characters value in attribute. We can use ALTER TYPE command to modify the attribute to store database default character length 2000 as below.
ALTER TYPE object_type_name MODIFY attribute_name CHAR(200)  


DM_ID would be a reference r_object_id of other object in docbase. When we perform dumping of this object, referenced object id also will be dumped and it can be loaded into another docbase.


Note: Assumes reader has basic knowledge on documentum objects types and reader is in the search for steps to create new custom object type in documentum.

No comments: