on 02-13-2008 6:52 PM
Hi Guys,
Request Structure - Node - occurs 0 - unbound
Target Structure - Node - occurs 0 - unbound
If there are 3 transactions coming from the reguest structure then i need to generate only 2 node structures on the target side.
can anybody explain me how can i acheive this, any help would be appreciated
Thanks,
Srini
Srini,
You mean if you get n messages from the source, then u need to create n-1 messages in the target is it?
or
You always need to create only 2 messages in the target , even if u get 10 messages in th source!
Could you plz tell us which one u r looking for?
raj.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Raj,
I have acheived this with out UDF. I have used index function greater and a boolean function if then.
This index function counts the occurance of the node and if it is greater than 0 then only map to target.
Index function starts with 0 and increments by 1, so for the first occurance the value will be 0 and it is not greater than 0 and the first message will be skipped.
The logic is similar to UDF. Thanks for the suggestions
Thanks,
Srini
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Srini,
Let's consider the below example.
Source
<Root>
<Nodes>
<Field1>100</Field1>
<Field2>100</Field2>
</Nodes>
<Nodes>
<Field1>200</Field1>
<Field2>200</Field2>
</Nodes>
<Nodes>
<Field1>300</Field1>
<Field2>300</Field2>
</Nodes>
</Root>
Consider My source and target are same, I used ur logic for Nodes to Nodes, and mapped Field1 to Field1 & Field2 to Field2
Now u will get the result as
Target
<Root>
<Nodes>
<Field1>200</Field1>
<Field2>200</Field2>
</Nodes>
<Nodes>
<Field1>300</Field1>
<Field2>300</Field2>
</Nodes>
</Root>
Is the above target is ur reqmt? It will suppress the first set of transactions from the source, are u ok with it?
raj.
Hi Srini !
Depending on the complexity of the structures, you should be able to solve this using conditional functions in graphical mapping or using an advanced UDF (user defined functions) that receives the queue with all input values (a string array) and inside you put your logic in java (all within the graphical mapping screen) to decide which data goes out and which not or generate the output based on the input.
Regards,.
Matias.
ps: please award points if helpful.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
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.