Tuesday, May 26, 2009

BizTalk first steps

When you are a developer taking the first steps into the BizTalk realm, you might find these issues that i have encountered usefull to be aware of;

[WS Adressing]

Using WS Adressing can be realized by the leverage of the WCF (WS)Http adapter. An important thing to remember when using the WCF adapters is to set the SoapParameterStyle to ‘Bare’, this prevents the serialization process to wraps the Message, since this is not expected by the WCF adapter.

Port configuration is lost during deploy
When the binding configuration is not maintained during redeploy (eg. the ports are reset to a different pipeline) there is a chance that is caused by an old binding file.

\Documents and Settings\\Application Data\Microsoft\BizTalk Server\Deployment

Problem: Orchestration version is different so bindings are lost

binding files contain all the bindings, back up these frequently

[Comparision of Biztalk 2004 vs 2006 + (R2)]


- Routing for failed messages not available

- routing for failed messages available
- debugging with insight in variables
- administration console

2006 R2
- messages are shown
- routing failures shows the messages

[What are Unit Testing opportunities]

[Debugging / Tracing Errors]

How to test failure in orchestration MAP

Create a direct routing:

- PORT (receive)
- PORT (send, with the receive port as filter)

Error Can not locate assembly (GAC)

Assembly is installed in the GAC but can not be found when starting orchestrations (refreshed, build, deployed with the new dll):

- stop all Host instances / Orchestrations

restart the machine

- start all Host instances / Orchestrations

Routing failure

Check listening ports (are there ports listening)
Check filters in ports/orchestration and verify this with the message instance
Check bindings
Check Orchestration in active state (not processing)
Check port/orchestration/hostinstance state (is it running)?
Check Port type Xml or Passthrough (and correlation on type)?
Delete port

do not delete the port on Receive Location level, but remove on Port level!!

Map with multiple message parts, howto change the scheme

When changing the scheme / refactoring the structure for maps with multiple message parts, reassigning the transformation shape will not succeed.

The map can be changed with the correct types (from the transformation shape). Adding the links can be done by copying the element from the original Map. This will re-enstate the correct transformation links within the map.

Testing multi part messages

Use the aggschema:

Message 1
Message 2

see: http://www.blogbiztalk.com/?p=55

Modify resource

The binding files are stored on disk and are reloaded when modifiying resources. If there are problems, it is wise to manually check the Binding files. There are located in:

\Application Data\Microsoft\BizTalk Server\Deployment\BindingFiles

This is applicable for errors like:

- location not specified
- transport type not defined
- failed to complete end typec change request

Error when calling a webservice; Could not create type

When the webport is used in multiple orchestrations they should refer to the same webport. If they all use a new webport type the orchestration can not determine which type to instantiate and will throw an error: 'could not create type'

You must specify …already-initialized correlation set …non-activation receive that is on a non-selfcorrelating port

If I was to guess, this error occurs when you are trying to compile an Orchestration. View the property settings for the first Receive Shape and change the [Activate] property to True. This essentially tells the Orchestration to initialize when receiving a new message. If this doesn't resolve your problem, please provide more information on when you are seeing this error message.


Deployment error ‘Access to the …. Is denied’

Orchestrations are designed in a visual editor, based on the orchestration the C# class is generated. If somehow the process of generating the C# classes fails the solution is to remove the files.

Note: these files will likely be of 0kb in size.


Watch for the cached binding files!!!

Deploy takes long time

- is redeploy checked
- tracking disabled
- running instances


How to deploy

1) kill instances
2) deploy

How to update and XSD (schema) if you haven't used multipart messages

1)Delete all connections between messages and logical ports
2)update all messages (select the correct XSD)



Ensure that the messages are handled in the correct sequence
Note: Ordered delivery is also a common scenario

What is


Property promotion. Used by messaging services to route messages based on the content of the message

Distinguished fields. Used by orchestration services to access specific data fields contained in a message within an orchestration

What is correlation?
Correlation is the process of matching an incoming message to the appropriate instance of an orchestration. This is commonly used with long-running transactions in which the orchestration instance may be waiting for additional information to be received before it can continue with the business process.

You can use BizTalk Explorer or the BizTalk Administration console to create one or more filter expressions by using the promoted properties from your schema or BizTalk global properties. The filter expressions define the subscription information that determines which messages are routed to a specific send port or send port group.

Content-based routing

The send port filter can be used for content-based routing without the need for an orchestration when the application does not require any additional processing required by an orchestration. Filtering can also be used to route a message to an orchestration when additional processing is required.

Both BizTalk global properties and promoted properties from a BizTalk schema can be used for content-based routing.


If a long-running business process times out, use exception handling to handle any errors. Compensation is only called for successful transactions. By default, long-running transactions do no time out. This is a configurable property that can be changed if desired.

Message fields

Properties can be used internally inside an orchestration.
Additional information can be retrieved using Xpath

promoted properties
Properties can be used for correlations and port filtering


copy data between messages

msg(*) = blaMsg(*)

note: this will not handle mandatory fields! Workaround ==> set an initial value

Untyped Message Processing and external projects


Direct bound ports and Correlations

When Correlations are required in direct bound port communication, the sending orchestration should initialize the correlation that is used in the receiving orchestration.

Promote a property used in as filter in another orchestration

Send the message to the directbound port using an correlation set based on the property that is required as filter.

No comments: