1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.ole.sys.service.impl;
17
18 import org.kuali.ole.select.document.service.OleSelectDocumentService;
19 import org.kuali.ole.sys.OLEConstants;
20 import org.kuali.ole.sys.context.SpringContext;
21 import org.kuali.rice.kew.api.exception.WorkflowException;
22 import org.kuali.rice.krad.UserSession;
23 import org.kuali.rice.krad.util.GlobalVariables;
24 import org.springframework.transaction.annotation.Transactional;
25
26 @Transactional
27 public class PostProcessorServiceImpl extends org.kuali.rice.krad.service.impl.PostProcessorServiceImpl {
28
29
30
31
32
33
34
35
36 private OleSelectDocumentService oleSelectDocumentService;
37
38 @Override
39 protected UserSession establishPostProcessorUserSession() throws WorkflowException {
40 if (GlobalVariables.getUserSession() == null) {
41 return new UserSession(getOleSelectDocumentService().getSelectParameterValue(OLEConstants.SYSTEM_USER));
42 } else {
43 return GlobalVariables.getUserSession();
44 }
45 }
46
47 public OleSelectDocumentService getOleSelectDocumentService() {
48 if(oleSelectDocumentService == null){
49 oleSelectDocumentService = SpringContext.getBean(OleSelectDocumentService.class);
50 }
51 return oleSelectDocumentService;
52 }
53
54 public void setOleSelectDocumentService(OleSelectDocumentService oleSelectDocumentService) {
55 this.oleSelectDocumentService = oleSelectDocumentService;
56 }
57 }