Project: PhoneBook_ADsync_DeleteUser
The evaluation project calls this project when the employee exists in Active Directory but not in the phonebook application. The script accesses the account with script action Get user (AD), deletes the account and writes a line to the export log file.

Figure 26: Script PhoneBook_ADsync_DeleteUser
To access the account, the script action Get user (AD) uses variable %distinguishedName%. This variable is one of the attributes obtained with the LDAP search of the main project. The variable is passed as part of the for-each loop of the main project. The result of the script action is the user object stored in variable %UserObject%. The next action, Delete user (AD) uses this variable to delete the user account from Active Directory.
|