mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged HEAD-BUG-FIX (5.1/Cloud) to HEAD (5.1/Cloud)
90837: Merged V4.2-BUG-FIX (4.2.5) to HEAD-BUG-FIX (5.0/Cloud) 90751: Merged V4.2.4 (4.2.4) to V4.2-BUG-FIX (4.2.5) 90739: Merged DEV to PATCHES/V4.2.4 (4.2.4) 60205: MNT-9885: Rules not firing on some content saved in Alfresco drive - Incorrect RuleTrigger behavior is fixed. Rules that were ignored for content with sys:temporary aspect are now fired when this aspect is removed. - Required Unit tests were added. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@94724 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -96,16 +96,19 @@ public class CreateNodeRuleTrigger extends RuleTriggerAbstractBase
|
||||
new JavaBehaviour(this, POLICY));
|
||||
}
|
||||
|
||||
// Register interest in the addition and removal of the sys:noContent aspect
|
||||
this.policyComponent.bindClassBehaviour(
|
||||
NodeServicePolicies.OnAddAspectPolicy.QNAME,
|
||||
ContentModel.ASPECT_NO_CONTENT,
|
||||
new JavaBehaviour(this, "onAddAspect", NotificationFrequency.EVERY_EVENT));
|
||||
this.policyComponent.bindClassBehaviour(
|
||||
NodeServicePolicies.OnRemoveAspectPolicy.QNAME,
|
||||
ContentModel.ASPECT_NO_CONTENT,
|
||||
new JavaBehaviour(this, "onRemoveAspect", NotificationFrequency.EVERY_EVENT));
|
||||
}
|
||||
for (QName ignoreAspect : getIgnoredAspects())
|
||||
{
|
||||
// Register interest in the addition and removal of the sys:noContent aspect
|
||||
this.policyComponent.bindClassBehaviour(
|
||||
NodeServicePolicies.OnAddAspectPolicy.QNAME,
|
||||
ignoreAspect,
|
||||
new JavaBehaviour(this, "onAddAspect", NotificationFrequency.EVERY_EVENT));
|
||||
this.policyComponent.bindClassBehaviour(
|
||||
NodeServicePolicies.OnRemoveAspectPolicy.QNAME,
|
||||
ignoreAspect,
|
||||
new JavaBehaviour(this, "onRemoveAspect", NotificationFrequency.EVERY_EVENT));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
@@ -186,6 +189,10 @@ public class CreateNodeRuleTrigger extends RuleTriggerAbstractBase
|
||||
" (this was triggered on removal of the noContent aspect)");
|
||||
}
|
||||
|
||||
triggerRules(parentNodeRef, nodeRef);
|
||||
// Do not trigger rules for rule and action type nodes
|
||||
if (ignoreTrigger(nodeRef) == false)
|
||||
{
|
||||
triggerRules(parentNodeRef, nodeRef);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user