AnsweredAssumed Answered

Loop and Exit from a Map function

Question asked by ramateja.guruvelli on Oct 31, 2016
Latest reply on Nov 4, 2016 by 51662476

Hello,

 

Consider the following XML file,

 

<LDAPObject>
<sn><![CDATA[Boomi]]></sn>
<givenName><![CDATA[Test]]></givenName>
<objectGUID>5c28fa6c95e0cc47911252222a56136f</objectGUID>
<distinguishedName><![CDATA[CN=Test Boomi,OU=Multi,OU=Dealers,OU=External,DC=corp,DC=company,DC=com]]></distinguishedName>
<displayName><![CDATA[Boomi]]></displayName>
<cn><![CDATA[Test Boomi]]></cn>
<userPrincipalName><![CDATA[Test.Boomi@gmail.com]]></userPrincipalName>
<_memberOf>
<attr_memberOf>
<value><![CDATA[CN=gga_ALC_Apps_SBC_F1_PROD_RemoteDesktop,OU=Approval,OU=SBC,OU=Apps,OU=Groups,OU=company,DC=corp,DC=company,DC=com]]></value>
</attr_memberOf>
</_memberOf>
<sAMAccountName><![CDATA[Test.Boomi]]></sAMAccountName>
<modifyTimeStamp><![CDATA[20160929050713.0Z]]></modifyTimeStamp>
<userAccountControl><![CDATA[512]]></userAccountControl>
<_proxyaddresses>
<attr_proxyaddresses>
<value><![CDATA[x500:/o=EX2003/ou=First Administrative Group/cn=Recipients/cn=lucky]]></value>
</attr_proxyaddresses>
<attr_proxyaddresses>
<value><![CDATA[x500:/o=ExchangeLabs/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=b9d58ad90a5e8688797b539-Boomi Test]]></value>
</attr_proxyaddresses>
<attr_proxyaddresses>
<value><![CDATA[X400:C=BE;A= ;P=EX2003;O=Exchange;S=Soubry;G=Luc;]]></value>
</attr_proxyaddresses>
<attr_proxyaddresses>
<value><![CDATA[X500:/o=ExchangeLabs/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=3db3cf3b73e14eb5aad4dc53]]></value>
</attr_proxyaddresses>
<attr_proxyaddresses>
<value><![CDATA[smtp:test@acg.car.be]]></value>
</attr_proxyaddresses>
<attr_proxyaddresses>
<value><![CDATA[smtp:Test.Boomi@company.mail.onmicrosoft.com]]></value>
</attr_proxyaddresses>
<attr_proxyaddresses>
<value><![CDATA[smtp:info@acg.bike.be]]></value>
</attr_proxyaddresses>
<attr_proxyaddresses>
<value><![CDATA[SMTP:Test.Boomi@acg.car.be]]></value>
</attr_proxyaddresses>
</_proxyaddresses>
</LDAPObject>

 

Form the above input XML file "<attr_proxyaddresses>" is unbounded element and holds multiple values.

I need to check all the values in the "<attr_proxyaddresses>" element and need to send only value that contains "@acg.car.be" in the domain[Ex:test@acg.car.be]

If there are multiple values found with same Domain then we need to send only the first one we found.(We can ignore all the remaining values)

I tried to do this using a Map function in a MAP but unfortunately I couldn't make it 

 

Questions :

1) Can we loop a Map function until the desired value is found/determined and exit from the loop and skip the entire Map function for the rest of the records ?

2) Is there any alternate option for the above scenario where in the data can be looped and perform an exit after the desired record found ?

 

Thanks in Advance 

Outcomes