none
Capturing the Filename RRS feed

  • Question

  •  

    We are using BizTalk 2006 in my company, and I am very new at this system. I am designing a new inbound 837 Claim flow design. I will have a pipeline that will take the X12 837 and disassemble it to an XML formated file. Later a C# program will read that XML file for a specific claim number, and generate a flat file.

     

    Is there a way for me to capture the name of the XML file, as BizTalk creates it, and save the name in a parameter file? The C# program will use that parameter file to locate the correct file that has the particular claim in it.

     

    Basically, once BizTalk creates the file, how can I get the name?

     

    Thank you for your help.

    Brian

    Tuesday, October 14, 2008 5:28 PM

Answers

  • I assume your requirement is to rename the file with a unique name, on the fly and send it to the send port... If you are using an orchestration, you could do the following:

    1. Generate and set the unique file name in a variable

    2. In conctruct shape, construct the output message and set the the FILE.ReceivedFileName context property with the filename generated

    msgOutput(FILE.ReceivedFileName)=varFileName;

    3. In send port, instead of %MessageID%, use the macro %SourceFileName%, this will generate the file with the filename you have generated in the orchestration.

    Tuesday, October 21, 2008 6:29 AM

All replies

  • Hi Brian,

     

    You can do the following

     

    - Create a send port and configure it to use the FILE adapter.

    - In the FILE adapter properties there is a file name setting which you can set to the desired value.

    - Set the filter of the send port to an appropriate value so that it can subscribe to the xml message that was created for 837 document.

     

    Koushik

    Sunday, October 19, 2008 5:57 PM
  • Thanks for your response.

     

    My requirements for the filename is that the name must be unique. So I could use the %messageid% as part of the filename. My delema is , how do I capture the value of the filename, as it's being created, so that I can use it  in other places.

     

    My thought is to use a constant value to represent my trading partner and then add the ISA Control Number to make the filename. Now, my question is: How do I tell BizTalk to use that value when it names the file?

     

    I appreciate any and all feedback and direction.

     

    Brian

    Monday, October 20, 2008 7:19 PM
  • I assume your requirement is to rename the file with a unique name, on the fly and send it to the send port... If you are using an orchestration, you could do the following:

    1. Generate and set the unique file name in a variable

    2. In conctruct shape, construct the output message and set the the FILE.ReceivedFileName context property with the filename generated

    msgOutput(FILE.ReceivedFileName)=varFileName;

    3. In send port, instead of %MessageID%, use the macro %SourceFileName%, this will generate the file with the filename you have generated in the orchestration.

    Tuesday, October 21, 2008 6:29 AM