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.

Windows Communication Foundation

Tired of searching the meaning and specification of all the WCF bindings, hereby a summary of all bindings that are available in a single document...

WCF Configuration

Monday, May 25, 2009

New years resolution, revised

After the swift change of employer this year i've decided to revise my new year resolution:

- i will blog again
- the main language is english (archives remain in dutch)

My linked profile is the first online activity that is up te date, after that i will start writing blogs about various subjects in the area of integration and mainly focused on BizTalk.

Next month will be a perfect source of inspiration since i will attend the BizTalk 2009 Deep dive, can't wait.

Oracle snippets

Below is a collection of snippets i've used during a project implementation. If you're working with Oracle, you might be able to gain some quick insight how you can use it for the benefit of your project.

Grant / permissions



CURSOR c_orderlines
SELECT order_pk
FROM orders;

-- !!turn off the notifications!!

v_process := 1;
v_id := 0;

DBMS_OUTPUT.put_line('Started @' || sysdate);

OPEN c_orderlines;
FETCH c_orderlines INTO v_id;

WHILE c_orderlines%found LOOP

FETCH c_orderlines INTO v_id;


CLOSE c_orderlines;


System tables
all_tab_columns This is like the syscolumns/systables in SQL Server
all_source This allow searches in all entities that exist

Inline SQL

Retrieve the name of the package


Top selection: where rownum < 5


Statistical queries
select id as a, max(reference_id) keep ( dense_rank last order by order_creation_ts) as b

Variables – RowTypes
Variables defined as:
allows usage in the PL/SQL by:

-- this will check if the field 'x' has changed
updating('long_desc')) THEN

usefull tools

Calling webservices from a database

No listener ==> use the IPADRESS RATHER THAN THE NAME
Action header ==> do NOT set the Action header, this is obsolete

Toad knowledge
Key combinations
CTRL+T Intellisense
F9 execute, output in grid