Project: PhoneBook_ADsync_CreateUser
The evaluation project calls this project when the employee exists in the phonebook application, but not in Active Directory. The script creates the account, sets the attribute employeeID and writes a line to the export log file.

Figure 24: Script PhoneBook_ADsync_CreateUser
The Create User script action uses input variables from the initialization project and the phonebook table (passed with the for each loop construction):
| Variable
|
Source
|
Description
|
%Domain%
|
Initialization project
|
Name of the domain
|
%OU%
|
Initialization project
|
Organization unit of new user account
|
%UserName%%
|
Action Create user (AD)
|
The value is generated automatically by the name generation algorithm as part of the Create User script action. The name generation algorithm uses the values of variable %FirstName%, %MiddleName% and %LastName% to do so.
|
%FullName%
|
Action Create user (AD)
|
The value is generated automatically by the name generation algorithm, part of the script action. The name generation algorithm uses the values of variable %FirstName%, %MiddleName% and %LastName% to do so.
|
%FirstName%
|
Phonebook database
|
First name of the employee as specified in the phonebook database. The value is passed as one of the parameters of the for-each loop.
|
%MiddleName%
|
Initialization project
|
An empty text value for all employees.
|
%LastName%
|
Phonebook database
|
Last name of the employee as specified in the phonebook database. The value is passed as one of the parameters of the for-each loop.
|
%Password%
|
Action Create user (AD)
|
The value of the variable is generated by the password generator.
|
%PhoneNumber%
|
Phonebook database
|
The telephone number is copied from the phonebook database application. The value is passed as one of the parameters of the for-each loop.
|
Table 8: The variables of script action Create user (AD)
The employeeID of the user account is set with script action Set attribute (AD).

Figure 25: Script action to set the attribute employeeID
This value of the attribute is copied from the phonebook database application with variable %AccountID%. The attribute uniquely identifies the user account with respect to the phonebook application. The value is passed as one of the parameters of the for-each loop.
|