none
Biztalk: To get a file, where the filename specified in a Input Schema

    Question

  • Hi all

    i am working with email error-notification along with attachement of file in Biztalk

    In this scenario, if the file not able to import in to the App, then Import error file genearated and saved in a folder along with the original file , which we tried to import  , like this error_file1 (error file)  , file_1(original file)

    this error_file1 conatins the details of the error and the filename of original file file_1

    we got successful in sending email notification with content of error_file1 as email body and attachement of error_file1

    but customer required as add on to include the file_1 also along with error_file1 as attachements in the email

    Please let me know if you have any suggestion on this

    Thanks,

     

     

     

     


    Thursday, July 14, 2011 8:52 AM

Answers

  • Yes as I have already mentioned because your requirement is just to send these files as attachments so you need to create message of type System.Xml.XmlDocument in your orchestration and use this message for receive shape. It will allow you to receive any type of message and

    because these messages can be correlated based on the name of the file so create a property schema and piepline component to promote the name of the file (without prefix 'error_' in case of error files).

     


    Mark As Answer or Vote As Helpful if My Reply Does, Regards, -Rohit
    Thursday, July 14, 2011 10:27 AM

All replies

  • You can try this suggestion:

    You can implement a sequential convoy. To create the correlation type you can create a property schema to promote FileName i.e. if the filename starts with prefix "error" (I assume that this prefix is fixed in your case) as in "error_file1" then it need to promote value "file1" and if the filename don't start without this prefix then just promote the name of the file e.g. "file1". You need to create a pipeline component to do this promotion.

    You can implement the logic in orchestration to create the mail message with multiple attachments by creating a multi-part message.

    Note: as any of the file can be received first (i.e. error_file1 or file1) and can initialize the correlation set you need to receive message of type System.Xml.XmlDocument in your orchestration.

    or you can put a sleep statement in you pipeline component code so that it can sleep for some time in case the file name don't start with the prefix "error" so that the file error file (i.e. the one start with prefix "error") should always get received first and can start the orchestration.

     


    Mark As Answer or Vote As Helpful if My Reply Does, Regards, -Rohit
    Thursday, July 14, 2011 9:26 AM
  •  

    Thank you for your suggestion, but this flow should handle several types of files

    actullay this is the flow from ERP to Ebiz, so it has so many message communications, like prices, orders, invoice , customer, Item etc

    all these messages had different structures

    but the Import error file for all the flows had a same structure

    and this Biztalk error notification application should handle Import error for all these messages

    Is it possible through a Sequential Convoy

    Thursday, July 14, 2011 10:10 AM
  • Yes as I have already mentioned because your requirement is just to send these files as attachments so you need to create message of type System.Xml.XmlDocument in your orchestration and use this message for receive shape. It will allow you to receive any type of message and

    because these messages can be correlated based on the name of the file so create a property schema and piepline component to promote the name of the file (without prefix 'error_' in case of error files).

     


    Mark As Answer or Vote As Helpful if My Reply Does, Regards, -Rohit
    Thursday, July 14, 2011 10:27 AM