mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM-1021: It's possible to create record for synced content in folder with create record updated rule
* improve stability when defining update rules in collab site git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@56231 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -20,6 +20,7 @@ package org.alfresco.module.org_alfresco_module_rm.action.dm;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.alfresco.enterprise.repo.sync.SyncModel;
|
||||||
import org.alfresco.error.AlfrescoRuntimeException;
|
import org.alfresco.error.AlfrescoRuntimeException;
|
||||||
import org.alfresco.model.ContentModel;
|
import org.alfresco.model.ContentModel;
|
||||||
import org.alfresco.module.org_alfresco_module_rm.action.AuditableActionExecuterAbstractBase;
|
import org.alfresco.module.org_alfresco_module_rm.action.AuditableActionExecuterAbstractBase;
|
||||||
@@ -161,6 +162,14 @@ public class CreateRecordAction extends AuditableActionExecuterAbstractBase
|
|||||||
logger.debug("Can not create record, because " + actionedUponNodeRef.toString() + " has previously been rejected.");
|
logger.debug("Can not create record, because " + actionedUponNodeRef.toString() + " has previously been rejected.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (nodeService.hasAspect(actionedUponNodeRef, SyncModel.ASPECT_SYNCED) == true)
|
||||||
|
{
|
||||||
|
// can't declare the record if the node is sync'ed
|
||||||
|
if (logger.isDebugEnabled() == true)
|
||||||
|
{
|
||||||
|
logger.debug("Can't declare as record, because " + actionedUponNodeRef.toString() + " is synched content.");
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
NodeRef filePlan = (NodeRef)action.getParameterValue(PARAM_FILE_PLAN);
|
NodeRef filePlan = (NodeRef)action.getParameterValue(PARAM_FILE_PLAN);
|
||||||
|
@@ -156,6 +156,8 @@ public class ExtendedRuleServiceImpl extends RuleServiceImpl
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void executeRule(final Rule rule, final NodeRef nodeRef, final Set<ExecutedRuleData> executedRules)
|
public void executeRule(final Rule rule, final NodeRef nodeRef, final Set<ExecutedRuleData> executedRules)
|
||||||
|
{
|
||||||
|
if (nodeService.exists(nodeRef) == true)
|
||||||
{
|
{
|
||||||
QName typeQName = nodeService.getType(nodeRef);
|
QName typeQName = nodeService.getType(nodeRef);
|
||||||
|
|
||||||
@@ -192,6 +194,7 @@ public class ExtendedRuleServiceImpl extends RuleServiceImpl
|
|||||||
super.executeRule(rule, nodeRef, executedRules);
|
super.executeRule(rule, nodeRef, executedRules);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates whether the rule is a file plan component
|
* Indicates whether the rule is a file plan component
|
||||||
|
Reference in New Issue
Block a user