private void updateAIPsToBeAppraised(ModelService model, List<AIP> aips, IngestJobPluginInfo jobPluginInfo) {
for (AIP aip : aips) {
aip.setState(AIPState.UNDER_APPRAISAL);
try {
aip = model.updateAIPState(aip, PluginHelper.getJobUsername(this, model));
getParameterValues().put(RodaConstants.PLUGIN_PARAMS_OUTCOMEOBJECTID_TO_SOURCEOBJECTID_MAP,
JsonUtils.getJsonFromObject(jobPluginInfo.getAipIdToTransferredResourceIds()));
PluginHelper.updateJobReportState(this, model, aip.getIngestSIPUUID(), aip.getId(), AIPState.UNDER_APPRAISAL);
jobPluginInfo.incrementOutcomeObjectsWithManualIntervention();
} catch (GenericException | NotFoundException | RequestNotValidException | AuthorizationDeniedException e) {
LOGGER.error("Error while updating AIP state to '{}'. Reason: {}", AIPState.UNDER_APPRAISAL, e.getMessage());
}
}
}