1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.kew.responsibility;
17
18 import java.util.HashSet;
19 import java.util.Set;
20
21 import org.kuali.rice.kew.messaging.ParameterTranslator;
22 import org.kuali.rice.kew.service.KEWServiceLocator;
23 import org.kuali.rice.ksb.messaging.service.KSBXMLService;
24
25
26
27
28
29
30
31 public class ResponsibilityChangeProcessor implements KSBXMLService {
32
33
34
35
36
37
38 public void invoke(String message) throws Exception {
39 ParameterTranslator translator = new ParameterTranslator(message);
40 String[] parameters = translator.getParameters();
41
42 Set<Long> respIds = new HashSet<Long>();
43
44 for(String parameter: parameters){
45 respIds.add(new Long(parameter));
46 }
47
48 KEWServiceLocator.getActionRequestService().updateActionRequestsForResponsibilityChange(respIds);
49
50 }
51
52 public static String getResponsibilityChangeContents(Set<String> responsibilities){
53 ParameterTranslator translator = new ParameterTranslator();
54 for(String resp: responsibilities){
55 translator.addParameter(resp);
56 }
57 return translator.getUntranslatedString();
58 }
59
60
61 }