Eric’s BizTalk 2004/2006 Blog

My BizTalk Experiences using Flat Files, InfoPath, BAM, BRE, BAS, HL7, HIPAA, WSS.

May 23, 2006

Flat File Line Splitting

Filed under: BizTalk — eric @ 6:34 pm

Here are instructions on how to have BizTalk split lines from a flat file into individual messages.

  1. Create a Flat File Schema and name the root node File (which is poorly named, it should be called Message) and make it post fix delimited with Carriage Return Line Feed (Hex 0×0d 0×0a) as the delimiter
    CRLF.JPG
  2. Create the line as a comma delimited record and add the elements in the line
    Comma.JPG
  3. Create the pipeline using the schema that was just created
    Pipeline.JPG
  4. Deploy the solution
  5. Set up the Ports as follows:
  6. Input Port: Name it, Create a recieve location using *.txt as the input pattern and the newly created pipeline
  7. Output Port: Name it, create the output path as %MessageID%.xml as the output pattern, on filters: Set BTS.ReceivePortName as what is created for the input port
  8. Start the Output Port
  9. Enable the recieve location
  10. Drop the sample file located in this sample solution

May 15, 2006

Sorry

Filed under: BizTalk, HL7 — eric @ 3:39 pm

My site was down for a few days, it seems that y’all love it so much, I exceeded my bandwidth for the month, so my hosting company locked it down.

I have upgraded my account so I can keep the site up.

I am not sure that you have seen this, but this is some cool information about MOM and HL7 that I just came across.

May 9, 2006

Custom HL7 Trigger Events

Filed under: BizTalk, HL7 — eric @ 1:01 am

I had forgot that a while ago, I had to create a custom HL7 message, and I saw a question on the forum asking how you can do it.

Here are the steps: (All modifications take place in both the MSH_24_GLO_DEF and the tablevalues.xsd). In this example I am creating a ZZZ^Z01 message;

  1. Edit Table76 and add the message type (add an enumeration) by editing the schema in a text editor:(in my case ZZZ)
    CustomTrigger1.JPG
  2. Edit Table3 to represent the trigger:(in my case Z01)
    CustomTrigger3.JPG
  3. Edit the Table354 that represents the Message_Trigger: (in my case ZZZ_Z01)
    CustomTrigger3.JPG
  4. Finally create your schema with the roon node that follows the following algorithm: Body schema type = TargetNS + “#” + MSH9.1 + MSH9.2 + MSH12.1 (with dots removed) + MSH12.2 (or GLO if the value is blank) + MSH12.3 (or DEF if the value is blank), and don’t forget to make sure that the target namespace of the schema matches what you have defined in the BTAHL7 Configuration Explorer
    CustomTrigger4.JPG

 

And finally, here is a sample.

May 4, 2006

MLLP Adapter behavior - pipeline component development

Filed under: BizTalk, HL7 — eric @ 7:47 pm

One little documented behavior of the MLLP adapter is that it is a streaming adapter. The implications are that if you are developing custom pipeline components, you need to make sure that you stay away from reading the Length of the Stream. What should be done is your pipeline component should read the stream completely before doing it’s ‘work.’ (Loop till Read method returns 0).

I have included this VB and this C# example to look at.

I want to thank support for this bit of info!

May 3, 2006

Fixed Length File with a variable component

Filed under: BizTalk — eric @ 6:26 pm

To extend the previous post, the following question was asked: How can the flat file parser consume a positional file when the end of each record might not be the length that is defined.

This actually is a very common occurrence, as I have had to deal with it, it mainly has to do with transfers from mainframes to windows based machines.

I deviated from the original file a little:
extrafield.JPG

 

I enabled Allow Early Termination:
EarlyTermination.JPG

And here is the sample.

May 2, 2006

… has incomplete content. List of possible elements expected… Flat File Schema traits

Filed under: BizTalk — eric @ 9:44 pm

I was helping Alberto on this flat file problem. I thought that I had created the flat file schema correctly to parse this correctly.
Sample File

However when I would validate the schema I was constantly getting the following message: “The element ‘OuterLoop’ has incomplete content. List of possible elements expected: ‘KLoop, ZRecord’.” This was the resulting xml output:
Sample File XML

However, I knew that the schema was set up correctly. I fiddled with it for quite a while, until I went to the Schema object and changed the Parse Optimization from Speed to Complexity.

It then parsed correctly and here is the result:
Sample File XML that is Correct

After seaching this is the closest definition I can find on the difference between Speed and Complexity:
“In speed mode, the parser tries to fit data as it appears in the stream. In complexity mode, the flat-file parsing engine uses both top-down and bottom-up parsing, and tries to fit data more accurately.”

Here is a sample file and the schema, try changing the parsing optimization setting and see the differences.