Eric’s BizTalk 2004/2006 Blog

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

June 27, 2006

MLLP Send Test Tool

Filed under: BizTalk, HL7 — eric @ 12:27 am

I am not sure if you are as lazy as I am, but I have really gotten tired of typing all of the command line parameters to test a file using the MLLP adapter.
I finally got off my lazy arse, and created a shortcut.
1. I went into the enviornment properties of My Computer and added the {path}HL7\SDK\Utilities\ to the Path, so I did not have to specify the path to the mllpsend.exe
2. I created a batch file (submit.cmd) that is simply two lines:
mllpsend /SB 11 /EB 28 /CR 13 /twoway /f %1
pause
3. I then went to Tool -> Folder Options -> File Types and found .TXT files and clicked on Advanced
4. Added an item called mllpsend and the application used to perform is “{path}\submit.cmd” “%1″

Now every time I right click a .txt file I have the ability to send it to the MLLP adapter.

Hope that this helps you as much as it does me!

June 13, 2006

BizTalk and DTC

Filed under: BizTalk — eric @ 7:07 am

When running non-atomic scoped database transactions across your network, getting schemas from the wizard does not seem to exploit this little known fact. You need to make sure that DTC is enabled on both the BizTalk machine(s) and the database you are connected to.

Objects to check for:

  • In Component Services (Administration Tools) right click My Computer, on the MSDTC tab, click on Security Configuration Tabl and Allow Inbound and Outbound Communication.
  • In Windows Components (Add/Remove Programs) click details of Application Server make sure that Enable network DTC access is checked.

 

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.

April 25, 2006

Multiple Input to BizTalk maps

Filed under: BizTalk — eric @ 11:43 pm

This also can work for multiple outputs to BizTalk Map also.

A recent post was asked how to take multipe messages and merge them into an output message structure. This actually puzzed me while I was learning the way BizTalk worked. Here is a simple example of how it works, and how to implement it…

  1. The first thing this orchestration does is start off by consuming a trigger message.
  2. It then constructs the calls to the two stored procedures
  3. Then it calls the stored procedures and gets the responses from the stored procedures.
  4. It then takes the two responses and invokes the map. Here is the picture of the input arguments to the map:
  5. This is what the map looks like after you create the map with the multiple inputs:
  6. It then creates the file an sends the resulting file out.
  7. Here is the complete view of the orchestration:

Setup Instructions:

  1. Extract this file
  2. In the Properties of the project point to a strong named key file and set the BizTalkMgmtDB to your server
  3. Run the included sql script against the Northwind database to create the stored procedures
  4. Deploy the project
  5. create 4 ports
    • One input using Default XML pipeline and pointing to ..\MultipleInput\Input directory
    • Two Static Solicit/Response ports pointing to the Nortwind database and setting the Document Target Namespace to be http://storedprocx/ (X being the number of the stored proc), setting default xml as both the Send and Receive pipelines
    • One send port, setting the default xml pipline and pointing to the ..\MultipleInput\Output directory
  6. Bind the logical ports to the physical ports created in step 5
  7. Start the orchestration, drop the trigger in the Input directory, and you are good to go 

April 20, 2006

Biztalk Macros

Filed under: BizTalk — eric @ 10:15 pm

I am tired of constantly having to look up what the macros are for BizTalk

Macro
Definition
%datetime%
Coordinated Universal Time (UTC) date time in the format YYYY-MM-DDThhmmss (for example, 1997-07-12T103508).
%datetime_bts2000%
UTC date time in the format YYYYMMDDhhmmsss, where sss means seconds and milliseconds (for example, 199707121035234 means 1997/07/12, 10:35:23 and 400 milliseconds).
%datetime.tz%
Local date time plus time zone from GMT in the format YYYY-MM-DDThhmmssTZD, (for example, 1997-07-12T103508+800).
%DestinationParty%
Name of the destination party. The value comes from the message context property BTS.DestinationParty.
%MessageID%
Globally unique identifier (GUID) of the message in BizTalk Server. The value comes directly from the message context property BTS.MessageID.
%SourceFileName%
Name of the file from where the File adapter read the message. The file name includes the extension and excludes the file path, for example, Sample.xml. When substituting this property, the File adapter extracts the file name from the absolute file path stored in the FILE.ReceivedFileName context property. If the context property does not have a value, for example, if a message was received on an adapter other than the File adapter, the macro will not be substituted and will remain in the file name as is (for example, C:\Drop\%SourceFileName%).
%SourceParty%
Name of the source party from which the File adapter received the message.
%SourcePartyQualifier%
Qualifier of the source party from which the File adapter received the message.
%time%
UTC time in the format hhmmss.
%time.tz%
Local time plus time zone from GMT in the format hhmmssTZD (for example, 124525+530).
« Previous PageNext Page »