<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic RuleService : Why does it check for original nodes before applying rule ? in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/ruleservice-why-does-it-check-for-original-nodes-before-applying/m-p/123989#M33924</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I would like to understand why the RuleServiceImpl class does check for copy before apply a rule to a node.&lt;/P&gt;&lt;PRE&gt; /**
     * Determines whether the rule can be executed
     */
    private boolean canExecuteRule(Set&amp;lt;ExecutedRuleData&amp;gt; executedRules, NodeRef actionedUponNodeRef, Rule rule)
    {
        boolean result = true;
        
        if (logger.isDebugEnabled() == true)
        {
            logger.debug(" &amp;gt;&amp;gt; Current executed items count = " + executedRules.size());
        }
        
        if (executedRules != null)
        {
            if (executedRules.contains(new ExecutedRuleData(actionedUponNodeRef, rule)) == true)
            {
                if (logger.isDebugEnabled() == true)
                {
                    logger.debug(" &amp;gt;&amp;gt; Already executed this rule (" + rule.getTitle()+ ") on this nodeRef (" + actionedUponNodeRef.getId() + ")");
                }
                result = false;
            }
            else
            {
                result = checkForCopy(executedRules, actionedUponNodeRef, rule);                
            }
        }
        else
        {
            if (logger.isDebugEnabled() == true)
            {
                logger.debug(" &amp;gt;&amp;gt; Executed this rule (" + rule.getTitle()+ ") on (" + actionedUponNodeRef.getId() + ") executed rule is null");
            }
        }
        
        return result;
    }&lt;/PRE&gt;&lt;P&gt;Can anybody explain it to me ? In my case, rules are not applied to nodes that are copied from another node.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
    <pubDate>Fri, 20 May 2022 12:41:54 GMT</pubDate>
    <dc:creator>ValentinLeblanc</dc:creator>
    <dc:date>2022-05-20T12:41:54Z</dc:date>
    <item>
      <title>RuleService : Why does it check for original nodes before applying rule ?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/ruleservice-why-does-it-check-for-original-nodes-before-applying/m-p/123989#M33924</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I would like to understand why the RuleServiceImpl class does check for copy before apply a rule to a node.&lt;/P&gt;&lt;PRE&gt; /**
     * Determines whether the rule can be executed
     */
    private boolean canExecuteRule(Set&amp;lt;ExecutedRuleData&amp;gt; executedRules, NodeRef actionedUponNodeRef, Rule rule)
    {
        boolean result = true;
        
        if (logger.isDebugEnabled() == true)
        {
            logger.debug(" &amp;gt;&amp;gt; Current executed items count = " + executedRules.size());
        }
        
        if (executedRules != null)
        {
            if (executedRules.contains(new ExecutedRuleData(actionedUponNodeRef, rule)) == true)
            {
                if (logger.isDebugEnabled() == true)
                {
                    logger.debug(" &amp;gt;&amp;gt; Already executed this rule (" + rule.getTitle()+ ") on this nodeRef (" + actionedUponNodeRef.getId() + ")");
                }
                result = false;
            }
            else
            {
                result = checkForCopy(executedRules, actionedUponNodeRef, rule);                
            }
        }
        else
        {
            if (logger.isDebugEnabled() == true)
            {
                logger.debug(" &amp;gt;&amp;gt; Executed this rule (" + rule.getTitle()+ ") on (" + actionedUponNodeRef.getId() + ") executed rule is null");
            }
        }
        
        return result;
    }&lt;/PRE&gt;&lt;P&gt;Can anybody explain it to me ? In my case, rules are not applied to nodes that are copied from another node.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2022 12:41:54 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/ruleservice-why-does-it-check-for-original-nodes-before-applying/m-p/123989#M33924</guid>
      <dc:creator>ValentinLeblanc</dc:creator>
      <dc:date>2022-05-20T12:41:54Z</dc:date>
    </item>
  </channel>
</rss>

