Blogging BizTalk

Lets Discuss BizTalk

Is BizTalk server a T-Rex?


Before you press the panic button read this please..

Nino Crudele's Blog

Why do people start comparing BizTalk Server to a T-Rex?

Long time ago the Microsoft marketing team created this mousepad in occasion of the BizTalk 12th birthday.

 

And my dear friend Sandro produced the fantastic sticker below

 

Time later people start comparing BizTalk Server to a T-Rex, honestly, I don’t remember the exact reasons why but I like to provide my opinion about that.

Why a T-Rex?

In the last year, I engaged many missions in UK around BizTalk Server, assessments, mentoring, development, migration, optimization and more and I heard many theories about that, let go across some of them :

Because BizTalk is old, well, in that case I’d like to say mature which is a very good point for a product, since the 2004 version the product grew up until the 2013 R2 version and in these last 10 years the community build so…

View original post 1,058 more words

Find BizTalk Pipeline Component References


What if your BizTalk implementation has lot of pipeline components and custom pipeline used and at times the question might pop up: find where all a certain pipeline components has been referenced.

This might become more relevant if you are doing a deployment planning . One way is to go check the individual BizTalk solutions and find out where those have been referenced. There is a  high probability that something may be missed.
To overcome that we can use the BizTalk MdmtDb and query it to get the information on the go.
The table we need to refere in our query are
  • bts_component
  • bts_stage_config
  • bts_pipeline_stage
  • bts_pipeline_config
  • bts_Pipeline
Here is the query you will need to execute, you will be required to be the part of BizTalk operator group.
SELECT E.Name,E.FullyQualifiedName
FROM BizTalkMgmtDb.dbo.bts_component AS A,
BizTalkMgmtDb.dbo.bts_stage_config AS B,
BizTalkMgmtDb.dbo.bts_pipeline_stage AS C,
BizTalkMgmtDb.dbo.bts_pipeline_config AS D,
BizTalkMgmtDb.dbo.bts_Pipeline AS E
WHERE A.id=B.CompId
AND B.stageId=C.id
AND  C.id=D.StageId
AND D.PipeLineId=E.id
AND A.Name like  (‘%Your Component Name%’)
untitled

Decouple BizTalk Transformation logic From The BizTalk Solution.


Need a BizTalk solution which has no map and it still does the transformation, READ ON……

This article speaks of using an external XSLT file to achieve  transformation in BizTalk solution. You can visualize this as an equivalent of  BizTalk map which is only using a XSLT file for the transformation logic except you will not be required to use a actual BizTalk map with this approach. This also means no map or XSL file will be deployed. Advantage with this approach is- If there is a change in the transformation logic just modifying the XSLT placed on the file server location is enough. Which mean without any fresh deployment or change to your VS BizTalk solution you have achieved a new transformation logic in the BizTalk workflow.

 How do we do that:
 1>Modify the BTSNTSvc config file and add new appSetting keys for the physical path of XSLT file. This is path where you are going to keep the XSLT file(Or you can use any custom config approach for storing the values, for example SSO MMC).
ConfigChange
 COnfigManagerObject
1>Create a helper class which will return a XmlDocument after applying the XSLT on the input source xml message.
 TransformMethodWe will be  leveraging Transform method in our BizTalk helper class which Executes the transform using the input document specified by the XmlReader object and outputs the results to an XmlWriter. The XsltArgumentList provides additional run-time arguments.

public void Transform(XmlReader input, XsltArgumentList arguments, XmlWriter results);

TransformMethod
Now we can use an orchestration to call this method in a construct with MessageAssignment shape.
msgOP_Map = PKS_ExternalBizTalkTransformation.ApplyXSLT.ApplyXSLTToPayload(msgIpToMap, “YourXSLTFile.xsl”);
 Please let me know if you have any questions.
Note:For unit/local testing you will be required to use an app.config to define the XSL path since the BTSNTSvc app settings can be only accessed at BizTalk engine runtime .

Understanding Bussiness Rules Engine Via The Dynamic Endpoint Resolver Pattern


In this example I am going to demo how we can use Business rules engine in BizTalk to route messages dynamically.

Here is our scenario.

We receive a message having a node called PartyName.

Based on the value of PartyName the business rules policy named ‘ResolverRules’ will fetch the endpoint and adaptertype from from a SQL table named ‘RulesResolver’.This policy will be called from an orchestration which will use a dynamic send port based on the endpoint fetched by the rules.

Advantage: This will help us accomplish a decoupled messaging scenario. All we need to do is add the new PartyName and the corresponding endpoints, adapterUsed information in the SQL table and the orchestration dynamic send port will take care of the routing. Which essentially means a single send port can cater to multiple send end points.

DEMO:

STEP1: CREATING THE RULE

Create a DB and table in your SQL server. The table will have three columns for partyname adapter type and end point. Our orchestration will fetch all these information via the rules engine and assign it to the dynamic send port properties. Our table is going to look something like this.

DBTable

Open the Business Rules Composer.

Go to the facts explorer > Vocabularies tab> Select Vocabularies, right click and pick Add New Vocabularies.

Name your vocabulary as appropriate. Click on your newly created vocabulary and pick  Add new definition. We are going to define two definition one will fetch our endpoint and other will fetch the PartyName.

SetVocabulary

Once done right click on your vocabulary version and pick Publish. Without publishing the vocabulary we wont be able to use that in our rules policy. Also once the vocabulary is published it cannot be modified.If need arises we will have to publish a new version and use that instead.

VocabularyPublish

Now once vocabulary is ready we are going to create rules policy based on the DB facts and the XSD. To reference our xsd we will select the XML schemas tab and right click on schemas > Browse to our xsd file we have created in the BizTalk solution also holding our orchestration.

setxml

We are now ready to define our rules policy now. Click on policies and pick add new policy. Name it appropriately. After you are done configuring your policy the end result should look like this. The conditions we have defined has used the vocabularies we defined in the earlier step.

Please go ahead and deploy the policy.Without deploying the orchestration will not pick the rules.

policy

Now our Rules Policy is ready to be used.

STEP 2: CREATING THE ORCCHESTRATION TO CALL RULES.

Please create an orchestration looking ressembling following picture .

Orchestration

You will have to add System.data, System.transaction and Microsoft.RulesEngine reference  in the solution. Create three variable in the transaction scope of the call rule shape of the following types.

Microsoft.RuleEngine.DataConnection
System.Data.SqlClient.SqlConnection
System.Data.SqlClient.SqlTransaction

The expression shape in the orchestration are going to look like this.
orchexpressions

Use the call rule shape to point to our rules policy. Configure the input parameters, in this case two one message and other rules connection.

The last send port is dynamic and we will pass the port parameters in the last expression shape which in turn are derived from the message returned by rules policy. Notice the expression to assign the end point.

Now we can deploy this and our solution will be ready for testing.

Please leave me a comment if you have any questions.

Orchestration To Orchestration Call Via Direct Bound Ports For A Synchronous Process


This is a demo for calling one orchestration from another orchestration via direct bound port. Please note there is a strong binding between receiver and sender orchestrations hence if the receiver orchestration contracts or version changes at any point of time you will have to incorporate that in your sender orchestration as well.

Scenario: The main orchestration calls the sub orchestration and waits upon the reply to come back from sub orchestration to continue further.

Logic Behind: The main orchestration refers to the contract of the suborchestration via an assembly or directly (as I have done in this example). The main orchestration passes a unique promoted property to the sub orchestration(It can be a set of properties as well).Please ensure whatever property you are promoting has to be unique for each instance of the calling orchestration. The sub orchestration does its flow and before sending back the response it also returns the promoted property written in context of its response, back to the main orchestration. Now the main orchestration has a receive port listening on the sub orchestration response, it is following a correllationSet defined for the promoted property. Confused ? Ok, lets  walk through on how this has been implemented from coding perspective and I hope you will know what I am trying to explain.

1>Create a new BizTalk project and add two orchestration files there.

  • MainOrchestration.odx
  • SubOrchestration.odx

Define the request and response schemas for each of the orchestration. The body of the orchestration will look like this. I am not doing any complex logic here. The main orchestration creates the sub orchestration request>> sends it to the messegebox>> pick up the response from the message box>>creates its own response and sends it to a file send location. The main orchestration body will look like this.

Image

2>We need to assign a unique property to the sub orchestration request message. I have created a property schema and will be using it to define my correlation property.

New1

3>Since this unique property has to be available in the context of the sub orchestration request message it has to be promoted , we accomplish this by creating a new correlation set with the identified unique property.

4>Initialize this correlation set on the send shape for sending sub orchestration request and follow it on receive shape for the sub orchestration response.

write the remaining portion of Main Orchestration and you are done with it here.

5>The sub orchestration will look like this.

Image

6>Since the sub orchestration needs to return the property which was sent by the main orchestration here also you need to create another promoted property used to store the value sent by main orchestration.

Image

=Please note all the ports used to communicate with the sub orchestration is of direct binding type( Silly to mention but that is what I have designed this solution around)

Create a file receive port and trigger your orchestration. You should be able to see the following execution.This completes the demo. Please leave me a comment if you need some clarification or help. I will get back ASAP. Thanks.

OrchestrationExecution

Installing BizTalk Server 2013 R2 and ESB Toolkit


So I recently started getting my hands on BizTalk 2013 R2 version. We are running BizTalk 2013/ 2009 so far. I am sharing some of my personal experiences while installing and configuring the BizTalk 2013 R2 version.

The one go to stop for setting up BizTalk 2013 R2 is following Sandro Pereira’s blog, it isa  series of posts and believe me you are not going to need anything else, a big thanks to him for publishing those, made my life lot easier:
https://sandroaspbiztalkblog.wordpress.com/2015/01/16/biztalk-server-2013-r2-installation-and-configuration-installing-biztalk-adapter-pack-part-12/

Note: If you do not have the proper machine/OS  to set BizTalk  you may want to look at the MS Azure to set up your own BizTalk server machine in no time. Please see this post: https://psrathoud.wordpress.com/2014/12/09/microsoft-azure-creating-your-own-biztalk-sandbox-virtual-machine/

Having said that I bumped into some diffiernt errors while installing and just making a note for all of us at BizTalk community. Please add in if you feel I am missing something here.

1>If you install VS 2012 by mistake that will result in no BizTalk sdk in VS 2012. Hence for BizTalk 2013 R2 you will have to only use VS 2013.

2>BizTalk 2013 solutions can be opened on both VS 2012 and VS 2013.

3>After you are done with installing BizTalk server and before installing Adapter pack you are going to find number of windows update, please make sure you have all of them completed before hitting the install button for Adapter pack.

4>While adding adapter to BizTalk you may bump into this error.
Check that SSO is configured and that the SSO service is running on that server. (RPC: 0x800706D9: There are no more endpoints available from the endpoint mapper
Solution: Go to windows services: Check Enterprise Single Sign On Service is runing or not if not start ist/Do the same with Remote Procedure Call (RPC).

Related post:
https://psrathoud.wordpress.com/2014/10/23/esbbiztalk-error-check-that-sso-is-configured-and-that-the-sso-service-is-running-on-that-server-rpc-0x800706d9-there-are-no-more-endpoints-available-from-the-endpoint-mapper/

5>Another error you may bump into can be
There was an error when trying to connect. Do you want to retype your credentials and try again?
For resolution please go this this post:

https://psrathoud.wordpress.com/2015/02/20/error-there-was-an-error-when-trying-to-connect-do-you-want-to-retype-your-credentials-and-try-again/

6>Another error I bumped into while configuring the BizTalk ESB tool is.
Network path could not be found.
For resolution of this error please go to following post:

https://psrathoud.wordpress.com/2015/02/23/biztalk-2013-r2-installation-esb-tool-kit-installation-error-the-network-path-was-not-found/

Error : There was an error when trying to connect. Do you want to retype your credentials and try again?


You may bump into this error while configuration UDDI service post installing and configuring BizTalk 2013 R2. Also this error will pop up during adapter pack installation. This error will also result in loosing your IIS settings .
—————————
Failed to connect
—————————
There was an error when trying to connect. Do you want to retype your credentials and try again?
Details:
Filename: C:\Windows\system32\inetsrv\config\schema\Microsoft.Adapters.SAP_schema.xml
Line number: 1
Error: Configuration file is not well-formed XML
—————————
Yes No
—————————
IIS error

Most likely is a installation glitch. The error is self explanatory in this case. Please go ahead and check the path “C:\Windows\system32\inetsrv\config\schema\” and notices the xml file sixe was 0 KB.

SAPSchemaMissing

Next open the BizTalk installation ISO file and look for the xml in the following location:
F:\BizTalk Server\AdapterPack_x64\Program Files\Microsoft BizTalk Adapter Pack(x64)\IIS Schemas
Copy over this file to the missing one.

Next type IISRESET in the search box of Windows server 2013 R2 and complete your IIS reset. Go ahead and retry configuring UDDI and installing BizTalk adapter pack and it should be successful.

IISReset

BizTalk 2013 R2 Installation: ESB Tool Kit Installation Error: The network path was not found


While installing the BizTalk 2013 R2 ESB toolkit bumped into the error :
The network path could not be found.

NwPath error

This error should have a corresponding entry in ESB tool kit log. You can find that at the following location ( presuming you are using the default installation path).
C:\Program Files (x86)\Microsoft BizTalk ESB Toolkit\Bin

You will be able to see the error towards the end of the log. The reason for this error is in the user account being used for configuring the ESB tool kit. The id has to be part of the Administrators. Also if you are using a network domain ID you might see this error. In that case you need to go to the ESB configuration file.

C:\Program Files (x86)\Microsoft BizTalk ESB Toolkit\Bin\EsbConfigurationTool.exe.Config

Here you will have to modify the various BizTalk groups to the domain groups that you would like to use.
For example:

Change To:

Once done close and reload the ESB configuration tool one more time and reapply the configuration.

Sequential Convoys / Singleton Orchestration In BizTalk Demo


A sequential convoy enables multiple single messages to join together to achieve a required result. A sequential convoy is a set of related messages that have a predefined order. Although the messages do not have to be exactly the same, BizTalk Server must receive them in a sequential order.

Few usage of them could be an aggregator orchestration or to introduce throttling. I will be covering those in later blogs.

In our example below all the messages arriving to one ReceivePort will trigger our orchestraion and all of them will be consumed within a SINGLE INSTANCE of the orchestration. In other words each incoming message is not triggering a new orchestration instance. I have tried to keep the orchestration simple but hopefully by the time you will finish reading this you will know what how the sequential convoys operate.

Using correlated Receive ports are key to sequential convoys. Here are the steps.

1>Create a new BizTalk solution and define your incoming and outgoing message schemas(You can refer to my previous posts in case you want to for doing that)

2>Add a new orchestration to your solution and design it similar to the Picture below.

SCOrchestration

3>Define correlation set and types and in the correlation properties we will use the “BTS.ReceivePortName” property since we want to have the convoy configured on all the messages arriving on a particular receive port.

correlation

Note:We can use a lot of other properties to define the “correlation ” for the sake of simplicity I have picked ReceivePortName.Let me know if you want to use some other properties and discuss it here.

4>On the first receive shape we will initialize this correlation set.

IntializeCorr

5>The second receive shape will follow this correlation set.

followcorr

6>Create a physical receive port and send port. Bind orchestration and start all the ports, orchestration

When the first message arrives in the message box the orchestration picks that up and starts while initializing the correlation, when the 2nd message arrives instead of being subscribed for a new orchestration instance it rather goes to the 2nd receive shape which is following the correlation initialized by the first receive shape hence this message gets consumed by the existing orchestration instance. This loop goes on unless we write a logic for when to break it.

Try dropping xml files to your receive location, the admin console will show you all the artifacts triggered notice there is only on orchestration instance triggered. During the time when there are no messages coming into the receive location or orchestration will be in dehydrated state and and will rehydrate in event of a new message arriving into the port. Also this orchestration is not designed to complete, you may want to add a branch with delay shape to exit the infinite loop in the code, anyways thats a simple thing to do and we may handle this in mutiple way. Hope the example comes handy.

SeqAdminConsole

Need source code, please drop a comment with your email id and I will revert back ASAP.

Microsoft Azure : Creating Your Own BizTalk SandBox Virtual Machine..


Update 12/2016: With release of BizTalk 2016 the Azure interface has changed. The image for BizTalk 2013 R2 is only available in Azure Classic portal, for the latest Azure portal you will get BizTalk 2016, having said that rest of the process stays pretty much the same.

 

Like the name says this post will aquatint you on how you can have your own VM hosting BizTalk server which can be used for your own development efforts. Sounds cool, I know it is 🙂

The starting point will be the following link.

http://azure.microsoft.com/en-us/pricing/free-trial/?WT.mc_id=azurebg_us_sem_google_br_top_nontest_trialpage_microsoftazure&WT.srch=1

Follow the prompts and you shall be able to get something like below eventually : your own VM with BizTalk preconfigured and ready to be used.

Original - Copy

If you chose BizTalk Server Enterprise or Standard, then You must provision another VM of SQL Server to use with those BizTalk VM’s.

Only the MSDN Developer editions of BizTalk VM’s include the full stack, including SQL Server and Visual Studio.

It might take about 10 to 15 minutes and once it completed you can download the rdp file which will use the windows remote desktop connection and launch your own BizTalk box.

Note:

After creating the BizTalk box you may get the RDC issue while trying to access your VM : Remote Desktop can’t connect to the remote computer for one of these reasons.

You may face this problem if you are in your work LAN network. Configure different public port for the RDP Endpoint. Setting it to 443 (the HTTPS Standard port) or 22 (Standard SSH port) will solve the issue

Original2

D Goins Insperience

Technological outformation for this day and age

[INACTIVE BLOG] Connected Thoughts - Thiago Almeida

Connected systems and the occasional picture

Uri Katsir's Blog

BizTalk , BizTalk RFID and .NET

prashantbiztalkblogs

My BizTalk Experiences

BizTalk Server Tutorial

BizTalk Server Concepts and Common Errors

Extremely Talented Monkeys

A Technical Blog by Ed Jones: Azure, .NET, BizTalk, WCF, and SQL Server

On All Things Web

Discussing web development without limits

Vikas Bhardwaj's Blog

Articles about BizTalk Server and .NET C#

Cloud develop

a blog about (cloud) development... because I'm a nerd

Hooking Stuffs Together

My learning logs from day to day work experience about Integration platform using Microsoft technologies.

Connected Pawns

Mainly BizTalk & Little Chess

jhelatissimo

a blogger in the process.

MS Innovations Blog

Tips, Tricks, and Workarounds for BizTalk and other Microsoft technologies

srirambiztalks

Katradhu Kaialavu,Kalladhadhu Ulagalavu!

Vijay Microsoft Technical

BizTalk, WCF, ESB ToolKit, Windows Azure

Mind Over Messaging

Musings on BizTalk, Azure, WCF, and Enterprise Integration