Skip to Content
0
Former Member
Jul 23, 2008 at 09:58 AM

Mapping issue - Bug in XI???

8 Views

Hi Friends,

I am mapping the below structures..

Source Structure ::

SouceGroup ( Occurance 1 to 1)

Name ( element)

Target Structure::

TargetGroup ( Occurance 1 to 1)

GroupLevel ( Occurance 0 to 20)

Level1 ( Occurance 1 to 1)

Counter ( element)

Level2 ( Occurance 1 to 1)

Counter ( element)

GroupLevel ( Occurance 0 to 20)

Level1 ( Occurance 1 to 1)

Counter ( element)

Level2 ( Occurance 1 to 1)

Counter ( element)

The Level2 group is under group Level1. each level contains the Counter element...I have duplicated the GroupLevel group in the target side..

In the target side TargetGroup,GroupLevel,Level1 and Level2 are all groups...

Mapping Details

================

1.For the first GroupLevel i am putting the condition as

NAME - equals in constant [ Venkatesh] -


createif -


GroupLevel

2.For the Second GroupLevel i am putting the condition as

NAME - equals in constant [ Anand] -


createif -


GroupLevel

3. I am using the UDF for creating the counter values...

constant [ KOUNT] ---> UDF -


> counter

same code for second counter also...in both levels Level1 and Level2 and under both first GroupLevel and Second first GroupLevel ...

This code for UDF is

-


Input value = a

Type of Function is VALUE

The code first time initialises the counter to 1 and next time increemnts it...

-


MappingTrace trace;

trace = container.getTrace();

int counter = 1;

GlobalContainer gc = container.getGlobalContainer();

if (gc.getParameter(a) != null) {

counter = Integer.parseInt(String.valueOf(gc.getParameter(a)));

counter = counter + 1;

}

gc.setParameter(a, String.valueOf(counter));

return String.valueOf(counter);

-


My problem is

Case 1: if the input data contains "Venkatesh" in the name ...

The gives the output as

Level1

Counter =1

Level2

Counter =2

Case 2: if the input data contains "Anand" in the name ...

The gives the output as

Level1

Counter =3

Level2

Counter =4

My question is why the counter value is 3 and 4 instead of 1 and 2.

I have checked the value in the node level of first GroupLevel for inout data "Anand" it is showing as SUPPRESS...

When i put the trace around the counter it shows that its incrementing the values to 1 and 2 for the elements whose node has the value SUPPRESS......

If the node level value is SUPPRESS then why its incrementing the counter , i mean why its executing the below code when node is not satisfying the condition....

Any Idea???

Let me know if you need any mode info on this.........

Regards

Venkatesh