Example code - EnterWorks_Process_Exchange_(EPX) - 10.6

EnterWorks EPX Programmers Reference

Product type
Software
Portfolio
Verify
Product family
EnterWorks
Product
Precisely EnterWorks > EnterWorks Process Exchange (EPX)
Version
10.6
Language
English
Product name
Precisely EnterWorks
Title
EnterWorks EPX Programmers Reference
First publish date
2007
Last updated
2023-07-28
Published on
2023-09-20T04:07:07.148709

public GroupVO createGroup() throws SecurityException,

UserException

{

GroupVO group = new GroupVO(); group.setName("UserGroupExample");

group.setDescription(getMessage("user.group.description"));

GroupUserVO groupUser = new GroupUserVO();

groupUser.setUserObject

(createSimpleUser("ssmith","Sam","Smith"));

group.addGroupUserOfGroup(groupUser);

groupUser = new GroupUserVO();

groupUser.setUserObject

(createSimpleUser("jdowning","Jane","Downing"));

group.addGroupUserOfGroup(groupUser);

groupUser = new GroupUserVO(); groupUser.setUserObject(createSimpleUser

("mjones","Mary","Jones"));

group.addGroupUserOfGroup(groupUser);

groupUser = new GroupUserVO();

groupUser.setUserObject(createSimpleUser

("tedwards","Tim","Edwards"));

group.addGroupUserOfGroup(groupUser);

return administrationFacade_.createGroup

(this.getSessionProfile(),group);

}

public UserVO createSimpleUser(String login, String firstName,

String lastName) throws SecurityException, UserException

{

// create a new user data value object

UserVO user = new UserVO();

user.setLogin(login);

user.setFirstName(firstName);

user.setLastName(lastName);

user.setDescription(getMessage("user.group.description"));

// default password to login name

String password = login;

String encryptedPassword =

CryptoHelper.encryptString(password);

user.setPswd(encryptedPassword);

// call the API to create the user

UserVO createdUser = administrationFacade_.createUser

(this.getSessionProfile(), user, password);

// now update

return createdUser;

}