Skip to Content
avatar image
Former Member

Generating the node multiple times based on fieldvalue at source

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Feb 25, 2010 at 07:57 PM

    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);
    }
    

    Add comment
    10|10000 characters needed characters exceeded