• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java DocumentRouteStatusChange类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.kuali.rice.kew.framework.postprocessor.DocumentRouteStatusChange的典型用法代码示例。如果您正苦于以下问题:Java DocumentRouteStatusChange类的具体用法?Java DocumentRouteStatusChange怎么用?Java DocumentRouteStatusChange使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



DocumentRouteStatusChange类属于org.kuali.rice.kew.framework.postprocessor包,在下文中一共展示了DocumentRouteStatusChange类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: doRouteStatusChange

import org.kuali.rice.kew.framework.postprocessor.DocumentRouteStatusChange; //导入依赖的package包/类
public ProcessDocReport doRouteStatusChange(DocumentRouteStatusChange statusChangeEvent) throws Exception {
        // defend against re-entrancy by only throwing the route status change exception if the status change we are undergoing is not a transition into exception state!
        // if we don't do this, this postprocessor will blow up when it is subsequently notified about the transition into exception state that it previously caused
        // which will result in the document never actually transitioning into exception state
        boolean transitioningIntoException = !KewApiConstants.ROUTE_HEADER_EXCEPTION_CD.equals(statusChangeEvent.getOldRouteStatus()) &&
                                                     KewApiConstants.ROUTE_HEADER_EXCEPTION_CD.equals(statusChangeEvent.getNewRouteStatus());
	if (THROW_ROUTE_STATUS_CHANGE_EXCEPTION && !transitioningIntoException) {
		throw new RuntimeException("I am the doRouteStatusChange exploder");
	}
	if (BLOW_UP_ON_TRANSITION_INTO_EXCEPTION && transitioningIntoException) {
		throw new RuntimeException("Throwing an exception when transitioning into exception status.");
	}
	if (KewApiConstants.ROUTE_HEADER_EXCEPTION_CD.equals(statusChangeEvent.getOldRouteStatus())) {
		TRANSITIONED_OUT_OF_EXCEPTION_ROUTING = true;
	}
	return new ProcessDocReport(true, "");
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:18,代码来源:ExceptionRoutingTestPostProcessor.java


示例2: testEmptyProcess

import org.kuali.rice.kew.framework.postprocessor.DocumentRouteStatusChange; //导入依赖的package包/类
/**
 * creates a new doc of the given type and routes it, asserting that it goes final
 * @throws Exception
 */
@Test public void testEmptyProcess() throws Exception {
    PostProcessor.clear();

    WorkflowDocument document = WorkflowDocumentFactory.createDocument(getPrincipalIdForName("ewestfal"), DOCUMENT_TYPE_NAME);
    document.route("test");
    assertNotNull(document.getDocumentId());
    assertTrue(document.isFinal());

    // verify that the PostProcessor invoked the proper status transitions
    // Initiated -> Enroute -> Processed -> Final
    assertEquals(3, PostProcessor.statusChanges.size());
    DocumentRouteStatusChange iToR = PostProcessor.statusChanges.get(0);
    DocumentRouteStatusChange rToP = PostProcessor.statusChanges.get(1);
    DocumentRouteStatusChange pToF = PostProcessor.statusChanges.get(2);
    assertEquals(DocumentStatus.INITIATED.getCode(), iToR.getOldRouteStatus());
    assertEquals(DocumentStatus.ENROUTE.getCode(), iToR.getNewRouteStatus());
    assertEquals(DocumentStatus.ENROUTE.getCode(), rToP.getOldRouteStatus());
    assertEquals(DocumentStatus.PROCESSED.getCode(), rToP.getNewRouteStatus());
    assertEquals(DocumentStatus.PROCESSED.getCode(), pToF.getOldRouteStatus());
    assertEquals(DocumentStatus.FINAL.getCode(), pToF.getNewRouteStatus());
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:26,代码来源:EmptyProcessTest.java


示例3: doRouteStatusChange

import org.kuali.rice.kew.framework.postprocessor.DocumentRouteStatusChange; //导入依赖的package包/类
public ProcessDocReport doRouteStatusChange(DocumentRouteStatusChange statusChangeEvent) throws Exception {
	if (KewApiConstants.ROUTE_HEADER_PROCESSED_CD.equals(statusChangeEvent.getNewRouteStatus())) {
		WorkflowDocument document = WorkflowDocumentFactory.loadDocument(getPrincipalIdForName("ewestfal"), statusChangeEvent.getDocumentId());
		document.setApplicationContent(APPLICATION_CONTENT);
		document.setTitle(DOC_TITLE);
		document.saveDocumentData();
		// now route another document from the post processor, sending it an adhoc request
		WorkflowDocument ppDocument = WorkflowDocumentFactory.createDocument(getPrincipalIdForName("user1"), "testModifyDocumentInPostProcessor");
		routedDocumentId = ppDocument.getDocumentId();
		// principal id 1 = ewestfal
		ppDocument.adHocToPrincipal(ActionRequestType.APPROVE, "AdHoc", "", "2001", "", true);
		ppDocument.route("");
		processedChange = true;
	}
	return new ProcessDocReport(true);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:17,代码来源:PostProcessorTest.java


示例4: doRouteStatusChange

import org.kuali.rice.kew.framework.postprocessor.DocumentRouteStatusChange; //导入依赖的package包/类
/**
 * This is the default implementation which checks for a different workflow statuses, and updates the Kuali status accordingly.
 * 
 * @see org.kuali.rice.krad.document.Document#doRouteStatusChange()
 */
@Override
public void doRouteStatusChange(DocumentRouteStatusChange statusChangeEvent) {
    if (getDocumentHeader().getWorkflowDocument().isCanceled()) {
        getFinancialSystemDocumentHeader().setFinancialDocumentStatusCode(OLEConstants.DocumentStatusCodes.CANCELLED);
    }
    else if (getDocumentHeader().getWorkflowDocument().isEnroute()) {
        getFinancialSystemDocumentHeader().setFinancialDocumentStatusCode(OLEConstants.DocumentStatusCodes.ENROUTE);
    }
    if (getDocumentHeader().getWorkflowDocument().isDisapproved()) {
        getFinancialSystemDocumentHeader().setFinancialDocumentStatusCode(OLEConstants.DocumentStatusCodes.DISAPPROVED);
    }
    if (getDocumentHeader().getWorkflowDocument().isProcessed()) {
        getFinancialSystemDocumentHeader().setFinancialDocumentStatusCode(OLEConstants.DocumentStatusCodes.APPROVED);
    }
    if ( LOG.isInfoEnabled() ) {
        LOG.info("Status is: " + getFinancialSystemDocumentHeader().getFinancialDocumentStatusCode());
    }
    
    super.doRouteStatusChange(statusChangeEvent);
}
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:26,代码来源:FinancialSystemMaintenanceDocument.java


示例5: doRouteStatusChange

import org.kuali.rice.kew.framework.postprocessor.DocumentRouteStatusChange; //导入依赖的package包/类
/**
 * @see org.kuali.rice.krad.document.DocumentBase#doRouteStatusChange()
 */
@Override
public void doRouteStatusChange(DocumentRouteStatusChange statusChangeEvent) {
    super.doRouteStatusChange(statusChangeEvent);

    WorkflowDocument kwd = getDocumentHeader().getWorkflowDocument();

    if (LOG.isDebugEnabled()) {
        logState();
    }

    if (kwd.isProcessed()) {
        // all approvals have been processed, finalize everything
        SpringContext.getBean(CashManagementService.class).finalizeCashManagementDocument(this);
    }
    else if (kwd.isCanceled() || kwd.isDisapproved()) {
        // document has been canceled or disapproved
        SpringContext.getBean(CashManagementService.class).cancelCashManagementDocument(this);
    }
}
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:23,代码来源:CashManagementDocument.java


示例6: buildNotificationBody

import org.kuali.rice.kew.framework.postprocessor.DocumentRouteStatusChange; //导入依赖的package包/类
/**
 * collect all the information and build the notification body
 */
protected String buildNotificationBody(TravelDocument travelDocument, DocumentRouteStatusChange statusChange, NotificationPreference preference) {
    Map<String, Object> notificationInformationHolder = new HashMap<String, Object>();
    notificationInformationHolder.put(TemConstants.NOTIFICATION_PREFERENCE, preference.getLabel());
    notificationInformationHolder.put(KFSPropertyConstants.DOCUMENT, travelDocument);
    notificationInformationHolder.put(TemConstants.STATUS_CHANGE_DTO, statusChange);
    String newStatusLabel = KewApiConstants.DOCUMENT_STATUSES.get(statusChange.getNewRouteStatus());
    notificationInformationHolder.put(TemPropertyConstants.NEW_ROUTE_STATUS, newStatusLabel);

    String oldStatusLabel = KewApiConstants.DOCUMENT_STATUSES.get(statusChange.getOldRouteStatus());
    notificationInformationHolder.put(TemPropertyConstants.OLD_ROUTE_STATUS, oldStatusLabel);

    String campusTravelEmailAddress = this.getCampusTravelEmailAddress();
    notificationInformationHolder.put(TemConstants.CAMPUS_TRAVEL_EMAIL_ADDRESS, campusTravelEmailAddress);

    notificationInformationHolder.put(DateTimeService.class.getSimpleName(), dateTimeService);

    return this.getKfsNotificationService().generateNotificationContent(this.getNotificationTemplate(), notificationInformationHolder);
}
 
开发者ID:kuali,项目名称:kfs,代码行数:22,代码来源:TravelDocumentNotificationServiceImpl.java


示例7: doRouteStatusChange

import org.kuali.rice.kew.framework.postprocessor.DocumentRouteStatusChange; //导入依赖的package包/类
/**
 * @see org.kuali.rice.kns.document.Document#doRouteStatusChange(org.kuali.rice.kew.dto.DocumentRouteStatusChange)
 */
@Override
public void doRouteStatusChange(DocumentRouteStatusChange statusChangeEvent) {

    super.doRouteStatusChange(statusChangeEvent);

    //doc is final / processed
    if (DocumentStatus.PROCESSED.getCode().equals(statusChangeEvent.getNewRouteStatus())) {

        retirePreviousAuthorizations();

        final DocumentAttributeIndexingQueue documentAttributeIndexingQueue = KewApiServiceLocator.getDocumentAttributeIndexingQueue();
        try {
            updateAndSaveAppDocStatus(TravelAuthorizationStatusCodeKeys.CLOSED);
            documentAttributeIndexingQueue.indexDocument(getDocumentNumber());
        }
        catch (WorkflowException we) {
            throw new RuntimeException("Workflow document exception while updating related documents", we);
        }
    }
}
 
开发者ID:kuali,项目名称:kfs,代码行数:24,代码来源:TravelAuthorizationCloseDocument.java


示例8: doRouteStatusChange

import org.kuali.rice.kew.framework.postprocessor.DocumentRouteStatusChange; //导入依赖的package包/类
/**
 * @see org.kuali.kfs.module.tem.document.TravelDocumentBase#doRouteStatusChange(org.kuali.rice.kew.dto.DocumentRouteStatusChange)
 */
@Override
public void doRouteStatusChange(DocumentRouteStatusChange statusChangeEvent) {
    super.doRouteStatusChange(statusChangeEvent);

    if (DocumentStatus.PROCESSED.getCode().equals(statusChangeEvent.getNewRouteStatus())) {

        LOG.debug("New route status is: " + statusChangeEvent.getNewRouteStatus());
        try {
            updateAndSaveAppDocStatus(TravelRelocationStatusCodeKeys.RELO_MANAGER_APPROVED);
        }
        catch (WorkflowException ex) {
            // TODO Auto-generated catch block
            ex.printStackTrace();
        }
    }
}
 
开发者ID:kuali,项目名称:kfs,代码行数:20,代码来源:TravelRelocationDocument.java


示例9: doRouteStatusChange

import org.kuali.rice.kew.framework.postprocessor.DocumentRouteStatusChange; //导入依赖的package包/类
@Override
public void doRouteStatusChange(DocumentRouteStatusChange statusChangeEvent) {
    super.doRouteStatusChange(statusChangeEvent);
    DocumentStatus status = getDocumentHeader().getWorkflowDocument().getStatus();
    if (status.equals(DocumentStatus.PROCESSED)){
        TemProfileAccount profileAccount = new TemProfileAccount();
        Calendar cal = Calendar.getInstance();
        profileAccount.setEffectiveDate(new java.sql.Date(cal.getTimeInMillis()));
        String code = getParameterService().getParameterValueAsString(TemCTSCardApplicationDocument.class, TemConstants.CENTRAL_TRAVEL_SYSTEM_CARD_CODE);
        Map<String, String> fieldValues = new HashMap<String, String>();
        fieldValues.put(TemPropertyConstants.CREDIT_CARD_AGENCY_CODE, code);
        List<CreditCardAgency> creditCardAgencyList = (List<CreditCardAgency>) getBusinessObjectService().findMatching(CreditCardAgency.class, fieldValues);
        CreditCardAgency creditCardAgency = creditCardAgencyList.get(0);
        profileAccount.setCreditCardAgency(creditCardAgency);
        profileAccount.setCreditCardOrAgencyCode(creditCardAgency.getCreditCardOrAgencyCode());
        profileAccount.setName(creditCardAgency.getCreditCardOrAgencyName());
        profileAccount.setActive(true);
        profileAccount.setAccountNumber(temProfile.getEmployeeId());
        String text = getConfigurationService().getPropertyValueAsString(TemKeyConstants.CARD_NOTE_TEXT);
        DateFormatter formatter = new DateFormatter();
        String note = MessageFormat.format(text, formatter.format(new java.util.Date()), getDocumentHeader().getDocumentNumber());
        profileAccount.setNote(note);
        getTemProfile().getAccounts().add(profileAccount);
        getBusinessObjectService().save(temProfile);
    }
}
 
开发者ID:kuali,项目名称:kfs,代码行数:27,代码来源:TemCTSCardApplicationDocument.java


示例10: doRouteStatusChange

import org.kuali.rice.kew.framework.postprocessor.DocumentRouteStatusChange; //导入依赖的package包/类
/**
 * @see org.kuali.kfs.module.tem.document.TravelDocumentBase#doRouteStatusChange(org.kuali.rice.kew.dto.DocumentRouteStatusChange)
 */
@Override
public void doRouteStatusChange(DocumentRouteStatusChange statusChangeEvent) {
    super.doRouteStatusChange(statusChangeEvent);

    if (DocumentStatus.PROCESSED.getCode().equals(statusChangeEvent.getNewRouteStatus())) {

        LOG.debug("New route status is " + statusChangeEvent.getNewRouteStatus());

        // for some reason when it goes to final it never updates to the last status
        try {
            updateAndSaveAppDocStatus(EntertainmentStatusCodeKeys.ENT_MANAGER_APPROVED);
        }
        catch (WorkflowException ex) {
            // TODO Auto-generated catch block
            ex.printStackTrace();
        }
    }
}
 
开发者ID:kuali,项目名称:kfs,代码行数:22,代码来源:TravelEntertainmentDocument.java


示例11: doRouteStatusChange

import org.kuali.rice.kew.framework.postprocessor.DocumentRouteStatusChange; //导入依赖的package包/类
/**
 * This is the default implementation which checks for a different workflow statuses, and updates the Kuali status accordingly.
 *
 * @see org.kuali.rice.krad.document.Document#doRouteStatusChange()
 */
@Override
public void doRouteStatusChange(DocumentRouteStatusChange statusChangeEvent) {
    getFinancialSystemDocumentHeader().setWorkflowDocumentStatusCode(statusChangeEvent.getNewRouteStatus());

    if (getDocumentHeader().getWorkflowDocument().isCanceled()) {
        getFinancialSystemDocumentHeader().setFinancialDocumentStatusCode(KFSConstants.DocumentStatusCodes.CANCELLED);
    }
    else if (getDocumentHeader().getWorkflowDocument().isEnroute()) {
        getFinancialSystemDocumentHeader().setFinancialDocumentStatusCode(KFSConstants.DocumentStatusCodes.ENROUTE);
    }
    if (getDocumentHeader().getWorkflowDocument().isDisapproved()) {
        getFinancialSystemDocumentHeader().setFinancialDocumentStatusCode(KFSConstants.DocumentStatusCodes.DISAPPROVED);
    }
    if (getDocumentHeader().getWorkflowDocument().isProcessed()) {
        getFinancialSystemDocumentHeader().setFinancialDocumentStatusCode(KFSConstants.DocumentStatusCodes.APPROVED);
    }
    if ( LOG.isInfoEnabled() ) {
        LOG.info("Status is: " + getFinancialSystemDocumentHeader().getFinancialDocumentStatusCode());
    }

    super.doRouteStatusChange(statusChangeEvent);
}
 
开发者ID:kuali,项目名称:kfs,代码行数:28,代码来源:FinancialSystemMaintenanceDocument.java


示例12: doRouteStatusChange

import org.kuali.rice.kew.framework.postprocessor.DocumentRouteStatusChange; //导入依赖的package包/类
/**
 * This is the default implementation which checks for a different workflow statuses, and updates the Kuali status accordingly.
 *
 * @see org.kuali.rice.krad.document.Document#doRouteStatusChange()
 */
@Override
public void doRouteStatusChange(DocumentRouteStatusChange statusChangeEvent) {
    // set the route status
    getFinancialSystemDocumentHeader().setWorkflowDocumentStatusCode(getWorkflowDocumentStatusCode(DocumentStatus.fromCode(statusChangeEvent.getNewRouteStatus())));
    getFinancialSystemDocumentHeader().setApplicationDocumentStatus(getFinancialSystemDocumentHeader().getWorkflowDocument().getApplicationDocumentStatus());

    if (getDocumentHeader().getWorkflowDocument().isCanceled()) {
        getFinancialSystemDocumentHeader().setFinancialDocumentStatusCode(KFSConstants.DocumentStatusCodes.CANCELLED);
    }
    else if (getDocumentHeader().getWorkflowDocument().isEnroute()) {
        getFinancialSystemDocumentHeader().setFinancialDocumentStatusCode(KFSConstants.DocumentStatusCodes.ENROUTE);
    }
    if (getDocumentHeader().getWorkflowDocument().isDisapproved()) {
        getFinancialSystemDocumentHeader().setFinancialDocumentStatusCode(KFSConstants.DocumentStatusCodes.DISAPPROVED);
    }
    if (getDocumentHeader().getWorkflowDocument().isProcessed()) {
        getFinancialSystemDocumentHeader().setFinancialDocumentStatusCode(KFSConstants.DocumentStatusCodes.APPROVED);
    }
    if ( LOG.isInfoEnabled() ) {
        LOG.info("Document: " + statusChangeEvent.getDocumentId() + " -- Status is: " + getFinancialSystemDocumentHeader().getFinancialDocumentStatusCode());
    }

    super.doRouteStatusChange(statusChangeEvent);
}
 
开发者ID:kuali,项目名称:kfs,代码行数:30,代码来源:FinancialSystemTransactionalDocumentBase.java


示例13: doRouteStatusChange

import org.kuali.rice.kew.framework.postprocessor.DocumentRouteStatusChange; //导入依赖的package包/类
/**
 * If the document final, unlock the document
 * 
 * @see org.kuali.rice.krad.document.DocumentBase#doRouteStatusChange()
 */
@Override
public void doRouteStatusChange(DocumentRouteStatusChange statusChangeEvent) {
    super.doRouteStatusChange(statusChangeEvent);

    WorkflowDocument workflowDocument = getDocumentHeader().getWorkflowDocument();

    if (workflowDocument.isProcessed()) {
        SpringContext.getBean(EquipmentLoanOrReturnService.class).processApprovedEquipmentLoanOrReturn(this);
    }

    // Remove asset lock when doc status change. We don't include isFinal since document always go to 'processed' first.
    if (workflowDocument.isCanceled() || workflowDocument.isDisapproved() || workflowDocument.isProcessed()) {
        this.getCapitalAssetManagementModuleService().deleteAssetLocks(this.getDocumentNumber(), null);
    }
}
 
开发者ID:kuali,项目名称:kfs,代码行数:21,代码来源:EquipmentLoanOrReturnDocument.java


示例14: doRouteStatusChange

import org.kuali.rice.kew.framework.postprocessor.DocumentRouteStatusChange; //导入依赖的package包/类
/**
 * @see org.kuali.kfs.sys.document.GeneralLedgerPostingDocumentBase#doRouteStatusChange()
 */
@Override
public void doRouteStatusChange(DocumentRouteStatusChange statusChangeEvent) {
	super.doRouteStatusChange(statusChangeEvent);
	WorkflowDocument workflowDocument = getDocumentHeader().getWorkflowDocument();

	// Update asset payment table with the approved asset detail records.
	if (workflowDocument.isProcessed()) {
		SpringContext.getBean(AssetPaymentService.class).processApprovedAssetPayment(this);
	}

	// Remove asset lock when doc status change. We don't include
	// isFinal since document always go to 'processed' first.
	if (workflowDocument.isCanceled() || workflowDocument.isDisapproved() || workflowDocument.isProcessed()) {
		this.getCapitalAssetManagementModuleService().deleteAssetLocks(this.getDocumentNumber(), null);
	}

	if (isCapitalAssetBuilderOriginIndicator()) {
		SpringContext.getBean(CapitalAssetBuilderModuleService.class).notifyRouteStatusChange(getDocumentHeader());
	}
}
 
开发者ID:kuali,项目名称:kfs,代码行数:24,代码来源:AssetPaymentDocument.java


示例15: doRouteStatusChange

import org.kuali.rice.kew.framework.postprocessor.DocumentRouteStatusChange; //导入依赖的package包/类
@Override
public ProcessDocReport doRouteStatusChange(DocumentRouteStatusChange statusChangeEvent) throws Exception {		
	ProcessDocReport pdr = null;
	Long documentId = new Long(statusChangeEvent.getDocumentId());
	LeaveCalendarDocumentHeader document = LmServiceLocator.getLeaveCalendarDocumentHeaderService().getDocumentHeader(documentId.toString());
	if (document != null) {
		pdr = super.doRouteStatusChange(statusChangeEvent);
		// Only update the status if it's different.
		if (!document.getDocumentStatus().equals(statusChangeEvent.getNewRouteStatus())) {
               DocumentStatus newDocumentStatus = DocumentStatus.fromCode(statusChangeEvent.getNewRouteStatus());

			updateLeaveCalendarDocumentHeaderStatus(document, newDocumentStatus);
			
			calculateMaxCarryOver(document, newDocumentStatus);
		}
	}
	
	return pdr;
}
 
开发者ID:kuali-mirror,项目名称:kpme,代码行数:20,代码来源:LmPostProcessor.java


示例16: doRouteStatusChange

import org.kuali.rice.kew.framework.postprocessor.DocumentRouteStatusChange; //导入依赖的package包/类
@Override
public ProcessDocReport doRouteStatusChange(DocumentRouteStatusChange statusChangeEvent) throws Exception {		
	ProcessDocReport pdr = null;
	Long documentId = new Long(statusChangeEvent.getDocumentId());
	TimesheetDocumentHeader document = TkServiceLocator.getTimesheetDocumentHeaderService().getDocumentHeader(documentId.toString());
	if (document != null) {
		pdr = super.doRouteStatusChange(statusChangeEvent);
		// Only update the status if it's different.
		if (!document.getDocumentStatus().equals(statusChangeEvent.getNewRouteStatus())) {
			DocumentStatus newDocumentStatus = DocumentStatus.fromCode(statusChangeEvent.getNewRouteStatus());

			updateTimesheetDocumentHeaderStatus(document, newDocumentStatus);
			
			calculateLeaveCalendarOvertime(document, newDocumentStatus);
			
			calculateMaxCarryOver(document, newDocumentStatus);
		}
	}
	
	return pdr;
}
 
开发者ID:kuali-mirror,项目名称:kpme,代码行数:22,代码来源:TkPostProcessor.java


示例17: notifyStatusChange

import org.kuali.rice.kew.framework.postprocessor.DocumentRouteStatusChange; //导入依赖的package包/类
protected void notifyStatusChange(final String newStatusCode, final String oldStatusCode) throws InvalidActionTakenException {
       invokePostProcessor("Notifying post processor of status change " + oldStatusCode + "->" + newStatusCode, new Callable<ProcessDocReport>() {
           public ProcessDocReport call() throws Exception {
               DocumentRouteStatusChange statusChangeEvent = new DocumentRouteStatusChange(routeHeader.getDocumentId(), routeHeader.getAppDocId(), oldStatusCode, newStatusCode);
               PostProcessor postProcessor = routeHeader.getDocumentType().getPostProcessor();
               return postProcessor.doRouteStatusChange(statusChangeEvent);
           }
       });
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:10,代码来源:ActionTakenEvent.java


示例18: doRouteStatusChange

import org.kuali.rice.kew.framework.postprocessor.DocumentRouteStatusChange; //导入依赖的package包/类
public ProcessDocReport doRouteStatusChange(DocumentRouteStatusChange statusChangeEvent) throws Exception {
    DocumentRouteHeaderValue routeHeader = getRouteHeaderService().getRouteHeader(statusChangeEvent.getDocumentId());
    
    if (KewApiConstants.ROUTE_HEADER_PROCESSED_CD.equals(routeHeader.getDocRouteStatus())) {
        getRuleService().makeCurrent(routeHeader.getDocumentId());
    }
    return new ProcessDocReport(true, "");
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:9,代码来源:RulePostProcessor.java


示例19: notifyStatusChange

import org.kuali.rice.kew.framework.postprocessor.DocumentRouteStatusChange; //导入依赖的package包/类
protected void notifyStatusChange(DocumentRouteHeaderValue routeHeader, String newStatusCode, String oldStatusCode) throws InvalidActionTakenException {
    DocumentRouteStatusChange statusChangeEvent = new DocumentRouteStatusChange(routeHeader.getDocumentId(), routeHeader.getAppDocId(), oldStatusCode, newStatusCode);
    try {
        LOG.debug("Notifying post processor of status change "+oldStatusCode+"->"+newStatusCode);
        PostProcessor postProcessor = routeHeader.getDocumentType().getPostProcessor();
        ProcessDocReport report = postProcessor.doRouteStatusChange(statusChangeEvent);
        if (!report.isSuccess()) {
            LOG.warn(report.getMessage(), report.getProcessException());
            throw new InvalidActionTakenException(report.getMessage());
        }
    } catch (Exception ex) {
        LOG.warn(ex, ex);
        throw new WorkflowRuntimeException(ex);
    }
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:16,代码来源:ExceptionRoutingServiceImpl.java


示例20: doRouteStatusChange

import org.kuali.rice.kew.framework.postprocessor.DocumentRouteStatusChange; //导入依赖的package包/类
/**
 * When the EDL simple message sending form is submitted, it is routed straight to FINAL and at that time (when RESOLVED), we 
 * actually send the notification.
 * @see org.kuali.rice.kew.framework.postprocessor.PostProcessor#doRouteStatusChange(org.kuali.rice.kew.framework.postprocessor.DocumentRouteStatusChange)
 */
@Override
public ProcessDocReport doRouteStatusChange(DocumentRouteStatusChange arg0) throws Exception {
    LOG.debug("ENTERING NotificationSenderFormPostProcessor.doRouteStatusChange() for Notification Sender Form with document ID: " + arg0.getDocumentId());

    if(arg0.getNewRouteStatus().equals(KewApiConstants.ROUTE_HEADER_PROCESSED_CD)) {
        LOG.debug("Workflow status has changed to RESOLVED for Notification Sender Form with document ID: " + arg0.getDocumentId() +
            ".  We are now calling the NotificationService.sendNotification() service.");

        // obtain a workflow user object first
        //NetworkIdDTO proxyUser = new NetworkIdDTO(Util.getNotificationSystemUser());
        String proxyUserId = Util.getNotificationSystemUser();

        // now construct the workflow document, which will interact with workflow
        WorkflowDocument document;
        try {
        document = NotificationWorkflowDocument.loadNotificationDocument(proxyUserId, arg0.getDocumentId());

        LOG.debug("XML:" + document.getApplicationContent());

        //parse out the application content into a Notification BO
                NotificationBo notification = messageContentService.parseSerializedNotificationXml(document.getApplicationContent().getBytes());

                LOG.debug("Notification Content: " + notification.getContent());

                // send the notification
                notificationService.sendNotification(notification);

                LOG.debug("NotificationService.sendNotification() was successfully called for Notification Sender Form with document ID: " + arg0.getDocumentId());
        } catch(Exception e) {
        throw new RuntimeException(e);
        }
    }

    LOG.debug("LEAVING NotificationSenderFormPostProcessor.doRouteStatusChange() for Notification Sender Form with document ID: " + arg0.getDocumentId());
    return new ProcessDocReport(true, "");
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:42,代码来源:NotificationSenderFormPostProcessor.java



注:本文中的org.kuali.rice.kew.framework.postprocessor.DocumentRouteStatusChange类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java LegendForm类代码示例发布时间:2022-05-22
下一篇:
Java ILinker类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap