cancel
Showing results for 
Search instead for 
Did you mean: 

N:M mapping issue

Former Member
0 Kudos

Hello, can any1 please help me with following mapping issue?

Input Msg Type 1 (Items to be grouped)

-


Item (0..n)

X (0..1)

Y (0..1)

Z (0..1)

SegmentSub1 (0..n)

a (0..1)

b (0..1)

ChildSegmentWithChilds (0..n)

a (0..1)

b (0..1)

AnotherChildSegmentWithChilds (0..n)

a (0..1)

b (0..1)

SegmentSub2 (0..n)

a (0..1)

b (0..1)

Input Msg Type 2 (GroupingCodes)

-


Group (0..n)

Code (0..1)

Output Msg Type (Items Grouped by Group codes)

-


GroupedItems (0..n)

Items (0..n)

X (0..1)

Y (0..1)

Z (0..1)

SegmentSub1 (0..n)

a (0..1)

b (0..1)

ChildSegmentWithChilds (0..n)

a (0..1)

b (0..1)

AnotherChildSegmentWithChilds (0..n)

a (0..1)

b (0..1)

SegmentSub2 (0..n)

a (0..1)

b (0..1)

Mapping logic should be as following;

Item/X = Group/Code. (Items grouping by "X" field for each "Code" value)

any help greatly appreciated,

Thanks!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Here is a drawing for better explaining;

<br><br>

<img src="http://img14.imgspot.com/u/07/156/01/mappingissue4.JPG">

<br><br>

So there should be an output type for each group code.

Each output msg should contain N number of items grouped by group code.

For instance, if there are total 3 group codes input, output should be 3 list of items grouped by logic mentioned above.

justin_santhanam
Active Contributor
0 Kudos

Okan,

The logic Group by Item/X = Group/Code is not clear, can u please explain the logic.

Best regards,

raj.

Former Member
0 Kudos

Hi Raj, yes, thanks for your response.

I mean that for each "Code" field value in second input type, there should be one output, which is a list of Items (from first input type), with those items that match to this group code. The field "X" (from first input -item-) should be compared to this "Code" field (from second input -group) for determining which group of items the item belongs to.

For instance;

Item A

x = 1

Item B

x = 1

Item C

x = 2

Item D

x = 2

Item E

x = 2

Group

Code= 1

Group

Code = 2

so the output should be as following;

GroupedItems

ItemA

ItemB

GroupedItems

ItemC

ItemD

ItemE

is it more clear now?

Former Member
0 Kudos

Hi Okan,

you need BPM for this scenario if your XI SP level is less than SP19........in msg mapping, take Code field, then use removeContexts, then compare it with a blank constant [] using equalS function, take its output to createIf function, take its output to SplitByValue function, take its output to GroupedItems........then for each code field, you will get a GroupedItem list..........then map your remaining fields.......

Thanks,

Rajeev Gupta

Former Member
0 Kudos

Hi Rajeev,

I actually did this using bpm, but it is not performance efficient to do it by bpm when there is a huge load of data volume. (Loops by block -for each-, for grouping, takes way too long, memory issues arise when there are lots of data to be processed)

Former Member
0 Kudos

any ideas folks?

justin_santhanam
Active Contributor
0 Kudos

Okan,

Did you got the solution for this mapping, I'm really sorry for the past one week I was trying to figure it out, finally today I got it, yahoo!!!! I think am bit slow <b>:-(</b>

If you got the solution already no probes, if you haven't kindly follow the below logic.

<b><i>Source & Target structure</i></b>

http://www.flickr.com/photos/8764045@N06/545133789/

<b><i>Mapping logic & UDF - Grouped Items</i></b>

http://www.flickr.com/photos/8764045@N06/545133791/

http://www.flickr.com/photos/8764045@N06/545133801/

<b><i>Mapping logic & UDF - Item</i></b>

http://www.flickr.com/photos/8764045@N06/545133807/

http://www.flickr.com/photos/8764045@N06/545133811/

<b><i>Mapping logic & UDF - x node</i></b>

http://www.flickr.com/photos/8764045@N06/545138911/

http://www.flickr.com/photos/8764045@N06/545138913/

<b><i>Mapping logic & UDF - y node</i></b>

http://www.flickr.com/photos/8764045@N06/545138915/

http://www.flickr.com/photos/8764045@N06/545138917/

<b><i>Mapping logic & UDF - z node</i></b>

http://www.flickr.com/photos/8764045@N06/545138947/

http://www.flickr.com/photos/8764045@N06/545138951/

<b><i>Mapping - Results</i></b>

http://www.flickr.com/photos/8764045@N06/545005958/

I hope it helps you!!!!

Thanks for the patience.

Best regards,

raj.

justin_santhanam
Active Contributor
0 Kudos

Okan,

I have to thanks Laurence for the below thread, based on his question , I able to solve your problem.

Also , I'm thankful to my friend Rahul Nawale who gave me the idea.

Best regards,

raj.

Former Member
0 Kudos

Hi Raj, many thanks, points awarded. I appreciate your help, cheers!

justin_santhanam
Active Contributor
0 Kudos

Okan,

Have u implemented the same? Does it helps you, did u got the logic?

Best regards,

raj.

Answers (1)

Answers (1)

former_member214364
Active Contributor
0 Kudos

Hi Okan,

In source message X field is optional,it means we may not get it always.

suppose if we dont get X field in source message,under which group you want to put these items in target message.

Cheers,

Jag

Former Member
0 Kudos

Hi Jagadish,

If no value exist for "X" field, it can simply fail or that item may not be grouped into any items list.

Thanks for your response.