private static WorkflowDocumentService getWorkflowDocumentService() { if (workflowDocumentService == null) { workflowDocumentService = KRADServiceLocatorWeb.getWorkflowDocumentService(); } return workflowDocumentService; }
protected void addStandardAttributes(Document document, Map<String, String> attributes) { WorkflowDocument wd = document.getDocumentHeader().getWorkflowDocument(); attributes.put(KimConstants.AttributeConstants.DOCUMENT_NUMBER, document.getDocumentNumber()); attributes.put(KimConstants.AttributeConstants.DOCUMENT_TYPE_NAME, wd.getDocumentTypeName()); if (wd.isInitiated() || wd.isSaved()) { attributes.put(KimConstants.AttributeConstants.ROUTE_NODE_NAME, PRE_ROUTING_ROUTE_NAME); } else { attributes.put(KimConstants.AttributeConstants.ROUTE_NODE_NAME, KRADServiceLocatorWeb.getWorkflowDocumentService().getCurrentRouteNodeNames(wd)); } attributes.put(KimConstants.AttributeConstants.ROUTE_STATUS_CODE, wd.getStatus().getCode()); }
private void sendApproverFyi(TimesheetDocument timesheetDocument, Long workArea){ List<AdHocRouteRecipient> recipients = buildAdHocRouteRecipients(workArea); String documentId = timesheetDocument.getDocumentId(); WorkflowDocument wd = WorkflowDocumentFactory.loadDocument(timesheetDocument.getPrincipalId(), documentId); try { // TODO: Annotation - "Clock Logs are out of order" need to be changed ??? KRADServiceLocatorWeb.getWorkflowDocumentService().sendWorkflowNotification(wd, "Clock Logs are out of order", recipients); } catch (WorkflowException e) { LOG.debug("sendApproverFyi was filed."); } }
person = KimApiServiceLocator.getPersonService().getPersonByPrincipalName(KRADConstants.SYSTEM_USER); workflowDocument = KRADServiceLocatorWeb.getWorkflowDocumentService().loadWorkflowDocument(getDocument().getDocumentNumber(), person); UserSessionUtils.addWorkflowDocument(GlobalVariables.getUserSession(), workflowDocument); if (workflowDocument == null)
/** * Default constructor a MaintenanceDocumentRuleBase.java. */ public MaintenanceDocumentRuleBase() { priorErrorPath = new ArrayList(); // Pseudo-inject some services. // // This approach is being used to make it simpler to convert the Rule classes // to spring-managed with these services injected by Spring at some later date. // When this happens, just remove these calls to the setters with // SpringServiceLocator, and configure the bean defs for spring. try { this.setPersistenceStructureService(KNSServiceLocator.getPersistenceStructureService()); this.setDdService(KRADServiceLocatorWeb.getDataDictionaryService()); this.setBusinessObjectMetaDataService(KNSServiceLocator.getBusinessObjectMetaDataService()); this.setBoService(KNSServiceLocator.getBusinessObjectService()); this.setBoDictionaryService(KNSServiceLocator.getBusinessObjectDictionaryService()); this.setDictionaryValidationService(super.getDictionaryValidationService()); this.setConfigService(CoreApiServiceLocator.getKualiConfigurationService()); this.setDocumentHelperService(KNSServiceLocator.getDocumentHelperService()); this.setMaintDocDictionaryService(KNSServiceLocator.getMaintenanceDocumentDictionaryService()); this.setWorkflowDocumentService(KRADServiceLocatorWeb.getWorkflowDocumentService()); this.setPersonService(KimApiServiceLocator.getPersonService()); this.setBusinessObjectAuthorizationService(KNSServiceLocator.getBusinessObjectAuthorizationService()); } catch (Exception ex) { // do nothing, avoid blowing up if called prior to spring initialization } }