would you please describe me what's different between my adding users and adding users in jbpm-installer/task-service/src/org/jbpm/DemoTaskService.java ?
I add users with following commands:
|
| // Add users |
|
|
| List<com.liferay.portal.model.User> users = null; |
|
|
| try { |
|
|
|
| users = UserLocalServiceUtil.getUsers(0, 100000000); |
|
|
|
| } catch (SystemException e) { |
|
|
|
| e.printStackTrace(); |
|
|
|
| } |
|
|
|
| for ( com.liferay.portal.model.User user : users ) { |
|
|
| User jBPMUser = new User(String.valueOf(user.getUserId())); |
|
|
|
| taskSession.addUser( jBPMUser ); |
|
|
| } |
and in jbpm-installer/task-service/src/org/jbpm/DemoTaskService.java:
read users list from LoadUsers
.mvel
and add users like me:
Reader reader = new InputStreamReader(BaseTest.class.getResourceAsStream("LoadUsers.mvel"));
Map<String, User> users = (Map<String, User>) eval(reader, vars);
for (User user : users.values()) {
taskSession.addUser(user);
}
thanks