Hi Mahesh,
Mahesh Kumar wrote:
Getting array index out of bound exception. Attached data and udf
You have to take into account that context udfs will execute on a per context basis. Based on your example, Z1EKDP1 has only one context while ContactNo has two. This is what causes the array out of bounds exception. For this you have two solutions:
1. Use only one context. This can be done by inserting the remove context just after mapWithDefault
2. Use two contexts. This can be done by inserting a splitByValue on the Z1EKDP1 node.
Just maintain an equal number of contexts and you'll be fine.
Regards,
Mark