cancel
Showing results for 
Search instead for 
Did you mean: 

Generating the node multiple times based on fieldvalue at source

Former Member
0 Kudos

Hi Experts,

my requirement is-

Source - Target-

<ABC>12,23,99</ABC> Node

I need to generate the target node as many times the number of values are coming in the source field.

like here - <ABC> contains 3 values the node will also be generated 3 times.

the source field will always come to the same context and it will come once only in the entire queue.

I have used the split function and taking the number of values in that returned array passing to the target node to generate the same. but it is not working.

Please help me in this .

Thanks

Sugata B

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

yuo need to write an udf like this.

source (change context Queue)---->UDF ---> Target

Variable : source and separator(",")


 String[] values = source.split(separator);

 for(int i = 1 ; i < values.length ; i++){
     result.addValue(values<i>);
    result.addValue(ResultList.CC);
}