Gorgo.Live.ToString()

Mariusz, Gorzoch tech Blog

Archive for the ‘BizTalk’ Category

DTC – New transaction cannot enlist in the specified transaction coordinator

leave a comment »

If you ever worked with DTC then for sure you get error message as shown above. The problem with it is that it is quite hard to track. Today I just want to share quick hint what to check and what is the most popular reason of that error. This most popular issue is DNS resolution. If DTC can not ping by NetBIOS name both machines taking part of transaction then he will return to you error as mentioned. So, before you start digging thru the net, please try just to ping both servers taking part of transaction by their names and check if returned IP is the some as the one you can find in ipconfig /all.

Here is some Microsoft paper around that : http://msdn.microsoft.com/en-us/library/aa561924(BTS.20).aspx

Advertisements

Written by Mariusz Gorzoch

13 December 2010 at 15:03

Posted in BizTalk

Tagged with

Splitting XML group record into separate record messages in BizTalk orchestration

leave a comment »

Sound like easy think, but guess what? It’s not as long you do not discover “Index functoids” on mapper toolbar. I’ve tried to implement that without this small control and believe me I get all kind of strange errors starting from : “Null message” found, “Message not fallow schema” or just simply parse error. Happily this kind of problem can be quite quickly solved thru index functoids.  Here you have link to official msdn definition of it : http://msdn.microsoft.com/en-us/library/ee253838(BTS.10).aspx .

In nut shell this control takes (at least) two parameters, where:

  1. First one is the source node in the record element
  2. Second parameter points record with you want to retrieve (please notice here that first record has index “1” and not “0”)

Bellow you can find example of sample map I was working on :

you can see on the picture above that each node from source message is connected to “Index functoids” as a first argument and “LoopIndex” (record index I want to retrive) as a second parameter.

Now, if we use this map on BizTalk orchestration, like the one bellow (ConstructCreateDetailsMessage <- use above map to extract record by record from source message):

then we get simple orchestration which split multi-record node in source message into separate messages for each record.

After this discovery I find out that, knowing those all functoids can save a lot of time, 😉

happy biztalking

Written by Mariusz Gorzoch

10 November 2010 at 08:54

Posted in BizTalk

BizTalk 2006R2 + Moss 2007 + InfoPath 2007 integration

with 3 comments

Today I found a task where I needed to create “error” InfoPath form on SharePoint, where this form will be created on the fly by BizTalk. On the beginning I just didn’t know where to start as I wasn’t sure if I should start by creation of InfoPath form, or maybe I should start by creating schema inside BizTalk and then base on that create InfoPath form. On the end I manage to do so, so have look here and find all necessary steps to achieve that.

1. Create your schema. This should be done on BizTalk, so go to Visual Studio and create new schema.

2. Go to InfoPath and start designing new form template based on schema you have created in visual studio

 

3. When you finish designing your template then you are publishing it to the destination form library. To do so you can use “Publish form template” wizard in InfoPath

4. Design your orchestration. This is the step where you are coming back to visual studio and creating orchestration, which in some point will emit document to SharePoint library. In my case I’ve created really simple one, where I just getting a message from message box, transforming it into destination schema (created in point 1), and…

…and here we are getting to really important point. Transforming input message into output SharePoint/InfoPath document is not only about converting input document into output. To make your document work properly you need to perform one additional step. So first, we are transforming out document to the output one, and then we need to adjust default namespace name used inside document created by BizTalk to be “ns0” instead of “ns1” (default one created by BizTalk). If you will not go for that, then you will not see promoted field on the SharePoint list. Here is some good post and solution for that (look into comments): http://seroter.wordpress.com/2007/10/25/problem-with-infopath-2007-and-sharepoint-namespace-handling/ 

To adjust namespaces you need to place new “Assign message” shape and fill it with (please notice that this block is already placed on the picture above under name “AdjustSharepointDocument”):

where,

  • WSSForm = System.Xml.XmlDocument
  • WSSNodeList = System.Xml.NodeList
  • WSSNode = System.Xml.Node
  • WSSForm_Internal <- InfoPath message created by transforming orchestration input message into our SharePoint message
  • WSSForm_ToSend <- InfoPath message which we are going to send to SharePoint site

Now, build, compile and deploy.

5. Set-up “Windows SharePoint service adapter” (WSS adapter). Go to BizTalk administration console, open your application and create new “Send port” based on “WSS adapter”

and configure it as fallow:

  • Destination Folder URL = “Name of you SharePoint library, where you published you InfoPath template”
  • FileName = “Name of the file BizTalk should use to create file name”
  • Overwrite = “Yes” (so BizTalk will overwrite file if it exists)
  • SharePoint Site URL = “URL of you SharePoint site”
  • Microsoft Office Integration = “Yes (InfoPath Form Library)
  • Templates Document Library = Destination Folder URL
  • Templates Namespace Column = “NameSpace”

When you do so, then go and bind this port to your orchestration.

If you did everything as described above then after your orchestration will get message your should get new file on SharePoint created based on the template created in point 2.

If you need Visual Studio project for that, then you can get it from here

Written by Mariusz Gorzoch

15 December 2009 at 11:53

Posted in BizTalk

BizTalk & SQL adapter

leave a comment »

If you want to go for playing with BizTalk Sql adapter and query data from external SQL server, which in addition is in diffrent domain/workgroup then you should have look at the list below, as this can save you quite a lot of time. To go for this setup you need to be aware of few teak-ups:
 
1. Make sure that you have installed all required components fot DTC:
 
 
that is you need :
– Enable network COM+ access
– Enable network DTC access
 
if you don’t have one of those components, then you will faild and believe me BizTalk will not tell you that you need them. So before you go for playing with remote SQL access make sure you have both of them installed on your BizTalk box and on the remote SQL server which you are trying to access
 
2. Security for DTC need to be on the same level
 

to get to this tab, you need to start "dcomcnfg", a then expand "Component Services"->"Computers"->"My computer" and right click on it and choise "properties". This will bring you "Properies" tab, where you need to hit "MSDTC" tab and click "Security configuration". When you get to the presented above screen you need to tweak-it up like the one shown above. Pay special attention to "No authentication required". This is the option witch will let you access DTC on remote SQL server, where you are not in the same domain, where SQL server is. Those setting need to be set in the same way in both machines, that is on BizTalk and on the SQL server you are trying to reach.

If you will not do both of those things you will probably end-up with error message : "New transaction cannot enlist in the specified transaction coordinator

That is all, I hope that I saved your time, 😉
 
links:
usefull tools for tracking DTC problems:

Written by Mariusz Gorzoch

24 July 2009 at 17:03

Posted in BizTalk