cancel
Showing results for 
Search instead for 
Did you mean: 

Graphical mapping qsn

Former Member
0 Kudos

Hi All,

I have a requirement in graphical mapping that i have a two nodes in source side both are identical. Each node has corresponding sub elements. Target side i have node with subelements. Based on certain conditions like if one condition satisfies i need to map first node and its corresponding sub elements in source side to target side node and its subelemts. If second condition satisfies then i need to map second node in source and its subelements to the target node and its sub elements. If both conditions not satisfy then target node should not be populated.

Please let me know how to acheive this in graphical mapping.

Thanks in advance.

Regards,

Rajesh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

otherwise go for udf which takes the input as your values and checks the condition in the udf and based on that value map the result to target node

string empty=;

if ( NODEAelement.equals("A"))

return A;

else if (NODEBelement.equals("B"))

return B

else

return empty;

I just provided the logic, you can procced with this...

HTH

Rajesh

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Check the condition using standard functions like equals or equalsA (if Value is Airthmetic). If returns true, map with source Node to Target Node using "IfWithoputElse" function. Attriibutes are mapped to normal one to one.

Hope it helps.

Regards

Vijaykumar

Former Member
0 Kudos

Select the target node that you want to generate conditionally in Message Mapping, rt click -> duplicate subtree. Now you have 2 identical nodes in your target xsd. Now conditionally map the first source node to the first target node and then conditionally map the second source node to the duplicated target node.

This way you can selectively generate target node, hope it helps.

Thanks

Saravana