Webtop Subscriptions

Subscribing to a document (object) in Webtop allows you to have immediate access to it without having to navigate to its location.  In practice, a subscription is a shortcut to an object.  Have you ever wondered how subscriptions work?  Simply, subscriptions are relationship objects (dm_relation) that relate an object in the repository to a user.  A subscription’s relation type, or name, is dm_subscription.

You can count the number of subscriptions each user has like this:

select u.user_name as user_name, count(*) as subscription_count from dm_relation r, dm_user u where r.relation_name = ‘dm_subscription’  and u.user_name = (select user_name from dm_user where r_object_id = r.child_id) group by u.user_name;

To view all objects and users involved in subscriptions, use this DQL:

select r.r_object_id as relation_id, r.relation_name as relation_name,o.object_name as object_name, u.user_name as user_name from dm_relation r, dm_user u, dm_sysobject o where r.relation_name = ‘dm_subscription’ and u.user_name = (select user_name from dm_user where r_object_id = r.child_id) and o.object_name = (select object_name from dm_sysobject where r_object_id = r.parent_id) order by u.user_name;

You can also create subscriptions using DQL, you just need to know the r_object_id of the user (dm_user) and the r_object_id of the object (notionally a dm_document but it could be anything).  That DQL looks like this:

create dm_relation object set relation_name = ‘dm_subscription’, set parent_id = (select r_object_id from dm_document where object_name = ‘<some object name>’), set child_id = (select r_object_id from dm_user where user_name = ‘<some user name>’);

There are three important things to remember about creating subscriptions:

  1. The name of the subscription (relation_name) must be ‘dm_subscription’,
  2. The user’s r_object_id must be assigned to the child_id attribute of the dm_relation,
  3. The document’s r_object_id must be assigned to the parent_id attribute of the dm_relation.

I recently had an interesting application for subscriptions.  During the processing of a case in a workflow, each participant that contributed to the case needed to have a quick and easy way to access the case, even after the task had left their Inbox.  This was true until the final disposition of the case, at which time their access to the case was revoked.  To accomplish this, I set up an automatic workflow method that created a subscription for the user just as the task was passing from their control to the next participant’s.  At the end of the workflow I ran a query that deleted all the subscriptions for the case (i.e., where parent_id = <r_object_id of case folder>).

Advertisements

About Scott
I have been implementing Documentum solutions since 1997. In 2005, I published a book about developing Documentum solutions for the Documentum Desktop Client (ISBN 0595339689). In 2010, I began this blog as a record of interesting and (hopefully) helpful bits of information related to Documentum, and as a creative outlet.

6 Responses to Webtop Subscriptions

  1. Max says:

    Dear Scott, I’m afraid, your DQL query selecting all objects and users involved in subscriptions isn’t correct. Here is my version:

    select r.r_object_id as relation_id, o.r_object_id as object_id, o.r_object_type as object_type, o.object_name as object_name, u.user_name as user_name from dm_relation r, dm_user u, dm_sysobject o where r.relation_name = ‘dm_subscription’ and u.r_object_id = r.child_id and o.r_object_id = r.parent_id order by u.user_name

    Like

    • Scott says:

      Max, thanks for the comment. It seems to me that the queries produce the same results. Your query is better optomized, that’s for sure.

      Like

  2. Pankaj Thorat says:

    I get the result as ‘4545575.0’ or something similar to this count. may i know the reason for this one

    Like

  3. Santhosh says:

    Hi Scott

    When we subscribe for a document in WebTop we are not getting any emails. I come to know that we need to configure email notifications in dm_event_sender.ebs. can you please let me know how?

    Thanks

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: