on 10-19-2011 9:49 PM
Hi all,
I need to create a complex mapping as follows:
Source message:
CreateOrder (0..1)
-sell-order (0..1)
--items-sell-order (0..1)
---items-sell-request (0..unbounded)
-
sell-discount (0..1)
-
sell-discount (0..unbounded)
-
discount-id (0..1)
-
discount-quantity (0..1)
-
description (0..1)
Target message:
MT_xxxx
-ORDER_V3 (0..1)
--TDESC (0..1)
---item (0..unbounded)
-
ITEM_NUMBER (0..1)
-
discount (0..unbounded)
-
REASON (0..1)
-
VALUE (0..1)
-
DESCRIPTION (0..1)
--TPLUGIN (0..1)
---item (0..unbounded)
-
ITEM_NUMBER (0..1)
-
discount (0..unbounded)
-
ID (0..1)
-
QUANTITY (0..1)
The mapping has some rules:
If sell-order - items-sell-order - items-sell-request - sell-discount - sell-discount - discount-id .length > 0 then the structure TPLUGIN must be filled
else
the structure TDESC must be filled
The problem is: the field ITEM_NUMBER is an index that is unique and must increment each record of node items-sell-request, and it is not mandatory an item to have discounts.
When I test with n items and all items with discount node, it works perfect. However, if I put for example 10 items in the source array, and for example the records 5 and 6 doesn't have discounts, the association item x discount makes the mapping get lost and mess all the target nodes.
Could anyone help me?
Thanks in advance.
Ricardo.
I forgot to mention: we are running PI 7.1.
Tks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
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.