RM-3060 - making cut Off action available for record linked to folder with the same disposition schedule

This commit is contained in:
Roxana Lucanu
2016-04-26 18:06:11 +03:00
parent 9b007ef5db
commit 1c7e75c1b3

View File

@@ -889,6 +889,13 @@ public class DispositionServiceImpl extends ServiceBaseImpl
// Get the current action
String currentADId = (String) nodeService.getProperty(currentDispositionAction, PROP_DISPOSITION_ACTION_ID);
currentDispositionActionDefinition = di.getDispositionActionDefinition(currentADId);
// When the record has multiple disposition schedules the current disposition action may not be found by id
// In this case it will be searched by name
if(currentDispositionActionDefinition == null)
{
String currentADName = (String) nodeService.getProperty(currentDispositionAction, PROP_DISPOSITION_ACTION);
currentDispositionActionDefinition = di.getDispositionActionDefinitionByName(currentADName);
}
// Get the next disposition action
int index = currentDispositionActionDefinition.getIndex();