cancel
Showing results for 
Search instead for 
Did you mean: 

Error in Mapping":context value lost

Former Member
0 Kudos

<b>Mapping:</b>

RootNode (outgoing)

Headernode

Rootnodeofreord(1..1)

  • Recordnode(1..n)

*Itemnode(1..n)

-projectId

RootNode(incoming)

Headernode

*Recordnode(1..n)

  • Itemnode(1..n)

-projectDescp

<b>Mapping of projectdescp.</b>

if ItemNode count Greater then 4

Then Constant(see details) ==projectDescp

Else

ProjectId ==projectDescp

By this mapping it gave error:of value lost and projectDescp creation error.

So I added remove context after check Greater then 4.

Now there is no error but I am not getting req result.

<b>Input:</b>

RootNode

Headernode

Rootnodeofreord(1..1)

Recordnode(1..n) (count of item only three)

Itemnode(1..n) projectId (value 1)

Itemnode(1..n) projectId (value 2)

Itemnode(1..n) projectId (value 3)

Recordnode(1..n) (count of Itemnode more than4)

Itemnode(1..n) projectId

Itemnode(1..n) projectId

Itemnode(1..n) projectId

Itemnode(1..n) projectId

Itemnode(1..n) projectId

<b>Result:</b>

RootNode Headernode

Recordnode(1..n) (count of item only three)

Value at this level is wrong the projjdescp at 2 n 3 is wrong

It should have been 2 and 3 not (see details) as count of itemnode is only 3.why does 2 and 3 replaced by (seedetails).

Itemnode(1..n) projectDescp (value 1)

Itemnode(1..n) projectDescp (value see details )

Itemnode(1..n) projectDescp (value see details )

Recordnode(1..n) (count of Itemnode more than4)

Valus at this level is right as count of node is more than 4

Itemnode(1..n) projectDescp (value see details )

Itemnode(1..n) projectDescp (value see details )

Itemnode(1..n) projectDescp (value see details )

Itemnode(1..n)

projectDescp (value see details )

Itemnode(1..n) projectDescp (value see details )

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

What is the occurence of projectDescp?

Are all these fields under the node Headernode; or is there another level of hierarchy here?

Posting the correct hierarchy for the MT could make the query more clearer.

Instead of removecontexts, can you try assigning the context of ProjectId and Itemnode to Rootnodeofreord?

Looking at the queues in the message mapping editor, would give you more hints on where the problem is.

Regards,

Smitha.

Former Member
0 Kudos

ROOT

Headernode(1..1) and

Recordnode(1..n) is under root node

Itemnode(1..n) is under Recordnode

projectDescp(1..1) is under Itemnode.

assigning the context of ProjectId and Itemnode to Rootnodeofreord?

How to do that..could u let meknow..

Former Member
0 Kudos

Hi,

In your mapping editor, double click on the source node you want to map.

projectId in this case.

Once, the node appears in the box below, right click on it.

Select context->Rootnodeofreord.

One more way of debugging this is to check the queues.

When you right click on the node and select queue, you would be displayed the entered values, which would help you debug. (The values are taken from the values that you would have specified in the Test tab of the mapping editor.)

Regards,

Smitha.

Former Member
0 Kudos

I got the problem solved.

Used <b>useOneasMAny</b> and <b>splitByValue</b> in place of removecontext.

Thanks for your time and effort.

Answers (1)

Answers (1)

Former Member
0 Kudos

Used useOneAsMany and SplitbyValue inplace of removecontext.

It solved my problem.

useOneAsMany helped to divide the solution

into group based on context change.

SplitbyValue helped to put context for each value in the result.