RM-3727 - added unit test for reviewed action and removed notification issued property

This commit is contained in:
Ana Bozianu
2017-04-05 12:04:31 +03:00
parent 3f1eec08ba
commit dac9f630de
15 changed files with 140 additions and 45 deletions

View File

@@ -120,27 +120,12 @@ public class NotifyOfRecordsDueForReviewJobExecuter extends RecordsManagementJob
}
};
RetryingTransactionCallback<Boolean> txUpdateNodesCallback = new RetryingTransactionCallback<Boolean>()
{
// Set the notification issued property.
public Boolean execute()
{
for (NodeRef node : resultNodes)
{
nodeService.setProperty(node, RecordsManagementModel.PROP_NOTIFICATION_ISSUED, "true");
}
return Boolean.TRUE;
}
};
/**
* Now do the work, one action in each transaction
*/
// don't retry the send email
retryingTransactionHelper.setMaxRetries(0);
retryingTransactionHelper.doInTransaction(txCallbackSendEmail);
retryingTransactionHelper.setMaxRetries(10);
retryingTransactionHelper.doInTransaction(txUpdateNodesCallback);
}
return null;
}

View File

@@ -133,7 +133,6 @@ public interface RecordsManagementModel extends RecordsManagementCustomModel
// Vital record aspect
QName ASPECT_VITAL_RECORD = QName.createQName(RM_URI, "vitalRecord");
QName PROP_REVIEW_AS_OF = QName.createQName(RM_URI, "reviewAsOf");
QName PROP_NOTIFICATION_ISSUED = QName.createQName(RM_URI, "notificationIssued");
// Cut off aspect
QName ASPECT_CUT_OFF = QName.createQName(RM_URI, "cutOff");