| RE: [BizTalker] Mapping Question |
- From: CRANFORD, CHRIS
- Subject: RE: [BizTalker] Mapping Question
- Date: Fri, 29 Apr 2005 09:34:15 +1000
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
My original thought process was to do something like the following:
- Create Header Insert Message based on Original Input Message
- Calculate the total # of lines on the Original Message
- Set line index to 1.
- Loop each line in the Original Input Message and do a transformation
creating the Line Insert Message based on the line referenced by
the line index.
Is it possible and if so, how do I specify which line to be mapped in the map? I don't think orchestration variables are visible in the mapper and I'm not sure how to pass (if you can even) to the mapper that value.
Thanks
Chris
________________________________
From: biztalkerlist@xxxxxxxxxxxxxxxxxxxxxx on behalf of Sachin Kulkarni
Sent: Thu 4/28/2005 7:17 PM
To: BizTalker@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE: [BizTalker] Mapping Question
The easiest way would be to use the SQL Server Adapter for BizTalk
1. Create two stored procedures one for inserting Order Header and one for the Lines.
2. Use SQL Server Adapter wizard to generate schemas based on these stored procedures
3. create two maps (simple one-to-one field mapping) to transform your input messages into stored procedures input parameters
4. in your orchestration call header stored procedure first
5. in following step you can call Line insert stored proc. Adapter will fire multiple SP requests based on the number of lines in your input message,
depending on your referential integrity constraints you can perform step 4 to get an order ID which you can insert in step 5 along with line details as a foreign key. BizTalk allows you to transform two input messages into one output message (and of course vice versa)
-Sachin
________________________________
From: biztalkerlist@xxxxxxxxxxxxxxxxxxxxxx [mailto:biztalkerlist@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of CRANFORD, CHRIS
Sent: Friday, 29 April 2005 8:50 AM
To: biztalker@xxxxxxxxxxxxxxxxxxxxxx
Subject: [BizTalker] Mapping Question
I am trying to develop an orchestration that will take an input XML document in the following form:
<Order>
<Header>
<Number>1234</Number>
<OrderDate>04/31/2005</OrderDate>
<TotalCost>25.00</TotalCost>
</Header>
<Lines>
<Line>
<Item>00003948432</Item>
<Qty>5</Qty>
<Cost>17.25</Cost>
</Line>
<Line>
<Item>3948321</Item>
<Qty>1</Qty>
<Cost>7.75</Cost>
</Line>
</Lines>
</Order>
I need to split this incoming message so that I can insert 3 records into my database. The first record represents the order header and the other 2 represent each individual line. When the lines are inserted, I also need to include the order number so I can join the values back at a later point.
Can someone explain how I could do this within BizTalk 2004 via a map or orchestration process?
Thanks!
--
Confidential: This email is intended only for the person or entity to which it is addressed. The information contained in this email may be confidential and privileged. Any retransmission, review, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this email in error, please let us know by reply and destroy all copies of it. Thank you.
to unsubscribe to this list, please send a message back to the list with 'unsubscribe' as the subject. Powered by mailenable.com - List managed by http://www.readify.net to unsubscribe to this list, please send a message back to the list with 'unsubscribe' as the subject. Powered by mailenable.com - List managed by http://www.readify.net
to unsubscribe to this list, please send a message back to the list with 'unsubscribe' as the subject. Powered by mailenable.com - List managed by http://www.readify.net
<<winmail.dat>>
(Click here for more information on the biztalkers mailling list)
- Prev by Date: RE: [BizTalker] Mapping Question
- Next by Date: RE: [BizTalker] Mapping Question
- Previous by thread: RE: [BizTalker] Mapping Question
- Next by thread: RE: [BizTalker] Mapping Question
- Index(es):
