When the last step of the current disposition is completed, no more calculation is needed.

(cherry picked from commit 606e91545c0725b5523770b1c3cb1cffd38c0ce0)
This commit is contained in:
roxana
2016-10-24 10:16:58 +03:00
committed by Tom Page
parent 9c5d0283cf
commit 72a7501d5e

View File

@@ -287,6 +287,13 @@ public class DispositionServiceImpl extends ServiceBaseImpl
NodeRef dsNodeRef = null; NodeRef dsNodeRef = null;
if (isRecord(nodeRef)) if (isRecord(nodeRef))
{ {
DispositionSchedule originDispositionSchedule = getOriginDispositionSchedule(nodeRef);
// if the initial disposition schedule of the record is folder based
if (isNotTrue(originDispositionSchedule.isRecordLevelDisposition()))
{
return null;
}
final NextActionFromDisposition dsNextAction = getDispositionActionByNameForRecord(nodeRef); final NextActionFromDisposition dsNextAction = getDispositionActionByNameForRecord(nodeRef);
if (dsNextAction != null) if (dsNextAction != null)
@@ -1152,6 +1159,13 @@ public class DispositionServiceImpl extends ServiceBaseImpl
if (nextDispositionAction == null) if (nextDispositionAction == null)
{ {
DispositionAction lastCompletedDispositionAction = getLastCompletedDispostionAction(record);
if (lastCompletedDispositionAction != null)
{
// all disposition actions upon the given record were completed
return null;
}
return getFirstDispositionAction(record, recordFolders); return getFirstDispositionAction(record, recordFolders);
} }
else else