Wednesday, April 10, 2013

Link & Unlink Objects from Folders

How often have you created an object and forgotten to link it to a folder. What typically happens in a situation like this is, the object get linked to the default folder of the user with which you created the object with [You can find the default folder of a user with the default_folder attribute of the dm_user object].

All it takes to link an object to a new folder is three simple steps with API Commands:

1. Link the object to the new [desired] folder. we do this first because its not possible to unlink an object without it having another link.
2. Unlink the object from the old folder.
3. Save the changes, otherwise the whole operation will have no effect.
__________________________________________________________________________________
 
Here is an Example:

1. Link to a new folder:
   link,c,<r_object_d>,/Objects
Where,
 r_object_id is the Object ID of the object to be linked
 /Objects is the folder
 
2. Unlink the object from the old folder:
   unlink,c,<r_object_id1>,<r_object_id2>
Where,
 r_object_id1 is the Object ID of the object to be unlinked
 r_object_id2 is the Object ID of the folder to be unlinked

3. Save the operation
   save,c,<r_object_id>
Where,
 r_object_id is the Object ID of the object that we just Linked and Unlinked.

Wednesday, January 9, 2013

DQL to API

Sometimes, all you have, is access to DA no other tool, and want to run some queries it can be very painful.
There is no way to execute multiple DQLs through DA unlike API commands.

Were you ever stuck in such a situation, well, don't waste your time trying. Just frame your DQLs to do the job, convert your DQL to API commands.


Step1: Frame the DQL:
Let me give two examples as the APIs for them will correspondingly change.

1. CREATE dm_group object SET group_name = 'abc'
2. UPDATE dm_group object SET description = 'abc group' WHERE group_name = 'abc'


If we had to run the above two queries on DA, we would have to run each one at a time. By converting these DQLs into APIs, it is possible to run them in one go. here is what we do:

Step2: Convert DQL to API
Just prefix the DQLs with the following API commands accordingly:
execquery,c,0 [or] execquery,c,F
execquery,c,1 [or] execquery,c,T

Hence our DQLs will look like this:
1. execquery,c,1,CREATE dm_group object SET group_name = 'abc'
2. execquery,c,0,UPDATE dm_group object SET description = 'abc group' WHERE group_name = 'abc'

NOTE: The parameter "1" or "T" in the API command signifies that the action being performed will create a new instance of an object in the repository, so all CREATE DQLs when converted to APIs. For all other Select or UPDATE operations the Parameter value "0" or "F" should be used.

Once the APIs are ready, you can run them in the API editor by choosing the "Script (multi-line) Entry" in the editor which allows execution of multiple API commands.

User Privileges & Client Capability

Managing User’s Client Capability, Privileges and Extended Privileges has always been a confusing task,and Documentum does not make life easy for the developers and the admins, specially when one has to do the mappings in the back-end through DQLs or APIs.
The numbers and business terms do not quite correlate and it can be very confusing and annoying to remember.

Another issue I would like to address here is the confusion between Client Capability and Privileges. As a simple rule of thumb, I always remember it this way,
   1. Privileges determines your control over the documentum objects.
   2. Client Capability determines you control over the instance of the documentum objects.
Simple enough I guess!!!

I would advice you be very careful with the Privileges and Capabilities you grant, as when you come up with your set of permissions and mappings, the repercussion are going to be dramatic.
So, here are the attributes, their numerical values and what they stand for. Once you know what these numbers and attributes stand for you can build your DQLs accordingly.
Client Capability:

Attribute
Client Capability
Numeric Value








client_capability
Consumer
1
Contributor
2
Consumer and Contributor
3
Coordinator
4
Coordinator and Consumer
5
Coordinator and Contributor
6
Consumer, Contributor and Coordinator
7
System Administrator
8
System Administrator and Consumer
9
System Administrator and contributor
10
System Administrator, contributor and Consumer
11
System Administrator and Coordinator
12
System Administrator, Coordinator and Consumer
13
Contributor, Coordinator and Administrator
14
All Capabilities
15

  Privileges:
Attribute
Client Capability
Numeric Value




user_privileges
None
0
Create Type
1
Create Cabinet
2
Create Group
4
Create Group and Type
5
Create Group and Cabinet
6
Create Group, Cabinet and Type
7
SYSADMIN
8
SUPERUSER
16

Extended privileges:
Attribute
Extended Privilege
Numeric Value
user_xprivileges
None
0
Config Audit
8
Purge Audit
16
Config and Purge Audit
24
View Audit
32
Config and View Audit
40
View and Purge Audit
48
Config, View and Purge Audit
56


aa

Monday, February 13, 2012

Hi

Hey there everybody. I am Ashok, and I have been working on Documentum for over four years now.
Its high time I came up with my own blog to share my experiences and provide answers to question and doubts I have come across during my journey in the Industry. This is my first attempt to  publish a technical blog.
It would be helpful if everyone contributed to the blog and help build one common codebase. Hope someday this blog would grow to be popular and help many others (which is my primary intent and motive).
I shall try and cover up all topics that I have come across, but in the meantime I would appreciate it if the others provide their views and recommendations too.