none
Sorting and disassembling - BizTalk flat file RRS feed

  • Question

  • Hi All,

    I have a requirement where I have to sort the below flat file based on 3rd element and then diassemble it based on the same value of the 3rd element and then send to SAP.

    for eg : Original file

    1;abc; 123

    2; xyz ; 124

    3; qaz ; 123

    4 ; qwe ; 125

    5; plm ; 124

    This will get disassembled into 3 different messages as below

    Message 1 : 

     1;abc; 123

    3; qaz ; 123

    Message 2 :

    2; xyz ; 124

    5; plm ; 124

    Message 3:

    4 ; qwe ; 125

    And I want to loop these message in orchestration to send to SAP , A file to be sent to SAP for each message above

    Everything should be done in orchestration, any suggestion ?? -- I can sort it but not sure how to disassemble them.

    Thanks,

    Varun


    Thanks, Varun

    Tuesday, February 17, 2015 4:19 PM

Answers

  • I would approach this in two steps.

    Step 1 is a Map to group the records.  Here are some techniques:

    http://www.jenitennison.com/xslt/grouping/

    Step 2 is using the XmlDisassembler to Debatch the records.

    Once you get the grouping right, it's really a simple process so don't over think it.

    • Marked as answer by Angie Xu Wednesday, February 25, 2015 11:00 AM
    Tuesday, February 17, 2015 5:37 PM
    Moderator
  • It's just the regular XmlDisassembler.

    You have a couple of options.

    • One Orchestration where you apply the Grouping Map, then use the Orchestration Debatching Technique to debatch.  See here: https://msdn.microsoft.com/en-us/library/aa562035.aspx
    • A Loopback Send Port where you do the Grouping Map either in the first Receive or Send side of the Loopback Port, then debatch in the Receive Pipeline of the Loopback Port.  You can use the Loopback Adapter for this: Loopback Adapter (Disclaimer:  I maintain the Loopback Adapter.  It's completely free but no official support.)
    • Some other combination.  Any way you do it, you have apply the Map, then debatch.
    • Marked as answer by Angie Xu Wednesday, February 25, 2015 11:00 AM
    Tuesday, February 17, 2015 8:52 PM
    Moderator

All replies

  • I would approach this in two steps.

    Step 1 is a Map to group the records.  Here are some techniques:

    http://www.jenitennison.com/xslt/grouping/

    Step 2 is using the XmlDisassembler to Debatch the records.

    Once you get the grouping right, it's really a simple process so don't over think it.

    • Marked as answer by Angie Xu Wednesday, February 25, 2015 11:00 AM
    Tuesday, February 17, 2015 5:37 PM
    Moderator
  • Hi John,

    How Step 2 will work ? can you please elaborate 

    Thanks,

    Varun


    Thanks, Varun

    Tuesday, February 17, 2015 7:17 PM
  • It's just the regular XmlDisassembler.

    You have a couple of options.

    • One Orchestration where you apply the Grouping Map, then use the Orchestration Debatching Technique to debatch.  See here: https://msdn.microsoft.com/en-us/library/aa562035.aspx
    • A Loopback Send Port where you do the Grouping Map either in the first Receive or Send side of the Loopback Port, then debatch in the Receive Pipeline of the Loopback Port.  You can use the Loopback Adapter for this: Loopback Adapter (Disclaimer:  I maintain the Loopback Adapter.  It's completely free but no official support.)
    • Some other combination.  Any way you do it, you have apply the Map, then debatch.
    • Marked as answer by Angie Xu Wednesday, February 25, 2015 11:00 AM
    Tuesday, February 17, 2015 8:52 PM
    Moderator