use of org.kuali.rice.kew.api.doctype.DocumentTypeService in project cu-kfs by CU-CommunityApps.
the class CuPdpExtractServiceImpl method updatePaymentRequest.
@Override
protected void updatePaymentRequest(PaymentRequestDocument paymentRequestDocument, Person puser, Date processRunDate) {
try {
PaymentRequestDocument doc = (PaymentRequestDocument) documentService.getByDocumentHeaderId(paymentRequestDocument.getDocumentNumber());
doc.setExtractedTimestamp(new Timestamp(processRunDate.getTime()));
SpringContext.getBean(PurapService.class).saveDocumentNoValidation(doc);
// RICE20 replaced searchableAttributeProcessingService.indexDocument with DocumentAttributeIndexingQueue.indexDocument
DocumentTypeService documentTypeService = SpringContext.getBean(DocumentTypeService.class);
DocumentType documentType = documentTypeService.getDocumentTypeByName(doc.getFinancialDocumentTypeCode());
DocumentAttributeIndexingQueue queue = KewApiServiceLocator.getDocumentAttributeIndexingQueue(documentType.getApplicationId());
queue.indexDocument(doc.getDocumentNumber());
} catch (WorkflowException e) {
throw new IllegalArgumentException("Unable to retrieve payment request: " + paymentRequestDocument.getDocumentNumber());
}
}
Aggregations