Ejemplo n.º 1
0
  /** . The method is for doRouteStatusChange */
  @Override
  public void doRouteStatusChange(DocumentRouteStatusChange statusChangeEvent) {
    super.doRouteStatusChange(statusChangeEvent);

    String newStatus = statusChangeEvent.getNewRouteStatus();

    if (KewApiConstants.ROUTE_HEADER_FINAL_CD.equalsIgnoreCase(newStatus)) {
      getVersionHistoryService()
          .updateVersionHistory(
              getSubAward(),
              VersionStatus.ACTIVE,
              GlobalVariables.getUserSession().getPrincipalName());
    }
    if (newStatus.equalsIgnoreCase(KewApiConstants.ROUTE_HEADER_CANCEL_CD)
        || newStatus.equalsIgnoreCase(KewApiConstants.ROUTE_HEADER_DISAPPROVED_CD)) {
      getVersionHistoryService()
          .updateVersionHistory(
              getSubAward(),
              VersionStatus.CANCELED,
              GlobalVariables.getUserSession().getPrincipalName());
    }

    for (SubAward subAward : subAwardList) {
      subAward.setSubAwardDocument(this);
    }
  }
Ejemplo n.º 2
0
 /**
  * This method is to check whether rice async routing is ok now. Close to hack. called by
  * holdingpageaction Different document type may have different routing set up, so each document
  * type can implement its own isProcessComplete
  *
  * @return
  */
 public boolean isProcessComplete() {
   boolean isComplete = false;
   if (getDocumentHeader().hasWorkflowDocument()) {
     String docRouteStatus = getDocumentHeader().getWorkflowDocument().getStatus().getCode();
     if (KewApiConstants.ROUTE_HEADER_ENROUTE_CD.equals(docRouteStatus)
         || KewApiConstants.ROUTE_HEADER_PROCESSED_CD.equals(docRouteStatus)
         || KewApiConstants.ROUTE_HEADER_FINAL_CD.equals(docRouteStatus)) {
       isComplete = true;
     }
   }
   return isComplete;
 }