use of org.kuali.rice.kew.api.WorkflowDocument in project cu-kfs by CU-CommunityApps.
the class PurchaseOrderDocument method prepareForSave.
// end customPrepareForSave(KualiDocumentEvent)
/**
* @see org.kuali.kfs.module.purap.document.PurchasingAccountsPayableDocumentBase#prepareForSave()
*/
@Override
public void prepareForSave(KualiDocumentEvent event) {
WorkflowDocument workFlowDocument = this.getFinancialSystemDocumentHeader().getWorkflowDocument();
String documentType = workFlowDocument.getDocumentTypeName();
if ((documentType.equals(PurapConstants.PurchaseOrderDocTypes.PURCHASE_ORDER_DOCUMENT)) || (documentType.equals(PurapConstants.PurchaseOrderDocTypes.PURCHASE_ORDER_SPLIT_DOCUMENT))) {
if (workFlowDocument.isCanceled()) {
// if doc is FINAL or canceled, saving should not be creating GL entries
setGeneralLedgerPendingEntries(new ArrayList());
} else if (workFlowDocument.isFinal()) {
} else {
super.prepareForSave(event);
}
}
}
use of org.kuali.rice.kew.api.WorkflowDocument in project cu-kfs by CU-CommunityApps.
the class PurchasingAccountsPayableDocumentBase method isDocumentStoppedInRouteNode.
// for app doc status
@Override
public boolean isDocumentStoppedInRouteNode(String nodeName) {
WorkflowDocument workflowDocument = this.getFinancialSystemDocumentHeader().getWorkflowDocument();
Set<String> names = workflowDocument.getCurrentNodeNames();
if (CollectionUtils.isNotEmpty(names)) {
List<String> currentRouteLevels = new ArrayList<String>(names);
for (String routeLevel : currentRouteLevels) {
if (routeLevel.contains(nodeName) && workflowDocument.isApprovalRequested()) {
return true;
}
}
}
return false;
}
use of org.kuali.rice.kew.api.WorkflowDocument in project cu-kfs by CU-CommunityApps.
the class CuVendorMaintainableImpl method doRouteStatusChange.
@Override
public void doRouteStatusChange(DocumentHeader header) {
LOG.debug("doRouteStatusChange: entering");
super.doRouteStatusChange(header);
VendorDetail vendorDetail = (VendorDetail) getBusinessObject();
WorkflowDocument workflowDoc = header.getWorkflowDocument();
if (workflowDoc.isProcessed()) {
LOG.debug("doRouteStatusChange: workflow is processed");
this.saveBusinessObject();
if (recordPvenRouteStatusChangeForPaymentWorksIsEnabled()) {
performPaymentWorksApprovalProcessingForVendor(vendorDetail, this.getDocumentNumber(), this.getMaintenanceAction());
}
} else if (workflowDoc.isDisapproved() || workflowDoc.isCanceled()) {
LOG.debug("doRouteStatusChange: disapproved or canceled");
if (recordPvenRouteStatusChangeForPaymentWorksIsEnabled()) {
performPaymentWorksDisapprovalCancelProcessingForVendor(vendorDetail, this.getDocumentNumber(), this.getMaintenanceAction());
}
}
}
use of org.kuali.rice.kew.api.WorkflowDocument in project cu-kfs by CU-CommunityApps.
the class CuAdvanceDepositDocumentAuthorizer method isDocumentStoppedInRouteNode.
/**
* Determines if document is in org review node for approval.
*
* @param nodeName
* @param accountingDocument
* @return true if in org review node for approval, false otherwise
*/
public boolean isDocumentStoppedInRouteNode(String nodeName, AccountingDocument accountingDocument) {
WorkflowDocument workflowDoc = accountingDocument.getDocumentHeader().getWorkflowDocument();
Set<String> currentRouteLevels = accountingDocument.getDocumentHeader().getWorkflowDocument().getCurrentNodeNames();
if (currentRouteLevels.contains(nodeName) && workflowDoc.isApprovalRequested()) {
return true;
}
return false;
}
use of org.kuali.rice.kew.api.WorkflowDocument in project cu-kfs by CU-CommunityApps.
the class CuAdvanceDepositDocumentPresentationController method canEdit.
/**
* @see org.kuali.kfs.kns.document.authorization.DocumentPresentationControllerBase#canEdit(org.kuali.kfs.kns.document.Document)
*/
@Override
public boolean canEdit(Document document) {
WorkflowDocument workflowDocument = document.getDocumentHeader().getWorkflowDocument();
FinancialSystemDocumentHeader documentheader = (FinancialSystemDocumentHeader) (document.getDocumentHeader());
if (workflowDocument.isCanceled() || documentheader.getFinancialDocumentInErrorNumber() != null) {
return false;
}
boolean canEdit = false;
if (workflowDocument.isInitiated() || workflowDocument.isSaved() || workflowDocument.isEnroute() || workflowDocument.isException()) {
canEdit = true;
}
return canEdit;
}
Aggregations