Select the search type
  • Site
  • Web
Search
You are here:  Support/Forums
Support

Bring2mind Forums

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 01/18/2007 1:38 PM by  Bill
Programmatically send subscription notifications
 2 Replies
Sort:
You are not authorized to post a reply.
Author Messages
Bill
New Member
New Member
Posts:30


--
01/18/2007 6:03 AM

    Is it possible to programmatically trigger the subscription notifications?  What I’m doing for one of the modules is to programmatically update and/or delete and regenerate two levels of documents.  Such as Root (collection)>>Sub Root 1(collection) >> file.  I delete all documents in the database table via code and then delete the sub folders.  Then they are rebuilt with the new folders and documents.  This is done twice a day plus on demand.  The Documents all have a unique file names so I track subscriptions by the EntryID in the subscription table and link it to the file name in the Entries table.   There are about 500 documents so the entire process only take about 90 seconds.  What I would like to do is to trigger the built in notification process if possible for documents that I have changed.

    Peter Donker
    Veteran Member
    Veteran Member
    Posts:4536


    --
    01/18/2007 9:56 AM
    Hi Bill,
    Interesting scenario. The notifications are triggered by the actions themselves throughout DMX, so this is not going to help you. You'd have to include some code to do the comparison and then send a notification upon change. The code to use for the DMX API is as follows:

    Services.NotificationController.Notify(ModuleConfiguration, Entry, Operation, Addressee)

    The ModuleConfiguration is the ModuleInfo of the DMX module instance where they can see the entry.
    The Entry is the EntryInfo of the entry,
    The Operation is a string (see DMX_LogTypes) and in your case is "Edit",
    The Addressee can be a UserInfo or Nothing. If nothing then it notifies all subscribers.

    Note that all this heavily depends on the module and that although I've tried to abstract all contextual stuff, you'll need to experiment with it to see if it can be called externally since there is no httpcontext.

    Good luck,
    Peter

    Bill
    New Member
    New Member
    Posts:30


    --
    01/18/2007 1:38 PM

    Thanks- I'll give it a try

     

     

    You are not authorized to post a reply.