use of org.kuali.kfs.krad.service.KualiRuleService in project cu-kfs by CU-CommunityApps.
the class IWantDocumentAction method continueToItems.
/**
* Takes the user to next page
*
* @param mapping
* @param form
* @param request
* @param response
* @return
* @throws Exception
*/
public ActionForward continueToItems(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
IWantDocumentForm iWantForm = (IWantDocumentForm) form;
IWantDocument iWantDocument = iWantForm.getIWantDocument();
iWantDocument.setExplanation(iWantDocument.getDocumentHeader().getExplanation());
KualiRuleService ruleService = SpringContext.getBean(KualiRuleService.class);
boolean rulePassed = true;
// call business rules
rulePassed &= ruleService.applyRules(new RouteDocumentEvent(KFSConstants.DOCUMENT_HEADER_ERRORS, iWantDocument));
if (rulePassed) {
iWantForm.setStep(CUPurapConstants.IWantDocumentSteps.ITEMS_AND_ACCT_DATA_STEP);
iWantDocument.setStep(CUPurapConstants.IWantDocumentSteps.ITEMS_AND_ACCT_DATA_STEP);
}
return mapping.findForward(KFSConstants.MAPPING_BASIC);
}
Aggregations