Rule:Example1: ${if (ServiceAccountOwnerMap.ServiceAccountType.equals('Service')) { 'CN='+task.accountName+',OU=Users,DC=dev,DC=abccompany,DC=com' } else if(ServiceAccountOwnerMap.ServiceAccountType.equals('Test')) { 'CN='+task.accountName+',OU=Users,DC=dev,DC=abccompany,DC=com' } else if(ServiceAccountOwnerMap.ServiceAccountType.equals('Support')) { 'CN='+task.accountName+',OU=Users,DC=dev,DC=abccompany,DC=com' } else if (user.middlename != null && user.middlename != '') { 'CN='+user.lastname+'\\, '+user.preferedFirstName+'\\ '+user.middlename+',OU=Accounts,DC=dev,DC=abccompany,DC=com'+'###'+'CN='+user.lastname+ '\\, '+user.preferedFirstName+'1\\ '+user.middlename+', OU=Accounts,DC=dev,DC=abccompany,DC=com'+'###'+'CN='+user.lastname+'\\, '+user.preferedFirstName+'2\\ '+user.middlename+',OU=Accounts,DC=dev,DC=abccompany,DC=com' } else { 'CN='+user.lastname+'\\, '+user.preferedFirstName+',OU=Accounts,DC=dev,DC=abccompany, DC=com'+'###'+'CN='+user.lastname+'\\, '+user.preferedFirstName+'1,OU=Accounts,DC=dev,DC=abccompany, DC=com'+'###'+'CN='+user.lastname+'\\, '+user.preferedFirstName+'2,OU=Accounts,DC=dev,DC=abccompany,DC=com' } }Example2: CN=${user.firstname} ${user.lastname},${ if(user.employeeType.equals('Full Time')) {'OU=Access Management,OU=Testing,OU=sales,DC=abccompany,DC=com'} else {if (user.customer.id==1) {'OU=Test1,OU=OutsideVendor,OU=Users,OU=sales,DC=sav,DC=com'} else {if (user.customer.id==2) {'OU=Test2,OU=OutsideVendor,OU=Users,OU=sales,DC=sav,DC=com'} else {if (user.customer.id==3) {'OU=Test3,OU=OutsideVendor,OU=Users,OU=sales,DC=sav,DC=com'} else {if (user.customer.id==4) {'OU=Test4,OU=OutsideVendor,OU=Users,OU=sales,DC=sav,DC=com'} else {if (user.customer.id==5) {'OU=Test5,OU=OutsideVendor,OU=Users,OU=sales,DC=sav,DC=com'} else {if (user.customer.id==6) {'OU=Test5,OU=OutsideVendor,OU=Users,OU=sales,DC=sav,DC=com'} else {'OU=OtherVendors,OU=OutsideVendor,OU=Users,OU=sales,DC=sav,DC=com'}}}}}}} }
Rule:Example1:${if (ServiceAccountOwnerMap.ServiceAccountType.equals('Service')) {'CN='+task.accountName+',OU=Users,DC=dev,DC=abccompany,DC=com' } elseif(ServiceAccountOwnerMap.ServiceAccountType.equals('Test')) {'CN='+task.accountName+',OU=Users,DC=dev,DC=abccompany,DC=com' } elseif(ServiceAccountOwnerMap.ServiceAccountType.equals('Support')) {'CN='+task.accountName+',OU=Users,DC=dev,DC=abccompany,DC=com' } else if(user.middlename != null && user.middlename != '') { 'CN='+user.lastname+'\\,'+user.preferedFirstName+'\\'+user.middlename+',OU=Accounts,DC=dev,DC=abccompany,DC=com'+'###'+'CN='+user.lastname+'\\, '+user.preferedFirstName+'1\\ '+user.middlename+',OU=Accounts,DC=dev,DC=abccompany,DC=com'+'###'+'CN='+user.lastname+'\\,'+user.preferedFirstName+'2\\'+user.middlename+',OU=Accounts,DC=dev,DC=abccompany,DC=com' }else { 'CN='+user.lastname+'\\,'+user.preferedFirstName+',OU=Accounts,DC=dev,DC=abccompany,DC=com'+'###'+'CN='+user.lastname+'\\,'+user.preferedFirstName+'1,OU=Accounts,DC=dev,DC=abccompany,DC=com'+'###'+'CN='+user.lastname+'\\,'+user.preferedFirstName+'2,OU=Accounts,DC=dev,DC=abccompany,DC=com'}}Example2:CN=${user.firstname} ${user.lastname},${ if(user.employeeType.equals('Full Time')){'OU=Access Management,OU=Testing,OU=sales,DC=abccompany,DC=com'}else {if (user.customer.id==1){'OU=Test1,OU=OutsideVendor,OU=Users,OU=sales,DC=sav,DC=com'}else {if (user.customer.id==2){'OU=Test2,OU=OutsideVendor,OU=Users,OU=sales,DC=sav,DC=com'}else {if (user.customer.id==3){'OU=Test3,OU=OutsideVendor,OU=Users,OU=sales,DC=sav,DC=com'}else {if (user.customer.id==4){'OU=Test4,OU=OutsideVendor,OU=Users,OU=sales,DC=sav,DC=com'}else {if (user.customer.id==5){'OU=Test5,OU=OutsideVendor,OU=Users,OU=sales,DC=sav,DC=com'}else {if (user.customer.id==6){'OU=Test5,OU=OutsideVendor,OU=Users,OU=sales,DC=sav,DC=com'}else{'OU=OtherVendors,OU=OutsideVendor,OU=Users,OU=sales,DC=sav,DC=com'}}}}}}}}