cancel
Showing results for 
Search instead for 
Did you mean: 

Space subscription, email notification from portal

nikes
Champ on-the-rise
Champ on-the-rise
Hello,

I have a requirement to implement Alfresco space subscription feature with document upload, update email notification.

A user should be able to subscribe/unsubscribe to space from portal (in our case portal showing alfresco folder structure). For any new upload or update of document, subscribed user(s) should receive an email notification.

As per my knowledge I think there is NO out-of-the box feature or API for space subscription. So I am thinking of possible solutions.
For subscription
——————————————————————————————————————————-
-Create a custopn property to hold list of user ids
-From portlet, user performs "Subscribe" action for any space, which makes web service call to Alfresco
-Web service appends user id to custom property list if it doe not exist.

For email notificaton
——————————————————————————————————————————–
Initially I thought to create email notification Rule on space from web service whenever a user performs subscribe action. But it doesn't look feasible technically for each subscribe action.
Is it possible to use Component Policy feature on Space?

Thanks for any inputs/suggessions.
1 REPLY 1

nikes
Champ on-the-rise
Champ on-the-rise
Some updates of my analysis.

I found an aspect ]"cm:subscribable"[/b in alfresco content model.
Does that mean the feature is already available?

I tried adding Subscribable aspect and associate couple of users using Run Action ( execute Javascript) against space for testing.
Using Node browser I could see subscribable aspect listed in Aspects section of Space also I see couple of entries in Associations section. So these entries are the person object when I checked.

That said, now i could associate users to a space.

Analysis in progress
———————————————————————————————————————————–
I am still not sure how to implement  email notification on create/update of any file under subscribed space.

Since subscribe action should happen from portal potlet and not from Alfresco Explorer application.

Only two possibilities I see,
1) For each subscribe on a space, check if required create/update content email send rule exists. If NOT then create.
So lets say, user1 subscribes to a space, so on first subscription, rule doent exist. So create one
Now user2 also subscribes to a space, this time since required rule already exists, no need to create rule again.

Well, in this case rule should execute javascript (or java) action which can read subscribedBy Association on a space, and send email to those user.

2) Another possibility is to implement Policy Component for create content and update content. In side behaviour check for parent (Space) if Space contains Sbscribable aspect,
get list of subscribed users from association "cm:subscribedBy", get email id and send email.


Do you guys have any other approach?

Thanks
Nikesh