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:
@@ -157,39 +157,42 @@ public class ExtendedRuleServiceImpl extends RuleServiceImpl
|
||||
@Override
|
||||
public void executeRule(final Rule rule, final NodeRef nodeRef, final Set<ExecutedRuleData> executedRules)
|
||||
{
|
||||
QName typeQName = nodeService.getType(nodeRef);
|
||||
|
||||
// check if this is a rm rule on a rm artifact
|
||||
if (filePlanService.isFilePlanComponent(nodeRef) == true &&
|
||||
isFilePlanComponentRule(rule) == true)
|
||||
if (nodeService.exists(nodeRef) == true)
|
||||
{
|
||||
// ignore and
|
||||
if (isIgnoredType(typeQName) == false)
|
||||
{
|
||||
if (runAsRmAdmin == true)
|
||||
{
|
||||
// run as rmadmin
|
||||
filePlanAuthenticationService.runAsRmAdmin(new RunAsWork<Void>()
|
||||
{
|
||||
@Override
|
||||
public Void doWork() throws Exception
|
||||
{
|
||||
ExtendedRuleServiceImpl.super.executeRule(rule, nodeRef, executedRules);
|
||||
return null;
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
// run as current user
|
||||
ExtendedRuleServiceImpl.super.executeRule(rule, nodeRef, executedRules);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// just execute the rule as the current user
|
||||
super.executeRule(rule, nodeRef, executedRules);
|
||||
QName typeQName = nodeService.getType(nodeRef);
|
||||
|
||||
// check if this is a rm rule on a rm artifact
|
||||
if (filePlanService.isFilePlanComponent(nodeRef) == true &&
|
||||
isFilePlanComponentRule(rule) == true)
|
||||
{
|
||||
// ignore and
|
||||
if (isIgnoredType(typeQName) == false)
|
||||
{
|
||||
if (runAsRmAdmin == true)
|
||||
{
|
||||
// run as rmadmin
|
||||
filePlanAuthenticationService.runAsRmAdmin(new RunAsWork<Void>()
|
||||
{
|
||||
@Override
|
||||
public Void doWork() throws Exception
|
||||
{
|
||||
ExtendedRuleServiceImpl.super.executeRule(rule, nodeRef, executedRules);
|
||||
return null;
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
// run as current user
|
||||
ExtendedRuleServiceImpl.super.executeRule(rule, nodeRef, executedRules);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// just execute the rule as the current user
|
||||
super.executeRule(rule, nodeRef, executedRules);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user