Using Context Accessor To read EDI file Header RRS feed

  • Question

  • Hi

    I am using the ContextAccessor Functoid to read the EDI file header(ISA segment).The issue I am facing is that it works for some file while for others it returns NULL values the only difference I saw the size of the file.For the small file it works fine.The EDI file format is EDI 5010_820 and using Biztalk 2009.


    Tuesday, July 12, 2011 3:11 PM

All replies

  • What are you trying to acheive and perhaps we can provide you other alternatives. I have found that the context functoid is a bit tricky and since then, I have abandoned it.
    Please Indicate "Mark as Answer" if this Post has Answered the Question
    Wednesday, July 13, 2011 12:01 PM
  • Thanks Carlos

    Actually I am trying to read the EDI file Header information e.g. ISA06,ISA07 to get Sender Information. To get these values we are using Context Accesor Functiods in BizTalk 2009 Mapping and X12_5010 Schema.

    Thanks for helping.


    Wednesday, July 13, 2011 2:54 PM
  • What I do is read those values in the orchestration. I personally rather use the orchestration because you have more control. If you are doing so, then the code is below. You can pull and push to the ISA and GS segments as you wish. Are you able to use the orchestration?

    transactionType = Incoming_837I(EDI.GS08);

    Where Incoming_837I is the inbound message. If you are writing to those segments, then the code changes a bit.

    Outgoing_837I(EdiOverride.GS08) = "004010X096A1";

    Where Outgoing_837I is the output message.


    Please Indicate "Mark as Answer" if this Post has Answered the Question
    Wednesday, July 13, 2011 8:27 PM
  • Hi Carlos

    While trying to get value in the orchestration I am getting exception "Inner exception: There is no value associated with the property 'EDI.ISA06' in the message."

    StoreFileHeader820Request.SENDERID = Receive820Message(EDI.ISA06);

    Thanks for your Time and Help!



    Wednesday, July 13, 2011 9:44 PM
  • Dude, Use the MessageEnrichment, I use it to process 100k+claim files, works like a charm!

    Thursday, July 14, 2011 4:26 PM
  • Do this. Write the value to the log and see what you are getting. Also make sure your Store.... variable is a string.

    System.Diagnostics.EventLog.WriteEntry("ISA06", Receive820Message(EDI.ISA06);

    Please Indicate "Mark as Answer" if this Post has Answered the Question
    Thursday, July 14, 2011 8:49 PM
  • Thanks for your reponse.I am testing my 28MB file with MessageEnrichment code and getting Exception of type 'System.OutOfMemoryException'.

    any other option that I can try?



    Friday, July 15, 2011 5:26 PM
  • HI Harbir,

    For what purpose you are reading these values. can we do this in pipeline ? I would suggest to use pipeline to read, replace the ISA values. For a large file processing orchestration is not a suitable to do such stuff.


    Best Regards, Vishnu
    Saturday, July 16, 2011 6:28 AM