mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Fixed RuleService concurrency around enable/disable at NodeRef level
- Done while rolling in ALF-10839: Eliminate rule discovery overhead on property update when rules have been disabled - Some checking of rule state done BEFORE walking up the node hierarchy - Also fixes ALF-4216: disabledRules List is not thread safe git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@31255 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -39,6 +39,11 @@ public class OnMoveNodeRuleTrigger extends RuleTriggerAbstractBase implements No
|
||||
|
||||
public void onMoveNode(ChildAssociationRef oldChildAssocRef, ChildAssociationRef newChildAssocRef)
|
||||
{
|
||||
// Break out early if rules are not enabled
|
||||
if (!areRulesEnabled())
|
||||
{
|
||||
return;
|
||||
}
|
||||
// Check that it is not rename operation.
|
||||
if (!oldChildAssocRef.getParentRef().equals(newChildAssocRef.getParentRef()))
|
||||
{
|
||||
@@ -48,6 +53,11 @@ public class OnMoveNodeRuleTrigger extends RuleTriggerAbstractBase implements No
|
||||
|
||||
private void triggerChildrenRules(ChildAssociationRef oldChildAssocRef, ChildAssociationRef newChildAssocRef)
|
||||
{
|
||||
// Break out early if rules are not enabled
|
||||
if (!areRulesEnabled())
|
||||
{
|
||||
return;
|
||||
}
|
||||
triggerRules(newChildAssocRef.getParentRef(), newChildAssocRef.getChildRef());
|
||||
for (ChildAssociationRef ref : nodeService.getChildAssocs(newChildAssocRef.getChildRef()))
|
||||
{
|
||||
|
Reference in New Issue
Block a user