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.148000

public UserVO createUser() throws SecurityException,

UserException

{

// create a new user data value object

UserVO user = new UserVO();

// set the name and login information for the user

user.setFirstName("Anthony");

user.setMiddleName("Joseph");

user.setLastName("Allman");

// note that user identifiers must be unique among

// all users

user.setLogin("tonyjoe");

// set the user's company and employee detail information

user.setBusinessTitle("Junior Executive");

user.setCompanyName("Systemz, Inc.");

user.setDepartment("Sales and Marketing");

user.setEmployeeNumber("10398");

// set the user's e-mail settings so that the user is

// notified of pending work via e-mail and that the user

// can change their own e-mail settings

user.setEmailNotifyInd(new Integer(1));

user.setEmailOverrideInd(new Integer(1));

// encrypt the password for the user

String password = "secret";

String encryptedPassword =

CryptoHelper.encryptString(password);

user.setPswd(encryptedPassword);

// add a contact phone number for the user

PhoneVO phone = new PhoneVO();

phone.setPhoneNumber("800.555.1212");

// set country code to US = 1

phone.setTerritoryId(new Integer(1));

user.addPhoneOfUser(phone);

// add an e-mail address for the user

EmailAddressVO email = new EmailAddressVO();

email.setEmailAddress("littlejoe@systemzinc.com");

user.addEmailAddressOfUser(email);

// add the business address for the user

AddressVO address = new AddressVO();

address.setStreet1("1000 Corporate Way");

address.setStreet2("Suite 500");

address.setCity("Anytown");

address.setState("VA");

address.setCountry("US");

user.addAddressOfUser(address);

// call the API to create the user

UserVO createdUser = administrationFacade_.createUser

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

// now update

return createdUser;

}

}