091317_1042_TestingtheA1.png

How to only poll data on specific weekdays using the WCF-SQL adapter

There are a lot of solutions to this particular question. The need is that we only poll data from a database on Sundays. This might be solved using a stored procedure that only returns data on Sundays. It might also be solved by using the famous schedule task adapter to schedule the poll for Sundays. You can also do some cool coding thing using a custom pipeline component that rejects data on all other days but Sundays. Your scenario might be very well suited for one of these solutions, the scenario presented by my colleague Henrik Wallenberg did not fit any of those.

The scenario

A database is continuously updated thru out the week but we need the export data from a specific table every Sunday at 6pm. We cannot use the schedule task adapter nor stored procedures. We decided to try to trick BizTalk using the PolledDataAvailableStatement in the WCF-SQL adapter on a receive port. Turns out it works! Here is how.

Please note that this does not work if you cannot use ambient transactions.

According to this post, you must set Use Ambient Transaction = true if you need to us a polledDataAvailableStatement. This seems really odd to me but after receiving feedback about this article I know that it is true.

 

The solution

  1. Create the receive location and polling statement.
  2. Find the setting PolledDataAvailableStatement
  3. Set it to: SELECT CASE WHEN DATEPART(DW, GETDATE()) = 1 THEN 1 ELSE 0 END
  4. Set the polling interval to 3600 (once an hour).
  5. Apply your settings.
  6. Set the Service Window to only enable the receive location between 6pm and 6:30 pm.
  7. Now the receive location will only poll once a day and only execute the polling statement on Sundays.

More information

How does this work? It is very simple really. The property PolledDataAvailableStatement (more info here) needs to return a resultset (aka a SELECT). The top leftmost, first if you will, cell of this resultset must be a number. If a positive number is returned, then the pollingstatement will be executed, otherwise not. The SQL statement uses a SQL built-in function called DATEPART with a parameter value of “dw”, which returns “Day Of Week”. More information here. Day 1 is by default in SQL Server a Sunday, because Americans treat days and dates in a very awkward way. There might be some tweaking to your statement in order to make Sunday the 7th day of the week. So the statement SELECT CASE WHEN DATEPART(DW, GETDATE()) = 1 THEN ‘1’ ELSE ‘0’ END returns a 1 if it is day 1 (Sunday). This means that the pollingstatement will only be executed of Sundays. We then set the pollinginterval to only execute once an hour. This, together with the service window, will make sure the statement only executes once a day (at 6pm) as the receive location is not enabled the next hour (7pm). You could update the SQL statement to take the hour of the day into consideration as well but I think it is better to not even execute the statement.

The downside

This is not a very reliable solution though. What if the database was unavailable that one time during the week when data is transported? Then you have to either wait for next week or manually update the PolledDataAvailableStatement to return a 1, make sure the data is transported and then reset the PolledDataAvailableStatement again.

In conclusion

It is a very particular scenario in which this solution is viable and even then it needs to be checked every week. Perhaps you should consider another solution. Thanks to Henrik for making my idea a reality and testing it out. If you want to test it out for yourself, some resources to help you can be found here: InstallApp Script

091317_1042_TestingtheA1.png

Moving the BizTalk databases

This used to be a big issue at my old blog, but thanks to that, and also the wonderful documentation and content providers at Microsoft, the old article that was criticized has been updated. They got the number of steps down and there is clarity about the whole 32 vs 64 bit issue. More on that later.

Preparations

Before you begin you have get a couple of things done. Get a person who knows SQL server and has access rights to everything you need on both machines. On an enterprise level this is usually not the BizTalk admins, nor the BizTalk developers. The person needs to be SQL Server Sysadmin. Plan the outage! In our case we were lucky enough to get a full week between two testing stints. Set aside a day in which the platform is completely out. Plan the backups! Let’s say you get what I got: The backups run once a day at 3am. Therefore nothing may enter or leave the platform after 3am. You need that backup to be 100% compatible with a fallback (retreat?) scenario. More info on backing up your databases can be found here. If you are using BAM there might be activities that starts before the database move and they need to be completed manually. There is a script for that. Get a txtfile and paste the names of the source and destination servers and everything else you might find useful. Read thru the article by Microsoft just to see what you are expected to do, and what you might need to ignore.

Custom stuff

Are there any custom databases or custom components that might be affected by the database move? If you have custom databases, you might want to move them as well and if you have custom components for posting to BAM or some added functionality, make sure that they do not use hard coded connection strings or simply update anything pointing to the old database server.

32 vs 64 bit how?

Imagine you are on a 64-bit machine. It should not be hard to do if you have any contact with BizTalk. If you run the cmd-tool by using Run+”cmd”, you get the 64 bit version BUT its path points to the “System32” folder. To make things even more confusing, the 32 bit version of the cmd tool is in the SysWOW64 folder. Many people like me just assumed that the message “make sure you use the 64-bit version” was to run the one in the SysWOW64 folder. Which was wrong, which caused all sorts of issues, which prompted me to write the original post. That is now resolved. So make sure you are using the correct version. If you by any chance are running BizTalk on a 32-bit machine, you do not need to move the databases. You need to upgrade my friend! The article by Microsoft is now 99% there and you really should follow that one to the letter except for a two things.

Wrong config if you use EDI

If you plan to move the EDI-functionality you need to add a node to the SampleUpdateInfo.xml file. You are supposed to add the following to the “other databases” node.

<Database Name="MsEDIAS2" oldDBName="old dta db name" oldDBServer="old dta server" newDBName="new dta db name" newDBServer="new dta server" />

The thing is that this will not work with the scrip for updating the registry. Open the file UpdateRegistry.vbs and go to line 131. It says to look for an attribute called EDI. If it finds this attribute, the EDI settings will be updated. However as the guide says you should update your SampleUpdateInfo.xml to include an attribute called MsEDIAS2. Update the line in the script to:

set node = configObj.selectSingleNode("/UpdateConfiguration/OtherDatabases/Database[@Name='MsEDIAS2']")

Update SQL server scripts by hand

It is simple to move the BizTalk SQL Server jobs but there are some addendums to the article.

  1. BizTalk Backup has a database server name in it.
  2. Operations_OperateOnInstances_OnMaster_BizTalkMsgBoxDb also has a server name in it.
  3. Rules_Database_Cleanup_BizTalkRuleEngineDb.sql run this when/if the Rule engine DB has been created on the new server.
  4. TrackedMessages_Copy_BizTalkMsgBoxDb.sql also has a server name in it.

BAM databases and other BAM components

If you are using BAM in your environment, good for you. Be sure to follow this article to the letter after moving the databases and running the scripts. Everything is there but I would just like to point out some things you need to have in mind.

  1. Do not forget to move the SSIS packages for BAM DM and BAM AN. It is simple and can be done using SQL server management studio.
  2. Do not forget that you might need to update all your BAM components, like if you are running the BAM portal.

Closing words

Remember: This is not really all that hard and if you practice you can move an entire production environment in under an hour.

091317_1042_TestingtheA1.png

Counting down to London

attending-badges[1] As everyone already knows, there is a very good event in London this April. 13-14th to be exact.

It will probably be one of those events to remember. A lot of people from the BizTalk product team will be attending and giving presentations. Probably some new things will be revealed.

More info on the event can be found here: http://www.biztalk360.com/Events/BizTalk-Summit-2015-London/

091317_1042_TestingtheA1.png

Flatfiles and repeating tag identidiers

This particular post might not be very “edgy” but rather something to get me going, as well as functioning as a personal “how the h*ll did I do that” for the future.

The problem

A client presented us with a rather standard flatfile. It was about 20 rows long, separated by the ever usual CR LF, and they contained tag identifiers.

The identifiers were numbered 10, 20, 30 and 40 and they could appear in any order, may or may not be present and the records were positional.

Seems easy, right? Well it took me some time and there are a couple of gotchas along the way so I thought I would share them.

The file

Here is a subsection of the file. Notice the repeating identifiers and the difference in length between identical tags.

10000000000004083006019800324E50000John Doe
2500000000000000433       Q00086Jane doe
3000000000000008448H00001Joe Doe
4000000000000008448H00001Hanna Montana
10000000000004083006019800324E50000

 

The solution

There were three issues that needed to be solved and, again I am not presenting anything new here;

  1. Tag identifiers in positional records.
  2. Repeating tag identifiers.
  3. The last column could be empty or not padded.

I started by adding a flat file schema, adding a root, and setting the “Child delimiter Type” to “Hexadecimal” and “Child Delimiter” to “0xD 0xA”, now for the interesting part.

Tag identifiers in positional records

Tag identifiers are simply put, just that: some kind of text at the start of a record that shows what kind of record it is. It is a very useful feature and is often used in mainframe scenarios.

The tag identifiers in the file above are the first two positions. So I added a new child record and set the property “Tag identifier” to “10”, and the “Structure” to “Positional”.

image

I then proceeded to add all the different columns based of the relative length and position.

Moving on I did the same for the other tag-types as well and ended up with a schema looking quite simple and straightforward.

 

image

This is when I ran into my first error: The tag is not removed from the row of data when it is used. So all the other positions was offset by two positions and the parser could not find any columns, or rather the rows were too long.

In order to make it work you have to offset the first field by the length of your tag identifier, or add a column at the front to handle the identifier. I opted for the first one and updated the property “Positional Offset” to “2” for the first field in every record.

Repeating identifiers

You may, or may not know this, but XML actually infer some kind of tag order when writing data defined from an XSD. That is why you get an error when you skip a tag that is not “MinOccurs: 0”.

imageSo how do you handle the fact that some records might repeat later in a file, like the one in question? The answer is to put all the “root children” in a Choice-node. So I right-clicked the “root” node and selected to add a “Choice Group”. I set the property “Max Occurs” to “Unbounded” for the choice node, as well as all the other child records. For those I also added “Min Occurs: 0”.

Lastly I added all the child nodes to the Choice Node and now the row types (tags) may be in any order and may occur zero or unbounded times.

The last column may be empty

One very popular way to export data from a mainframe is to make all the rows be of the same length. One very popular length is 80 characters. However, many exporters choose to end the rows when the data ends. So rather then putting in enough white space to reach a total length of 80, a CR LF is inserted and the row is ended.

imageYou might think that simply setting the tag to “Min Occurs: 0” might solve this but you, like I was, would be wrong. The concept is called “Early Termination” and once you know that it is easy.

In order to allow early termination, which is set to false by default, I had to enable it. The property was located at “Schema” level and is called “Allow Early Termination”. Once I set that to “True”, everything worked fine.

Note that if you do not set “Min Occurs: 0”, the tag will be created but set to null if the row terminates early.

Data: "…Mikael" = <NAME>Mikael</NAME>
 
Data: "…" = <NAME />

In conclusion

The fairly standard way of exporting data from a mainframe to a textfile, should from now  on not really be a problem.

By the way, the files can be found here: RepeatingTagsFF

091317_1042_TestingtheA1.png

Setting custom SOAP headers in the WCF adapter

While browsing for the answer to the question: “How do I add SOAP-headers to a message sent using the WCF-custom or WCF-basicHttp adapter?” I never really found a good, short answer. So I thought I’d give it a go.

Setting SOAP headers

I assume you know what SOAP-headers are and why you might use them. If not, then back to basics.

In my case the client needed BizTalk to send requests with the WS-addressing SOAP header called “To”. I needed to know the easiest way to do this and preferably using configuration and no orchestrations.

To the best of my knowledge, this is the simplest way to do it.

Using a pipeline

Use a pipeline component to promote this property: http://schemas.microsoft.com/BizTalk/2006/01/Adapters/WCF-properties#OutboundCustomHeaders.

My guess is that your local BizTalk-code hub already have a pipeline component to promote arbitrary values. If you do not, the code for promoting the property is here.

The only thing to remember is that the value of the property is a bit special. You can hard code the values of your headers, even using xml-formatting; no problem, but you have to surround the value with a <headers> tag.

<headers> 
<h:To xmlns:h="http://www.w3.org/2005/08/addressing">rcvAddr</h:To>
</headers>

This will result in the WCF adapter serializing a SOAP envelope with SOAP headers that contains the value you give between the <headers> tag.

Here is the result in my environment:

image

Using an orchestration

If you already have an orchestration, and want to side-step the age old rule about not mixing the process (orchestration) from the communication (a port), you can set the headers from code. A bit more information can be found here.

What you basically do is setting the property from an assignment shape, much like you would access a FILE.RecieveFileName.

outboundMessageInstance(WCF.OutboundCustomHeaders) = 
"<headers><add:To xmlns:add="http://www.w3.org/2005/08/addressing">rcvAddr</h:To></headers>"

A limitation

Note that this is a promoted message property. This means that you can assign a string with the maximum length of 255. If you need to set a more elaborate header you need to use a message inspector and write your own code. It is a bit tricky but not that hard. Perhaps I will write a post about that some day.

091317_1042_TestingtheA1.png

BizTalk and empty files

There are a lot of things I do not know about BizTalk. The list is getting shorter but here is something I found.

image I was trying to verify a flow within a known environment. Everything else seemed to work apart from this one flow. A technician submitted files to a directory and the file was picked up. However it did not show up on any tracking; neither the basic BizTalk tracking nor our BAM-implementation noticed the file.

The files was picked up and I verified that the file was picked up by BizTalk. I could not submit the file myself as I did not have access to the path.

After a while I remembered to check to log on the other BizTalk node in the cluster and then it became clear. A simple warning said: “The FILE receive adapter deleted the empty file “\\Server\Share\testfile.txt” without performing any processing.” I have to admit that I did not know that. It is actually a “know issue

What happens is that the file is picked up but as the technician just submitted files using the old Right-click + New the file is empty. BizTalk does not process empty streams as it were and the file is deleted without any trace in the tracking.

Here’s a tip

In some scenarios you might receive an empty file to start a flow within BizTalk. Perhaps some system is telling BizTalk “That data you’re so interested in is done”. Make sure that file contains some data. Perhaps just a repeat of the file name or the letter “M”.

091317_1042_TestingtheA1.png

Using the bitwise operator for subscriptions (part 2)

In part 1 I defined what the bitwise operator is and how you can use it in your .net code. Now, let us see how we can use the same functionality in BizTalk to route messages.

How to use  the bitwise operator in BizTalk

One of the great things about my job is that I get to move around a lot. Different customers has different uses for BizTalk and this leads to new ways to use it. This scenario is not unique, but was new to me anyway.

BizTalk receives a message and needs to route it to different receivers. The receivers will be assigned using some form of “lookup” based on the message type. Message type A must be sent to system 1, 2 and 4. Message type B must be sent to system 3 and 4, and so on.

As usual, the preferred solution makes no use of an orchestration, should be reconfigured without redeployment and adding a new receiver should be very easy and should only impact the current deployment in a minor way.

This is a good time to use the bitwise operator!

Setup in BizTalk

This is just a simple proof of concept and, as such not complete. Keep that in mind and please provide feedback if anything is missing.

Schema_thumb1The schema: The bitwise operator will solve the task. To use that, and also avoid using an orchestration, BizTalk has to be able to route messages based on a value in the file. In order to do that, a promoted property is used. In this case a field called “ReceiverField”.

It is important to remember that in this particular case, the promoted property must be an unsignedInt. This makes sense since you cannot use bitwise on a combination of positive and negative numbers. If you use Int, the operator will not show up in the administration console.

Receive port: Now set up the ports. First we need a receive location to pick up the incoming data. In this a simple file receive location is used, but there is nothing stopping you form using other protocols. The bitwise handling will still work. The important thing to remember is to use the xmlreceive pipeline (as opposed to the passthru).

Sendport for different systems: Now for the magic part. Add a sendport for each of the systems you need to send the information to. Make sure to configure filters to reflect the particular number you have assigned to that system.

FilterSendPort2_thumb

In the picture above, the filter is configured to send files received on the previously configured receive port and then the bitwise operator is used to look for the number two in the receiver field in the previously created schema.

Add another port for another system:

FilterSendPort_system3_thumb

The important thing to notice here is that there really is not any major difference. The only important difference is the number for the receiver field, which is not set to “4”.

Start all the ports create a testfile to be dropped in the receive folder. Set the value of the receiver field to “2”. Drop it in the receive folder. Only the send port marked with a “2” will pick it up.

Try again and change the value to “4”, only the second port marked with a “4” will pick it up. Lastly set the value to “6”, now both ports will pick it up!

The upsides

The most important gain is of course the routing but there are some other benefits as well. Firstly, you can put different format mapping for different systems in their respective ports. This is also true for pipelines, so if one of the systems is using custom formatting, that is not a problem.

Next, adding another system is simple as all you have to do is add another send port, and configure it to look for the next number (double the last).

The downsides

This logic cannot be used in orchestrations. You cannot use the bitwise operator as a part of an activation filter in the orchestration, sadly.

Another thing that might be a problem is the code, or handling, by which you assign the number in the “RecievierField”. If BizTalk is responsible for assigning this value, you have to make sure that adding another system is just as simple as adding another send port. Maybe you have a database that matches message types and assign the number. BizTalk can then simply use a database functiod in a map to look it up.

091317_1042_TestingtheA1.png

Using the bitwise operator for subscriptions (part 1)

Did you know that there is a “bitwise” operator that you can use when you define subscriptions in BizTalk? I surely did not! I just stumbled upon it an since I could not find any really good article on it I thought I would give it a try:

What is the Bitwise operator?

This is certainly best answered by others; like wikipedia or this guy, or Microsoft of course.

If you want the short, short version; it is a good way to let one number represent a combination of other numbers, so that you know if a particular number is present… well that did not explain a lot. Let me try a longer version.

What problem does bitwise solve?

Bitwise is often used with enums in .net and if you want to use bitwise on an enum you mark it with the [Flags] attribute. The bitwise operator is a single ampersand (&), not to be confused with another logical operator (&&).

Imagine you are designing role based access management in a web application. You decide to have three different kinds of users (or roles); standard user, project managers and administrators.
The standard user has access to information about his/her current projects. The project manager can add/remove users to projects, and lastly the administrator can add projects and users.

When a web page is accessed, the user membership is checked and the information (perhaps in tabs) is displayed to the user depending on the user’s role.

How would you solve the fact that there might be users that are both standard users and project managers (depending on project)? Or, how about a user being administrator, project manager and standard user? How do you assign one number that combines different roles and give the user a particular access number?

Of course there are a lot of ways to do this but that does not prove my point, so I will assume that the way to do it is using [Flags] enum and the bitwise operator.

The enum values

To make this work you have to assign values to your enum in a specific way: The value of the enum is double that of the last value in the series, except for the second one, which is the number one.

enum MyRoles : uint
 {
   Anon = 0,
   StdUsr = 1,
   ProjectMgr = 2,
   Admin = 4
 }

So, a standard user has an access number of 1 and a project manager has the number 2. A user that is both a standard user and a project manager; the user gets an access number of 3 (1+2 = 3). This number is unique in the series and this will hold true for all combinations, even if you would have hundreds of roles.

Based on this logic, there is an easy way to find out if a user is in a particular role by using the &-operator. If you want to know if the user is a project manager, the code is simple:

if ((MyUser.AccessNumber &
      MyRoles.ProjectMgr) == MyRoles.ProjectMgr)

If the the expression returns true, the user is a project manager.

To be clear; there is a much simpler way of defining the same expression in .Net 4.0. Here; the bitwise operator is used under the covers.

if ( MyUser.AccessNumber.HasFlag(
     MyRoles.ProjectMgr))

In part 2 I will show you how to use Bitwise operations in BizTalk.

091317_1042_TestingtheA1.png

How to pass BizTalk certification (70-595)

As you may know, there is an MCTS-exam called 70-595, for us that work with BizTalk. The formal name is: “Developing Business Process and Integration Solutions by Using Microsoft BizTalk Server 2010”. Many seem to think that passing this test is hard and also a challenge, but if you do pass, it gives you a sense of pride and accomplishment. You have also received a sign of approval from Microsoft about your knowledge and abilities. If you are lucky, and work for the right employer, you might even receive a bonus for passing.

How do I book a test date?

clip_image001Firstly you need to find a Prometric-licensed test center. Microsoft works in collaboration with Prometric worldwide and they are responsible for making sure that everyone gets to take the test under the same conditions. They, in turn, certify locations (or test centers) all over the world. You need to find one of those. If I were you I would check the local education center that your company usually uses.

If you live in Sweden I can recommend AddSkills. You can book a date right from their site, and even send the invoice directly to your employer. The cost for taking the test varies, but at AddSkills the current rate is 1 950 SEK for the Gothenburg and Stockholm test centers. Others might be more expensive.

Is the test hard?

clip_image002Yes, it is hard. The point of the test to show that you are better than a beginner and that you also have some working experience with the product. I have heard different rumors about different Microsoft exams. Some seem to be easy-peasy, and others are hard as nails. This might be the case but I can tell you that the BizTalk is in the latter category rather than the former.

What is the process of the exam itself?

There used to be practice tests available, that closely mimicked the actual test’s process. I have not been able to find any tests for BizTalk 2010 but I will assume that, since they were available it is OK for me to write a bit about the process.

clip_image003Most importantly: No cheating! If you are caught cheating, you will be banned from taking further tests and the community will shun you. You will be forced to live out in the forest with only the birds and the voices in your head to keep you company. So please don’t cheat.

You will be placed in front of a computer configured to conform to some sort of minimum standard. You are only allowed to use the tools that the computer supplies and also a scratch-pad, provided by the test center. You are not allowed to bring anything but yourself into the test room. To further reduce the risk of cheating the testing room will be monitored via CCTV.

The test is entirely based on multiple choice. Some of the questions have answers in the form of RadioButtons (one correct answer), and others CheckBoxes (more than one might be correct).

There is a “mark for review” system. This means that you can mark a question for review, if you feel you might want to rethink that later. After you have answered all the questions you have an opportunity to view all the questions again. The ones you have marked for review is very clearly marked.

clip_image004The total time for the test is two and a half hours, which is ample time in my view. If you are worried that you might not be able to finish on time, you can use the review-system to mark questions you are not so sure about or you feel might take a long time to answer. Then run thru the test once and answer all the “easy” ones. This way you know that you will at least get those.

My method has been to take one question at a time and really focus on just that question. Read it, analyze it and try to get to the bare bone of the question. Give it the answer you feel is the best one and if you are unsure; mark it for review. Then drop that question and focus hard on the next one. I run thru the test in this manor until there are no more questions. By then, I am ready for a short break. After the break I review all the questions marked for review. This time, focusing even harder on the text and the different answers, as there might be pitfalls. Personally I don’t believe in reviewing all the questions, it’s just a waste of time.

clip_image005When you are done, you submit the test and after 10 agonizing seconds you will receive your score: pass or fail. If you pass, don’t forget to pick up your test result sheet from the test center. This paper will tell you your score and how well you performed in the different categories (see below).

In case of success, don’t forget to celebrate and treat yourself to something as a reward for all that hard work.

What do I need to study?

That actually has an official answer from Microsoft located here. I heartily recommend reading that article thoroughly and several times. Note that they have used the wording “including but not limited to”, so even if the list of things to know might be long, it might not be complete.

Here it is, together with the relative percentage of that subject compared to the whole exam.

  • Configuring and Architecture: 20 %
  • Developing BizTalk Artifacts: 20 %
  • Debugging and exception handling: 17 %
  • Integrating Web Services and WCF: 14 %
  • Implementing extended capabilities: 13 %
  • Deploying, tracking and supporting: 16 %

Something worth mentioning is that there is a lot of focus on Web Services and Wcf. It is about as important as developing BizTalk artifacts, which is pretty darn “core BizTalk”.

Something else worth noting is the point called “Implementing extended capabilities”. That is worth 13 % but includes RFID, EDI, BRE and BAM. It is safe to say that you might not have to know all the ins and outs of BAM or RFID to pass, but to dismiss them altogether is naïve.

My advice

The best advice I can give you about what to focus on when studying for the exam is this:

  1. Read the book Microsoft BizTalk Server 2010 (70-595) Certification Guide, by fellow blogger Johan Hedberg. 
  2. Read the article from Microsoft once more and note all the concepts listed under each category (like what core adapters are mentioned or that you must know how to configure basic tracking).
  3. Divide all the concepts into three categories:
    1. I have heard/not heard of this and have only a vague/no idea of how to use it (like RFID perhaps).
    2. I have a fairly good idea of how to use this but feel I might need to know more (like Role Links).
    3. I know this and feel I really don’t need to study for it (like configuring a FILE send port).

How do I study for the exam?

Purchase Johan Hedbergs book and read it. Know it by heart.

I also recommend this summary, found at Microsoft. It is made by the ever productive Steef-Jan and lists all the free available resources that Microsoft has put out.

I would also recommend the book Microsoft BizTalk Server 2010 Unleached. You should, of course, read the book from cover to cover but if you are more target oriented you can obviously skip the more extensive aspects about BRE, everything about Windows Azure and the short part about the ESB toolkit.

In closing…

I passed my test. Will you prove yourself? Just kidding! Have fun studying; you will learn a lot of useful things about our favorite product.

Also, please provide feedback if you disagree or feel I have said too much about anything. I am only trying to help, not violate the NDA.

091317_1042_TestingtheA1.png

Property: RootNode TypeName

I got a question through my e-mail today. The problem was that he hade to use 3rd party schemas (papiNet). These schemas contained a lot of words that BizTalk does not allow. Well rather it is the c# compiler that does not allow it. However:  the schemas would not compile and so he was stuck.

The question was, in short, how do you use reserved c# or BizTalk words in schemas? Words like “schema” or “Int”?

The answer is quite simple: Just select the node in question and take a look at the property list. There is a property called RootNode TypeName. This is the type name that will be used when the schema is compiled. Change it to something that will compile.

In the case, the node is called “int”. Since this will not compile, the RootNode TypeName is set to “SchemaTypeInt”.

image

In this way you can still be true to the original format and still use the schema in BizTalk. Also note that the TypeName will never be visible in BizTalk maps nor when you work with promoted properties or distinguised fields.

An important note though: You cannot solve the issue with reserved xpath words using this. If you have a schema that contains one of those words and you need to promote, or use the xpath-function in an orchestration, you need to map the external schema into an internal, compatible, one.