RM-689: Unclear work of outbound (delete) rules

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@54959 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Roy Wetherall
2013-09-05 06:57:54 +00:00
parent caeca3c66d
commit fedc2d2823
3 changed files with 8 additions and 8 deletions

View File

@@ -91,8 +91,6 @@ public class FileToAction extends RMActionExecuterAbstractBase
if (recordsManagementService.isRecordFolder(recordFolder) == true) if (recordsManagementService.isRecordFolder(recordFolder) == true)
{ {
// TODO .. what if a record of the same name already exists in the destination record folder??
final NodeRef finalRecordFolder = recordFolder; final NodeRef finalRecordFolder = recordFolder;
try try
{ {
@@ -108,10 +106,6 @@ public class FileToAction extends RMActionExecuterAbstractBase
throw new AlfrescoRuntimeException("Unable to execute file to action, becuase the destination was not a record folder."); throw new AlfrescoRuntimeException("Unable to execute file to action, becuase the destination was not a record folder.");
} }
} }
else
{
throw new AlfrescoRuntimeException("Unable to execute file to action, because the actioned upon node is not an unfiled record.");
}
} }
} }

View File

@@ -47,7 +47,11 @@ public class RejectAction extends RMActionExecuterAbstractBase
@Override @Override
protected void executeImpl(Action action, NodeRef actionedUponNodeRef) protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
{ {
recordService.rejectRecord(actionedUponNodeRef, (String) action.getParameterValue(PARAM_REASON)); if (nodeService.exists(actionedUponNodeRef) == true &&
nodeService.getProperty(actionedUponNodeRef, PROP_RECORD_ORIGINATING_LOCATION) != null)
{
recordService.rejectRecord(actionedUponNodeRef, (String) action.getParameterValue(PARAM_REASON));
}
} }
/** /**

View File

@@ -24,6 +24,7 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.alfresco.model.ContentModel;
import org.alfresco.module.org_alfresco_module_rm.action.RMActionExecuterAbstractBase; import org.alfresco.module.org_alfresco_module_rm.action.RMActionExecuterAbstractBase;
import org.alfresco.repo.action.ParameterDefinitionImpl; import org.alfresco.repo.action.ParameterDefinitionImpl;
import org.alfresco.repo.workflow.WorkflowModel; import org.alfresco.repo.workflow.WorkflowModel;
@@ -78,7 +79,8 @@ public class RequestInfoAction extends RMActionExecuterAbstractBase
@Override @Override
protected void executeImpl(Action action, NodeRef actionedUponNodeRef) protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
{ {
if (recordService.isRecord(actionedUponNodeRef) == true) if (recordService.isRecord(actionedUponNodeRef) == true &&
nodeService.hasAspect(actionedUponNodeRef, ContentModel.ASPECT_PENDING_DELETE) == false)
{ {
String workflowDefinitionId = workflowService.getDefinitionByName(REQUEST_INFO_WORKFLOW_DEFINITION_NAME).getId(); String workflowDefinitionId = workflowService.getDefinitionByName(REQUEST_INFO_WORKFLOW_DEFINITION_NAME).getId();
Map<QName, Serializable> parameters = new HashMap<QName, Serializable>(); Map<QName, Serializable> parameters = new HashMap<QName, Serializable>();