【问题标题】:Email Notifications on Calendar Events in AlfrescoAlfresco 中有关日历事件的电子邮件通知
【发布时间】:2012-03-28 11:31:12
【问题描述】:

我正在使用 Alfresco 4.0 如果创建了日历事件,我需要向选定的成员或所有成员发送电子邮件通知。

我是新手。

请帮帮我,因为我快到最后期限了。

【问题讨论】:

  • 不能只在日历文件夹上设置邮件发送规则吗?
  • 哪种方法不起作用?我认为应该这样做,只要您正确配置规则。你走了多远?
  • 现在可以了,我会在下面发布完整的详细信息

标签: alfresco


【解决方案1】:

您可以在“站点/您的站点/日历”文件夹上设置一个简单的规则,该文件夹执行发送电子邮件的 javascript 脚本。

如果您需要更复杂的东西,那么您可以使用 alfresco 的“onCreateNode”策略并将其绑定到“ia:calendarEvent”类型。

在我的脑海中是这样的:

...

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
}

【讨论】:

    【解决方案2】:

    大致应该是这样的:

    创建一个spring管理bean,注入policyComponent

    <bean id="calendarType" class="your.CalendarType"
       init-method="init">
       <property name="policyComponent" ref="policyComponent" />
     </bean>
    

    方法:

    public void init()
    {
        policyComponent.bindClassBehaviour(NodeServicePolicies.OnCreateNodePolicy.QNAME, CalendarModel.TYPE_EVENT ,
                new JavaBehaviour(this, "onCreateNode"));
    
    }
    
    public void onCreateNode(ChildAssociationRef childAssocRef)
    {
    // do stuff here
    }
    

    查看http://wiki.alfresco.com/wiki/Policy_Component了解更多详情。

    【讨论】:

      【解决方案3】:

      感谢所有宝贵的答案,我能够按时完成我的工作。然而,经过一番搜索,我得到了一个包含所有步骤的完整脚本。您可以点击此链接,请阅读第 6 篇文章以获得答案:

      https://forums.alfresco.com/en/viewtopic.php?f=47&t=42366

      【讨论】:

        猜你喜欢
        • 2014-02-12
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2012-12-11
        • 1970-01-01
        相关资源
        最近更新 更多