on 03-04-2009 9:06 AM
Hi,
We are doing an IDOC to SOAP scenario, in which we have multiple nodes in source structure. In destination structure we have one node having multiple occurences (1..99). We are trying to do the mapping in such a way that on the basis of no. of nodes at source side, nodes at destination side should be created.
Any idea how to perform this mapping? Is it necessary to use BPM for this?
1. Node 1 -> count ->
2. Node 2 -> count ->
3. Use ADD(std function) 1 and 2
4. then after step 3 use UDF given below and then mapp to target node
create advance UDF function and click on radio button "Queue".
in the imports section enter java.lang.;java.util.;java.lang.reflect.;java.io.;
//write your code here
String e = a[0];
int b = Integer.parseInt(e);
for(int i=0;i<b;i++)
{
result.addValue("1");
}
result.addContextChange();
This is working for me...
suppose node1 occurs 3 times and node2 occurs 2 times the target node will occur 3 + 2 = 5 times
Giving points is another way to say thanks
Edited by: Tarang Shah on Mar 4, 2009 2:06 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Using count function get the total count of nodes and then using a UDF create as many dummy valaues within one context as you get in the count ..for e.g. if you get total count as 6 for all of the source nodes ..in the udf create 6 diff dummy values in a single context and assign to target node
Giving points is another way to day thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Simply do one to one mapping for the multiple occurence node with the source repeating node as suggested above.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We are trying to do the mapping in such a way that on the basis of no. of nodes at source side, nodes at destination side should be created.
Simply may the multiple times occurring node at source to multiple times occurring node in target. And it will automatically give you the desired result. If the target side node is the root node then you need to use multimapping.
BPM is not required.
Regards,
Prateek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
>
> Hi,
> We are doing an IDOC to SOAP scenario, in which we have multiple nodes in source structure. In destination structure we have one node having multiple occurences (1..99). We are trying to do the mapping in such a way that on the basis of no. of nodes at source side, nodes at destination side should be created.
> Any idea how to perform this mapping? Is it necessary to use BPM for this?
Use the count function. Get the total count of nodes and then in a UDF pass a resultset with that number of counts.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.