Search in sources :

Example 1 with InfrastructureException

use of org.kuali.kfs.krad.exception.InfrastructureException in project cu-kfs by CU-CommunityApps.

the class CuPurapServiceImpl method saveRoutingDataForRelatedDocuments.

// ==== CU Customization (KFSPTS-1656): Save IWantDocument routing data. ====
@Override
public void saveRoutingDataForRelatedDocuments(Integer accountsPayablePurchasingDocumentLinkIdentifier) {
    super.saveRoutingDataForRelatedDocuments(accountsPayablePurchasingDocumentLinkIdentifier);
    try {
        // Save IWNT routing data.
        @SuppressWarnings("unchecked") List<IWantView> iWantViews = getRelatedViews(IWantView.class, accountsPayablePurchasingDocumentLinkIdentifier);
        for (Iterator<IWantView> iterator = iWantViews.iterator(); iterator.hasNext(); ) {
            IWantView view = (IWantView) iterator.next();
            Document doc = documentService.getByDocumentHeaderId(view.getDocumentNumber());
            doc.getDocumentHeader().getWorkflowDocument().saveDocumentData();
        }
    } catch (WorkflowException e) {
        throw new InfrastructureException("unable to save routing data for related docs", e);
    }
}
Also used : WorkflowException(org.kuali.rice.kew.api.exception.WorkflowException) IWantView(edu.cornell.kfs.module.purap.businessobject.IWantView) VendorCreditMemoDocument(org.kuali.kfs.module.purap.document.VendorCreditMemoDocument) Document(org.kuali.kfs.krad.document.Document) PurchasingAccountsPayableDocument(org.kuali.kfs.module.purap.document.PurchasingAccountsPayableDocument) InfrastructureException(org.kuali.kfs.krad.exception.InfrastructureException)

Aggregations

IWantView (edu.cornell.kfs.module.purap.businessobject.IWantView)1 Document (org.kuali.kfs.krad.document.Document)1 InfrastructureException (org.kuali.kfs.krad.exception.InfrastructureException)1 PurchasingAccountsPayableDocument (org.kuali.kfs.module.purap.document.PurchasingAccountsPayableDocument)1 VendorCreditMemoDocument (org.kuali.kfs.module.purap.document.VendorCreditMemoDocument)1 WorkflowException (org.kuali.rice.kew.api.exception.WorkflowException)1