cancel
Showing results for 
Search instead for 
Did you mean: 

question about message mapping

Former Member
0 Kudos

Hi,

When I use the visual mapping tool, I specify the condition that:

<SourceValue> equalsA 1, <TargetValue> value is 1; else it's 0.

However in the source XML, sometimes source XML is like:

<Root>

</Root>

where there's no SourceValue element. And now the mapping has exception. Then I try to use IsNil functionality, however then another exception saying "cannot cast '' to decimal" occurrred.

Is there a way for me to judge in the mapping so that I can pass through, e.g., when there's no this element, the target value is also 0.

Best regards,

-Stanley

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Just add one Node "mapWithDefault" --> Double click on it and pass value as "0"

So it will generate the node <TargetValue> == 0 whenever SourceValue will not be available

Thanks

swarup

Edited by: Swarup Sawant on Jul 23, 2008 8:19 AM

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi ,

Refer these blogs . It will help to u

Regards,

Suryanarayana

santhosh_kumarv
Active Contributor
0 Kudos

Hi,

First check if the node exist using the node function exists and then check your condition.

Thanks

SaNv...

Former Member
0 Kudos

hi

Use Condition Function , pass value if u get from the source or make other lement as constant 0 as u mentioned

rgds

srini