Merged V1.3 to HEAD (3247:3249, 3250:3280, 3281:3324)

svn merge svn://www.alfresco.org:3691/alfresco/BRANCHES/V1.3@3247 svn://www.alfresco.org:3691/alfresco/BRANCHES/V1.3@3249 .
   svn merge svn://www.alfresco.org:3691/alfresco/BRANCHES/V1.3@3250 svn://www.alfresco.org:3691/alfresco/BRANCHES/V1.3@3280 .
   svn merge svn://www.alfresco.org:3691/alfresco/BRANCHES/V1.3@3281 svn://www.alfresco.org:3691/alfresco/BRANCHES/V1.3@3324 .


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3411 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2006-07-26 11:19:55 +00:00
parent 6168aac2cc
commit dcb735c5e3
10 changed files with 208 additions and 49 deletions

View File

@@ -653,12 +653,18 @@ public class RuleServiceImpl implements RuleService, RuntimeRuleService
}
}
/**
* @see org.alfresco.repo.rule.RuntimeRuleService#addRulePendingExecution(org.alfresco.service.cmr.repository.NodeRef, org.alfresco.service.cmr.repository.NodeRef, org.alfresco.service.cmr.rule.Rule)
*/
@SuppressWarnings("unchecked")
public void addRulePendingExecution(NodeRef actionableNodeRef, NodeRef actionedUponNodeRef, Rule rule)
{
addRulePendingExecution(actionableNodeRef, actionedUponNodeRef, rule, false);
}
/**
* @see org.alfresco.repo.rule.RuntimeRuleService#addRulePendingExecution(org.alfresco.service.cmr.repository.NodeRef, org.alfresco.service.cmr.repository.NodeRef, org.alfresco.service.cmr.rule.Rule, boolean)
*/
@SuppressWarnings("unchecked")
public void addRulePendingExecution(NodeRef actionableNodeRef, NodeRef actionedUponNodeRef, Rule rule, boolean executeAtEnd)
{
@@ -684,7 +690,7 @@ public class RuleServiceImpl implements RuleService, RuntimeRuleService
}
}
// Prevent hte same rule being executed more than one in the same transaction
// Prevent the same rule being executed more than once in the same transaction
pendingRules.add(pendingRuleData);
}
else
@@ -707,7 +713,10 @@ public class RuleServiceImpl implements RuleService, RuntimeRuleService
{
logger.debug("Creating the executed rules list");
}
AlfrescoTransactionSupport.bindResource(KEY_RULES_EXECUTED, new HashSet<ExecutedRuleData>());
if (AlfrescoTransactionSupport.getResource(KEY_RULES_EXECUTED) == null)
{
AlfrescoTransactionSupport.bindResource(KEY_RULES_EXECUTED, new HashSet<ExecutedRuleData>());
}
try
{
List<PendingRuleData> executeAtEndRules = new ArrayList<PendingRuleData>();
@@ -719,11 +728,11 @@ public class RuleServiceImpl implements RuleService, RuntimeRuleService
}
finally
{
AlfrescoTransactionSupport.unbindResource(KEY_RULES_EXECUTED);
if (logger.isDebugEnabled() == true)
{
logger.debug("Unbinding resource");
}
//AlfrescoTransactionSupport.unbindResource(KEY_RULES_EXECUTED);
//if (logger.isDebugEnabled() == true)
//{
// logger.debug("Unbinding resource");
// }
}
}
@@ -900,7 +909,7 @@ public class RuleServiceImpl implements RuleService, RuntimeRuleService
*
* @author Roy Wetherall
*/
private class ExecutedRuleData
public class ExecutedRuleData
{
protected NodeRef actionableNodeRef;