cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Hi,

I am facing some issue in PI mapping where I want to generate the nodes twice at target structure based on condition.

At source, API_RESPONSE can come once or multiple times. If ratetype is Daily then one EXCHANGE_LIST will be generated. If ratetype is monthly, we need both EXCHANGE_LISTs.

In mapping, I created duplicate sub tree and did mapping giving condition but while testing, I am not getting two EXCHANGE_LIST.

We need both Daily and Monthly data differently in both structures.  Please help.

Thanks,

Swapnashree

0 Likes
View Entire Topic
justin_santhanam
Active Contributor
0 Likes

Hi Swapna,

Try this.

Change the Context of @rate_type to API_RESPONSES and follow the below one:

@rate_type - UDF - EXCHRATE_LIST.

UDF:

Create UDF with type of Queue and import 1 parameter (name - input type-  string)

for (int i =0; i< input.length;i++)

{

if(input[i].equals("Monthly"))

{

     result.addValue("");

}

}

This will work.

Question for you - Based on the queue I can see there are 3 API_RESPONSE , there will only 1 Monthly and 2 Daily? But still you are creating only one EXCHRATE_LIST for daily?

Thanks!