Site navigation



User Management Resource Administrator: User Account Management for Windows 2003/XP/2000/NT

Previous Topic

Next Topic

Book Contents

Book Index

Project: PhoneBook_ADsync_Evaluate

The evaluation project processes a single account and initiates the execution of other scripts. For each account, the project input is a number of variables passed from the for-each loop of the main project. First, the evaluation project determines the synchronization action to execute: update – create – delete or nothing. Next, the project calls the appropriate project.

Script action: If-Then-Else – JoinResult=0

The variable %JoinResult% describes the result of the join table operation for each individual row. If the value is zero, the account is found in both the phonebook database and Active Directory. For such accounts, the project must compare the telephone numbers of the account for both systems.

IfThenElse JoinResult zero small

Figure 16: If-Then-Else action - JoinResult=0

If the telephone numbers correspond, no update action is required. If the numbers differ, the project must update the number in Active Directory. The project uses a single script action to determine if the value of the %JoinResult% variable equals zero and the telephone number correspond.

If-Then-Else condition and GOTO label small

Figure 17: If-Then-Else condition and Goto label

When both the value %JoinResult% is zero AND the variables %PhoneNumber% and %telephoneNumber% do not correspond, the script jumps to script action Update to call the project that updates the telephone number in Active Directory. In all other cases, the script continues with the next action.

The overall condition is shown in the next screenshot:

Two condition criteria with an AND construction - small

Figure 18: Two condition criteria with an AND construction

The first condition criterion checks if the variable %JoinResult% equals zero. The second criterion determines if the telephone number from both systems correspond.

Figure 19: Condition criterion specification

The result of the second criterion is inverted. So the result of the second criterion is true if the telephone numbers are not equal, e.g. differ.

Note: if the telephone numbers differ but the %JoinResult% variable does not equal zero, the overall condition is not true and the phone number is not updated. In this case, the user account was not found in one of the two systems and no update operation can take place.

Script action: If-Then-Else – JoinResult=1

If the value of variable %JoinResult% equals 1, the account is found in the first input table (phonebook) but not in the second (Active Directory). Hence, the user account does not exist in Active Directory and must be created.

Figure 20: If-Then-Else action - JoinResult=1

If the condition is met, the script continues with the action with label Create. In all other cases, the script continues with the next script action.

Script action: If-Then-Else – JoinResult=2

If the value of variable %JoinResult% equals 2, the account is not found in the first input table (phonebook) but it is found in the second (Active Directory). Hence, the user account does exist in Active Directory but not in the phonebook application and must be deleted from Active Directory.

Figure 21: If-Then-Else action - JoinResult=2

If the condition is met, the script continues with the action with label Delete. In all other cases, the script continues with the next script action.

Script action: Execute script - Synchronization actions

When none of the If-Then-Else script actions match, nothing needs to be done, the account exists in both systems and the telephone numbers of both systems correspond. In this case, the script continues with the script action with label Ready and terminates (script action: Go to label 'Ready'). So only if this point is reached the script now terminates. For all other cases, script execution continues with some labeled script action.

In case of an update action, the script PhoneBook_ADsync_UpdateUser is called.

Figure 22: Execute script PhoneBook_ADsync_UpdateUser

The script will update the telephone number in Active Directory. Next, the script terminates.

In case the user account must be created in Active Directory, e.g. %JoinResult%=1, the script PhoneBook_ADsync_CreateUser is called. Similar, if %JoinResult%=2, the script PhoneBook_ADsync_DeleteUser is called.

See Also

UMRA implementation

Project: PhoneBook_ADsync_Init

Project: PhoneBook_ADsync_Main

Project: PhoneBook_ADsync_UpdateUser

Project: PhoneBook_ADsync_CreateUser

Project: PhoneBook_ADsync_DeleteUser


Home | Products | Support | Pricing | Download | Press | About Us | Contact | Sitemap
QUICK LINKS: Mass / Bulk Import Software | Network Monitoring Software | Disk Quota Management
QUICK LINKS: User and Active Directory Management | Active Directory Migration | SSRPM Documentation