none
multiple receive ports in an orchestration RRS feed

  • Question

  • Hi everyone,

    I have a "simple" transport project with special requirements to implement.

    A system generates, within a batch, 3 types of documents, related all together.

    1) a data file (let's say FlatFile)
    2) potentially a secondary file (let's say PDF)
    3) a master file (FlatFile too) that lists all data files that are included in the batch

    I don't need to understand what I'm transporting (no parsing), and I don't need to check if all data files are referenced in the master file, the generating system ensures it.

    The destination application absolutely needs to receive 1 and 2 (in any order) BEFORE the master file, but the source first generates the master file and then data and doc files.

    I first tried to do it using an ordered sequential convoy  to get the master, transfer the other files 1 by 1, then send master(s), but as I have 3 different ports, the orchestration cannot be compiled. Then I came on some articles, e.g here or other posts in these forums, but I'm not able to find a good way to do it. I also found some similar cases that use parallel convoys, but in my situation I don't see how I could use it.

    Of course I could use an orchestration that only subscribe to master files, waiting 5' before sending them and simply route other files, but I'd rather avoid such a poor solution....

    Any help and/or advice would be fully appreciated.

    Thanks in advance
    Thomas
    Monday, November 15, 2010 9:28 AM

Answers

  • There could be a problem to provide files in right order considering the correlation comlexity of the PDF (or any other binary) files. It could be easier if it is possible to place each file type in separate folder, for example, and correlate files by the places (receive ports).

    Several adapters implement "ordered" protocols (as MSMQ), others are not (as FILE).

    If files are not big, you can create the service to push files in right order to the queue, for example.


    Leonid Ganeline [BizTalk MVP] Biztalkien blog
    Tuesday, November 16, 2010 3:12 AM
    Moderator
  • Usually you get compile errors because the correlation sets have not been initialized. The first one to execute should have Activate set to True, all the other ones should not. If you are relying on an external system it could be hard to coordinate the properties for a correlation set especially on a binary file like a PDF. So probably what you would need to do is split the logic into 3 orchestrations. To coordinate the files that should be processed you may need to log information about the files to a database and then in the last orcestration assemble the batch together using the data logged on the files.

    Thanks,


    If this answers your question, please use the "Answer" button to say so | Ben Cline
    Monday, November 15, 2010 11:05 PM
    Moderator
  • For what its worth, we did a custom receive pipeline component that was able to correlate messages (via a database call passing some attributes off the message) and placed a guid into context that our convoy subscribed on.  I can provide samples if you like. 
    Wednesday, November 17, 2010 12:07 PM

All replies

  • Usually you get compile errors because the correlation sets have not been initialized. The first one to execute should have Activate set to True, all the other ones should not. If you are relying on an external system it could be hard to coordinate the properties for a correlation set especially on a binary file like a PDF. So probably what you would need to do is split the logic into 3 orchestrations. To coordinate the files that should be processed you may need to log information about the files to a database and then in the last orcestration assemble the batch together using the data logged on the files.

    Thanks,


    If this answers your question, please use the "Answer" button to say so | Ben Cline
    Monday, November 15, 2010 11:05 PM
    Moderator
  • There could be a problem to provide files in right order considering the correlation comlexity of the PDF (or any other binary) files. It could be easier if it is possible to place each file type in separate folder, for example, and correlate files by the places (receive ports).

    Several adapters implement "ordered" protocols (as MSMQ), others are not (as FILE).

    If files are not big, you can create the service to push files in right order to the queue, for example.


    Leonid Ganeline [BizTalk MVP] Biztalkien blog
    Tuesday, November 16, 2010 3:12 AM
    Moderator
  • Hi,

    thanks for replying.

    Compile errors come from the fact that I tried to implement a sequential convoy to handle these 3 file types through 3 different ports, while Biztalk only accept one RP in convoys (<<in a sequential convoy the ports must be identical>>).

    As said, I don't need to understand what I'm transfering (only passthrough), and ordered transfer is only important when the master index is transfered, all "slave" data must be sent before the master.

    Now I'm working on another concept using custom property promotion to combine all messages together, then I'll consider the use of the MSMQ adapter that probably will help me reorder files.

    Thomas

    Wednesday, November 17, 2010 7:55 AM
  • For what its worth, we did a custom receive pipeline component that was able to correlate messages (via a database call passing some attributes off the message) and placed a guid into context that our convoy subscribed on.  I can provide samples if you like. 
    Wednesday, November 17, 2010 12:07 PM