mapping between 2 documents dynamically

I got an requirement where in i have 2 documents in pipeline. i have to read the mapping between these 2 documents from DB and map it dynamically at runtime. how can i do this? are there any services in WM?

Hi Bhanu,

Can you explain your requirement briefly. What do you mean by “i have to read the mapping between these 2 documents from DB and map it dynamically at runtime”

i have one document in pipeline in and one document in pipeline out. I have to do mapping between these 2 documents by reading the data from DB.

i am giving the doc format below. Doc1 is in pipeline in and Doc2 is in pipeline out.

Doc1 Doc2

Data TransData
–ReqNo --RequestNumber
–ReqLine --RequestLine
–WONumber --WorkOrderNumber
–TasKNo --TaskNumber
–UserName --UserName

i will read the doc elements from DB and have to map between these 2 documents at runtime.

For example, i have to map from Data/ReqNo on Doc1 to TransData/RequestNumber on Doc2.

Like this i have to complete all the mapping at runtime.
Hope you understood my question!!!

You can do this mapping from Data → TransData using a MAP step :smiley:

If the structure of the two docs are same do a document level mapping instead of field by field mapping.

Any questions?

I know about doing the mapping using map step.

i am talking about doing the mapping between these 2 documents at runtime.

i have the mapping stored in the DB with the source field of the document and the destination field of the target document.

From DB, i will get source field and target field (i.e.,) Data/ReqNo and TransData/RequestNumber.

Based on the values from DB, i will have to map Data/ReqNo to TransData/RequestNumber by reading the details from DB.

If I understand Bhanu right, the document structures are not the same as the fieldnames differ between them.

@Bhanu:
can you try to build an XSLT from the mapping you have read from the database?

If so, you can use this XSLT to transform the In-Doc into the Out-Doc.

Another option might be the usage of an XQL-Query-Service filled with the mapping read from the database.

(Just doing some brainstorming). :slight_smile:

The question for me is, what will be the benefit of having the mapping in the database and read it dynamically during runtime.

In my project we have only fixed mappings in flow-servies or predefined XSLT-mappings which are dynamically assigned during runtime depending on sender and receiver of the message.