In documentum at the time of creation of a document, you need to specify the type of document i.e. dm_document or may be any custom/derived document type which decides that document's properties. However, if at sometime later I want to change the type of the same document to say customType instead of dm_document. Is this possible? i.e. Is it possible to change the type of the document once it has been created.
Review:- Yes, it's possible to change type of object, created in Documentum.
Take a look at DQL statement "change ... object":
Syntax
CHANGE current_type [(ALL)] OBJECT[S]
TO new_type[update_list]
[IN ASSEMBLY document_id [VERSION version_label] [DESCEND]]
[SEARCH fulltext search condition]
[WHERE qualification]
CHANGE current_type [(ALL)] OBJECT[S]
TO new_type[update_list]
[IN ASSEMBLY document_id [VERSION version_label] [DESCEND]]
[SEARCH fulltext search condition]
[WHERE qualification]
Other detail may be found in "DQL Reference Guide", chapter "Change...Object".
Q;- 1. What I was wondering also here was it possible to do something like that using webtop?
2. Here is also a quick picture on what I am trying to perform:-
- A documentum repository contains some documents in the default type i.e. dm_document.
- I have created a TBO which would is associated to a customType (derived from dm_document). My TBO currently overrides checkIn(), checkOut()
- On any new item that is created of the type customType my TBO will work as expected. However, to make sure that all the older documents which were of type dm_document would also be able to take leverage of my TBO I'll need to convert them to my customType.
- So the steps for doing this I expect would be:-
- Convert the type using DQL.
- Perform a checkOut() on documents.
- Perform a checkIn() on the same documents.
Correct?
1. Webtop doesn't allow to change type of objects
2. Here is a part of description of this statement:
Rules and constraints on changing types
There are some constraints when you change an object’s type:
• The object’s current type and the new type must have the same type identifier.
The type identifier is the first two characters in an object ID. This value is inherited from the type’s
supertype. For example, all dm_document subtypes have 09 as their type identifier.
• The old and new types cannot be at the same level in the type hierarchy. The new type must be a
supertype or subtype of the current type. That is, the new type must be in a direct hierarchical
line from the current type.
You can move objects up or down in the object hierarchy but not laterally. For example, suppose
TypeA and TypeB are both subtypes of mybasetype, and TypeC is a subtype of TypeB. You
can change objects of Type B to mybasetype or to TypeC. You cannot change objects of TypeA
directory to TypeB because these two types are peers in the hierarchy. Nor can you change objects
of TypeC to TypeA because TypeA is not a supertype or subtype of TypeC.
When you change an object to a type that is higher in the hierarchy, the server drops any properties
from the old type that are not in the new type. Similarly, when you move an object to a type that is
lower in the hierarchy, the server adds any properties in the new type that were not in the old type.
Unless you use the update_list option to set these new properties, the server assigns them default
values appropriate for their datatypes.
There are some constraints when you change an object’s type:
• The object’s current type and the new type must have the same type identifier.
The type identifier is the first two characters in an object ID. This value is inherited from the type’s
supertype. For example, all dm_document subtypes have 09 as their type identifier.
• The old and new types cannot be at the same level in the type hierarchy. The new type must be a
supertype or subtype of the current type. That is, the new type must be in a direct hierarchical
line from the current type.
You can move objects up or down in the object hierarchy but not laterally. For example, suppose
TypeA and TypeB are both subtypes of mybasetype, and TypeC is a subtype of TypeB. You
can change objects of Type B to mybasetype or to TypeC. You cannot change objects of TypeA
directory to TypeB because these two types are peers in the hierarchy. Nor can you change objects
of TypeC to TypeA because TypeA is not a supertype or subtype of TypeC.
When you change an object to a type that is higher in the hierarchy, the server drops any properties
from the old type that are not in the new type. Similarly, when you move an object to a type that is
lower in the hierarchy, the server adds any properties in the new type that were not in the old type.
Unless you use the update_list option to set these new properties, the server assigns them default
values appropriate for their datatypes.
So if you move object from dm_document down to customType you have to call "Change...type" query for inherited type.
Actually I don't see any TBO here. I guess it's better to form some criterias and create appropriate queries for object.
CHANGE OBJECT DQL is meant to be executed by a sysadmin on a batch basis; is not designed for regular users to change object type based on some manual action. There reason why is that webtop caches object definitions and when the object type for an object changes, you need to refresh the cache. I have seen may people try to refresh the cache with little or no success.
If you need to convert dm_document to your type, just write a utility script that you can execute over the weekend when users are not on and you can refresh the cache with minimal impact.
Hi could you tell me that how can i refresh the cache ? and script for the same.
ReplyDelete