Tuesday, September 30, 2008

Hi all

Today i read an email from a guy who had a problem with optional elements in an input giving problems in a positional flat file output. The issue being, of course, that if an element in the input of a map is optional, it might be missing. If the element is missing, it will not be created in the destination of a map, and therefore, the flat file assembler will complain because it needs the element to create the correct positional structure.

I seem to have it working, and will here walk through my solution to explain it.

First of all, I have a Schema for the XML input:

All elements are 1..1 except Element2, which has minOccurs=0.

Secondly, I have a schema for the flat file output:

All elements are mandatory. The record delimiter is 0x0d 0x0a and the two subrecords to the root are positional records.

The map is pretty straight forward:

Just plain connections between the elements.

For testing purposes, I have two test instances, that validate against the input schema. They are exactly the same, except one doesn't have the "Element2"-element in it.

If I try to test the map with the input that has the "Element2"-element, and turn on validation of both input and output, and let the output be "Native", then it will work. If, however, I test the map inside Visual Studio .NET with the example that does not have the Element2 element, it will fail. It will report that:

Output validation error: The element 'FirstElements' has incomplete content. List of possible elements expected: 'Element6'.

So basically, the map does not create the Element6 element in the destination schema, and since the Element6 element is required, it fails validation.

BUT, here comes the surprise; It works if it is deployed. So basically, there must be some inconstency between how the map tester in VS.NET works and how the stuff works when running.

 

I tried changing the schemas to include an element inside the first record as the last element, such that the input has a "SomeElements" record with three elements inside it, of which only the second is optional. Likewise I added a new element in the output schema and updated the map. You can see all three here:

 

Still, I only get errors when testing inside Visual Studio .NET and not when things are deployed and running... Which actually bugs me a bit, but that is a whole other story.

So, to sum up, I only have three explanations as to why it works for me and not for the fellow with the issue:

  1. He is using a BizTalk version that is not BizTalk 2006 R2
  2. He hasn't tried deploying it, and is relying on the map tester
  3. He has some bogus values for the two properties I will mention below

At the end of this post, let me just quickly mention to properties that are available for flat file schemas:

The "Generate Empty Nodes" and "Suppress Empty Nodes" properties might be helpful. They are defined here: http://msdn.microsoft.com/en-us/library/aa559329.aspx

Hope this helps someone.

You can find my project here: FlatFileEmptyElements.zip (27.55 KB)

--
eliasen

Tuesday, September 30, 2008 1:01:20 AM (Romance Daylight Time, UTC+02:00)  #    Comments [3]  | 
Friday, September 5, 2008

Hi all

I have just been informed by my MVP Lead, that Patrick Tisseghem, a very excellent SharePoint guru and co-founder of U2U has passed away a couple of days ago.

I have had the pleasure of listening t Patrick talk only once, but he left an impression of a very knowledgeable and enthusiastic professional, as well as a great guy who is happy to meet people and talk to them about what ever is one his/their minds.

My thoughts go to his wife, his children and the rest of his family.

--
eliasen

Friday, September 5, 2008 9:04:06 PM (Romance Daylight Time, UTC+02:00)  #    Comments [0]  | 
Tuesday, September 2, 2008

Hi all

I am probably the 234'th blogger to write about this, but just in case...

Alan Smith has decided to maintain two bloggers guides for now... One is the commonly known Bloggers Guide to BizTalk. The new one is the Bloggers Guide to Oslo, which deals with the oslo related technologies, such as WCF and WF.

Alan has had the guide on gotdotnet earlier, but now he has created the http://bloggersguides.net/ site, which I highly recommend you monitor closely :-)

That's all, folks.

--
eliasen

Tuesday, September 2, 2008 10:44:04 PM (Romance Daylight Time, UTC+02:00)  #    Comments [0]  | 
Monday, September 1, 2008

Hi all

I am happy to announce, that a couple of great guys are planning to start a .NET User Group here in Aalborg, Denmark, where I am happy to live.

Information about the group can be found at their web site at http://www.aanug.dk/ - no information yet, though. It will appear soon, they promise :-)

Looking forward to seeing what it will be about. Hopefully, I can spread the word about BizTalk and learn more / tell about Oslo.

Anyway, if you are in the Aalborg area, consider emailing the guys and join the group. Lets get a good start!

--
eliasen

Monday, September 1, 2008 10:01:16 PM (Romance Daylight Time, UTC+02:00)  #    Comments [0]  | 
Sunday, August 17, 2008

Hi everyone

Yes, I know that my web page is in blue colours. Yes, I know my blog is in blue colours. Yes, I know my new BizTalk site is in blue colours. And yess, I know that my sons web page is in blue colours.

Yes, I like blue colours - quit whining! :-D

--
eliasen

Sunday, August 17, 2008 10:02:54 PM (Romance Daylight Time, UTC+02:00)  #    Comments [1]  | 

Hi everyone.

I often realize, that I need some information, but can't really remember what the thing was called or where to get it.

So I decided to keep track of all the BizTalk stuff I find on my way at http://biztalk.eliasen.dk - which is now officially launched :-)

Until now, not much information is there, but it will grow eventually.

Please, always also use the http://biztalk247.com website, since it really has a great collection of data... But feel free to use my new site, if you want :-)

Hope this is useful for someone...

--
eliasen

Sunday, August 17, 2008 9:41:21 PM (Romance Daylight Time, UTC+02:00)  #    Comments [0]  | 
Tuesday, July 1, 2008

Hi everyone!

A couple of hours ago, I received a mail from Microsoft stating, that I have been awarded the MVP title!

I cannot begin to describe, how happy I am with this, since I made it a personal goal of mine a couple of years ago, to get the title back. I had it from July 2004 to July 2005, as some of you know.

I have even danced a little bit in our living room with my hands above my head, I must confess :-)

I truly am happy to get the title back, since it means that Microsoft values my skills within the BizTalk field and that I must have helped a lot of people in the online communities.

To learn more about the MVP program, you can click here.

--
eliasen

Tuesday, July 1, 2008 10:03:41 PM (Romance Daylight Time, UTC+02:00)  #    Comments [1]  | 
Sunday, May 4, 2008

Hi everyone.

I have just upgraded the software on my blog to dasBlog version 1.9.7174.1.

I hope it has been smooth for you all, and if you notie any difficulties, please let me know.

Later, I will upgarde to dasBlog 2.0, which has been out forquite some time, but one step at the time, ight? :-)

--
eliasen

Sunday, May 4, 2008 9:24:39 PM (Romance Daylight Time, UTC+02:00)  #    Comments [0]  | 
Tuesday, March 18, 2008
Hi everyone

Well, after 7 months at thy:data it seemed clear to me, that thy:data wasn't the place I wanted to work. Luckily at the same time, my old employer WM-data, that has changed its name to Logica, was searching for someone exactly with my skills. So it didn't take long for us to reach an agreement, and therefore, on the 1'st April, I am starting at Logica.

I am really looking forward to this - I will be going back to all my old colleagues, and my assignments will vary much, going from presale, writing quotes and promoting Logica to Microsoft to actual design and development of large integration projects, based on BizTalk, .NET3.0 and stuff.

Just 2 weeks to go...

--
eliasen

Tuesday, March 18, 2008 9:00:31 PM (Romance Standard Time, UTC+01:00)  #    Comments [0]  | 
Sunday, February 24, 2008

Hi

Finally(!) I found time (Well, I should probably have done something else...) to review the design of my eliasen.dk homepage. It was awful, black and very much outdated.

The new design is better, updated, brighter, happier, implemented in .NET and much more :-)

If you have comments about it, feel free to send them to me.

--
eliasen

Sunday, February 24, 2008 2:58:32 AM (Romance Standard Time, UTC+01:00)  #    Comments [3]  | 

Theme design by Jelle Druyts