on 08-12-2013 10:21 PM
I have question related to PI mapping.
Requirement: If there are n occurrences in source node, there should be n+1 occurrences on the target Node2 where the first occurrence is derived from other node field.
Source
<row1>
<Value>1</Value>
</row1>
<row1>
<Value>2</Value>
</row1>
<row1>
<Value>3</Value>
</row1>
To
<row>
<Value>A</Value>
</row>
<row>
<Value>1</Value>
</row>
<row>
<Value>2</Value>
</row>
<row>
<Value>3</Value>
</row>
How can achieve this? Hope I'm clear with my question.
Thanks in advance.
Hi,
Duplicate the target subtree in your message mapping and map the original tree with other node field of source and duplicated with the source structure. Duplicate only target subtree
For eg: In message mapping, map like this and check.
MT_Sender MT_Reciever
<other field strcture> ------------> <Row> 0.unbound
<other field> -----------> <value> 0 to 1
<Row1> 0..unbound ----------> <Row> 0.unbound
<Value> 0 to 1 ----------> <Value> 0 to 1
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your answers.
Muniyappan. - I"m not familiar with UDF so I want to try Sub tree first.
I Tried to add a sub tree, but during the save the sub tree is getting deleted. This is the message im getting during the SAVE ...
" The source structure, target structure, or a function library has been changed or could not be found in the Enterprise Services Repository. The mapping definition contains elements or attributes that do not exist in the changed structure, or functions that were changed in a function library. The relevant entries will be deleted. "
Hi,
>>One more thing is there way i can have duplicate sub tree above the original tree/node ?
No, it's not possible, but what u can do is u can change ur existing mapping order pertained to duplicated node and apparently once u do that then u have to redo ur original and duplicated node mapping.
Thanks
Amit Srivastava
1) create a mapping variable
map the variable with the value 0/1 like this
row1--> count --> Greater (Else=0)------>Variable
1---------------------->
2) in the flow editor of <row[0]>
Variable ---->Equeals --------------->IF--------> UDF--->Value
1-------------->
ELSE
row1-------------------------------->Value
the UDF should receive a 2 input values A(var1) and the queue of row1(var2).
in the logic you will add a new value for resultList
vector v = new Vector();
v.add(var1[0]);
for ( int i=0; i<var2.length; i++ ){
v.add(var2[i] );
}
for ( int j=0; j<v.size(); j++ ) {
String s = (String) v.get(j);
result.addValue(s);
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Right click on row node and use duplicate subtree option.
Thanks
Amit Srivastava
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
24 | |
11 | |
9 | |
7 | |
5 | |
5 | |
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.