cancel
Showing results for 
Search instead for 
Did you mean: 

Multi-map?

Former Member
0 Kudos

hi

i have the following type of scenario

source message:

<Messages> (1..1)

-<Message1> (1..1)

--<MT_XX> (0..unbounded)

-


<header> (1)

-


<field1>

-


<field2>

-


<field3>

-


<details> (0..unbounded)

-


<field4>

-


<field5>

target message:

<Messages> (1..1)

-<Message1> (1..1)

--<MT_YY> (0..unbounded)

-


<field1>

-


<field2>

-


<field4>

What i need is for each new iteration of the <details> node, a new message is created with the appropriate <details> fields as well as the <header> fields.

Is this possible using multi-mapping and the graphical message mapping tool, or should I use XSL instead? I have tried it, but all i get is one message with the fields from the first iteration of <details> only (using the test tool).

thanks in advance /dave

Accepted Solutions (1)

Accepted Solutions (1)

moorthy
Active Contributor
0 Kudos

HI,

Is your target structure is having only one node? just a question..

anyway you can do this using "useoneasmany" builtin functions in the graphical mapping.

Just have a look into this-

/people/claus.wallacher/blog/2006/04/17/replication-of-nodes-using-the-graphical-mapping-tool

/people/william.li/blog/2006/03/21/minimize-memory-usage-during-message-mapping-when-replicating-an-element

Regards,

Moorthy

Answers (5)

Answers (5)

Former Member
0 Kudos

thanks gentlemen, issue resolved thatnks to your help!! /dave

moorthy
Active Contributor
0 Kudos

Hi David,

Glad to know...)

Happy weekend..

Regards,

Moorthy

Former Member
0 Kudos

hi again Moorthy

my exact requirement are that i have a source message with several nodes/fields. On node is called 'DOWNHOLE' and is defined as 1..unbounded. For each occurence of DOWNHOLE i need an update to the jdbc database, still using fields from the other nodes which have an occurence of 0..1, or 1..1, depending on the node.

I agree that i do not need a multi-map and that i was incorrect to go down that path. I would have guessed that the node i need to repeat on the target would be UpdateRow, not Access...as the Key node may also change based on the contents of DOWNHOLE. To do this i believe your suggestion of using useOneAsMany is correct.

i will keep you posted, and thanks again for pointing me in the right direction. regards/dave

Former Member
0 Kudos

thankyou also for your interest Satish

a simplified version of my source message is:

<?xml version="1.0" encoding="UTF-8"?>

<ns0:MT_CWR_Well_MsgOut xmlns:ns0="http://huskyenergy.ca/cwr/well">

---<SYSTEMID>SBX</SYSTEMID>

---<USERID>PRICEDAV</USERID>

---<CORRELATIONID>

-


<SEQ>0001</SEQ>

-


<SLID>SL0001</SLID>

-


<BHID>BH0001</BHID>

-


<DHID>DH0001</DHID>

-


<INID>IN0001</INID>

-


<MSGTYPE>A</MSGTYPE>

-


<AGENCY>XYZ</AGENCY>

---</CORRELATIONID>

---<WELL>

-


<SURFACE>

-


<MANDT>100</MANDT>

-


<SLID>SL0001</SLID>

-


<SLLICOPERID>OP1</SLLICOPERID>

-


</SURFACE>

-


<DOWNHOLE>

-


<MANDT>100</MANDT>

-


<DHID>DH0001</DHID>

-


<DHZONEID>dhzone1</DHZONEID>

-


<DHTARGETZONEID>dhtarg1</DHTARGETZONEID>

-


</DOWNHOLE>

-


<DOWNHOLE>

-


<MANDT>100</MANDT>

-


<DHID>DH0002</DHID>

-


<DHZONEID>dhzone2</DHZONEID>

-


<DHTARGETZONEID>dhtarg2</DHTARGETZONEID>

-


</DOWNHOLE>

-


<INTERVAL>

-


<MANDT>100</MANDT>

-


<INID>IN0001</INID>

-


</INTERVAL>

---</WELL>

</ns0:MT_CWR_Well_MsgOut>

Because there are 2 'downhole' nodes, i need 2 updates to the JDBC database...with elements from the other nodes being in each update as well.

As mentioned earlier, i am guessing that it is the UpdateRow node that would be repeated in the target message and that my going down the 'muti-map' path was incorrect.

thanks/dave

Former Member
0 Kudos

Thankyou Moorthy for the quick response, and the links you sent are certainly worth exploring and i will do so shortly. I attempted to simpify my question by using the example i used...in reality, the target message type is a call for a JDBC receiver, meaning that it is quite specific:

<?xml version="1.0" encoding="UTF-8"?>

<ns1:MT_CSE_Well_In xmlns:ns1="http://explorersoftware.com/cse/well">

--<UpdateRow>

---<WELL_LOAD_TABLE action="UPDATE_INSERT">

-


<access>

-


<SEQ>123</SEQ>

-


<SLID>SL0001</SLID>

-


<WELL_UWI>SLOCGROUP</WELL_UWI>

-


<DH_CWRKEY>DH0001-C</DH_CWRKEY>

-


<DH_AGENCYKEY>DHAK-C</DH_AGENCYKEY>

-


</access>

-


<key>

-


<SLID>SL0001</SLID>

-


<WELL_UWI>uwi1</WELL_UWI>

-


</key>

---</WELL_LOAD_TABLE>

--</UpdateRow>

The nodes starting with "DH" are the ones that are in a repeating 'detail' node in the source message.

The 'Messages' and 'Message1' nodes were added by XI when i made it a multi-map through the 'Messages' tab, and perhaps are not necessary as i think it is the 'UpdateRow' node that i need to repeat.

I will play around with the useOneAsMany function and let you know how it turns out.

/dave

moorthy
Active Contributor
0 Kudos

Hi David,

What is your exact requirement? DO you want to post multiple records into data base. If so, this multimap etc is not required. You just need to change the occurence of Access/statement in the Receiver JDBC data structure...and you need to map accoridngly..

Regards,

Moorthy

Former Member
0 Kudos

David

This is possible with the graphical message mapping itself. If you give both your source and target message types then some of one could help you out.

---Satish