LDAP Queries from Get Object operator do not work in looped processes/subprocesses

book

Article ID: 5467

calendar_today

Updated On:

Products

CA Process Automation Base

Issue/Introduction

Using the Get Object LDAP Operator within a loop produces strange results.  Post-execution code looks contains the following line:

Process.mail = Process.Get_User_1.UserAccounts[i].mail; 

So I am writing the email address to a Process level variable called Process.mail.  But after this operator executes, the result set in my operators no longer shows the field "mail" but instead the field name is the last email address from the loop run, and the value is blank.  

Cause

This strange behavior occurs because the "mail" variable name is a reserved variable name and cannot be used in a new variable name.  

Environment

Release: ITPASA99000-4.3-Process Automation-Add On License for-CA Server Automation
Component:

Resolution

So changing the code to this will fix the problem:

Process.mailid = Process.Get_User_1.UserAccounts[i].mail; 

 

This is true for other variables from this operator as well.