Email Notifications on Calendar Events in Alfresco

前端 未结 3 2003
心在旅途
心在旅途 2021-01-07 02:40

I\'m using Alfresco 4.0 I need to send email notification to selected members or all the members if a calendar event is created.

I\'m a newbie.

Kindly help m

3条回答
  •  太阳男子
    2021-01-07 02:59

    You can set a simple rule on "Sites/yoursite/calendar" folder that executes a javascript script which sends the email.

    If you need something more complicated then you can use alfresco's "onCreateNode" policy and bind it to "ia:calendarEvent" type.

    From the top of my head something like this:

    ...
    
    this.onCreateNode = new JavaBehaviour(this, "onCreateNode", NotificationFrequency.TRANSACTION_COMMIT);
    
    this.policyComponent.bindClassBehaviour(QName.createQName(
        NamespaceService.ALFRESCO_URI, "onCreateNode"),
        "ia:calendarEvent", this.onCreateNode);
    
    ...
    ...
    ...
    
    public void onCreateNode(ChildAssociationRef childAssocRef)
    {
     //send email here
    }
    

提交回复
热议问题