Monday, December 28, 2009

What is the xRM Development Toolkit

This project provides classes to simplify Microsoft CRM 4.0 development. It provides functionality, developed in C#, to allow you to use custom .NET objects and properties and map them to CRM entities and attributes.




Some features include:



* Helpful extension methods for the CRM Service.

* Allows you to use custom objects with the CRM Service, without having to convert them to dynamic entities or downloading the latest WSDL.



The simple mapping between custom objects and CRM types that this toolkit provides means that managing, data-binding and extending CRM types can be accomplished with ease. This is ideal for any developer whether you're working with a small web application or a large scaled n-tier solution.

Keep Trying

In my normal manner, I am jumping around again.  I have working samples of Bizmonade and BizMock, so that means I need to play with something non-BizTalk related.  This week we will be playing with XRM Development Toolkit.

The idea behind this project is to show how leveraging a framework for MSCRM can reduce time to market for integration projects.

Setting up my CRM dev environment today.

http://xrm.codeplex.com/

Friday, December 18, 2009

What is Bizmonade

If you do end up following my attempts at being a blogger, the one thing you will quickly realize is that I am slightly scitzophrenic.  I like to jump from topic to topic at times.  Anyways, I have been having issues with my BizMock tests, so rather than get too frustrated I turned my attention to Bizmonade.  So, what is Bizmonade...

Bizmonade allows running orchestrations directly from unit tests written in C#, using NUnit, MSTest or any another .Net testing tool (But only supports NUnit out of the box as of this post). The orchestrations therefore run in complete isolation from the whole BizTalk environment, reducing the time needed to do quick tests of new orchestrations or of modifications to existing ones. The orchestrations can be tested without waiting for deployment scripts to run, and without worrying about technical communication details (server adresses, authentication details, file system paths, message encoding, encryption, mappings...)

It looks very promising, although it is not without its issues.  If you do download it, or try to use it, keep in mind it is an alpha or beta concept at best.

Labels: , ,

Tuesday, December 15, 2009

Issues with Simple Type Definition

Yesterday afternoon I was working on my BizMock demo when I tried to validate a schema using the BizMock test (I know it is redundant now that BTS supports schema tests).  I got a very strange error  (System.Xml.Schema.XmlSchemaException) The content type of the base type must not be a simple type definition."

Huh?  My schema already passed using BizTalk's out of the box testing.  Did I mess up my artifacts? Doesn't look like it.

Time to check Bing.  I found these two links (I found 3 but suspense is good for the plot).

http://social.msdn.microsoft.com/Forums/en-US/biztalkgeneral/thread/1f7a3d32-2f31-4426-afe2-2a50b0792b46
http://support.microsoft.com/kb/957206

Wow, both of these have to do with a hotfix for .Net 1.1 - Do I really need these, and how do I get them anyways.
I think not, because I found this 3rd post by a colleague of mine Danile Sepp http://blogs.neudesic.com/blogs/daniel_sepp/default.aspx

In it he talks about a work around for dealing with Simple Types - I had to manually build an OTA schema which was no fun, but at least my testing now works.  It is strange that if this is a bug of sorts, that the BizTalk testing framework didn't find it, but a 3rd party testing framework did.

Labels:

BizMock Recieve Adapter

I seem to have a strange behaviour with my BizMock recieve adapter.  After 10 minutes or so, I start to get errors like this

The receive location "xxx.BizMock" with URL "BizMock://xxx.BizMock" is shutting down. Details:"The Messaging Engine failed while notifying an adapter of its configuration. ".


I am going to have to dig into this one.  I know it must be something I am doing (Like all my failed tests) to cause this, because the Out-of-the-Box sample work and run just fine.

Labels: ,

Monday, December 14, 2009

What is BizMock

BizMock is a framework for testing BizTalk solutions, using a Domain Driven Design (DDD) approach and fluent interface API. It has mocking capabilities, so no need to rely on dependent infraestructure like web services or DBs. The tests are writen and executed from within VS using regular Visual Studio Tests and C# code, allowing a TDD and agile development style of BizTalk solutions.



it's main advantages are:

Rapid testing of Biztalk scenarios ( no more excuses to not test biztalk code)

No need to leave the Visual Studio IDE

We use regular Visual Studio C# Unit Tests code ( no puzzling xml) .

Favors agile iterative development cycles with continous Integration.

No need to rely on real implementations of dependent infraestructure like web services, Databases, etc. ( isolated on the developer machine or build server )

Increasead level of abstraction thanks to its Domain Driven Design approach and fluent interface.

Rapid and guided development thanks to intelisense and its fluent interface API.

Reusability of domain artifacts across tests, like ports, messages, verifiers etc.

Extensibility model to allow the creation of new artifacts, actions, and expectations types over time and reused across solutions

Leverages DDT ( Data Driven Test)

In future releases can be enhanced with Visual Studio addins and tools: to automatically update deployments, autogenerate artifacts, autogenerate map and message verifiers tests.

In future releases can be enhanced with guidance automation to guide the process and implement best practices

In fututre realeases can be integrated wirth functional testing tools like FIT, to quickly create integration scenarios test cases

To know more visit http://www.codeplex.com/bizmock

Labels: , ,

Making a comeback

I have not done a blog post in forever.  It probably won't change anytime sone, but we are going to try.  I plan to use this blog to cronicle my experiences using TDD concepts and BizTalk to solve hospitality scenarios.

I have two that I am working on right now.  The first will use BizTalk 2009 to expose an Open Travel Authority (OTA) ReadRQ message and consume Expedia Quick Connect (EQC) services.  The first testing framework I will dive into is BizMock.  I figure that the developers who are looking at this post, probably already have BTS processes in production, and need to retro fit them with some testing.  BizMock is a good place to start.

Let the adventures begin.

Wednesday, August 03, 2005

Bam Business Milestones

So you are starting to realize the potential of BAM, but you notice that the times in your Business Milestones are a bit off. This is because BizTalk logs Business Milestones in UTC. So, I thought I would help you all fix this to show the time in your local time zone.

If you get into the DB call BAMPrimaryImport, and look for a SP call bam_ActivityName_PrimaryImport we are going to add a few statements after the BEGIN statement.

--A variable to hold the difference between UTC and your local time
DECLARE @TimeDifference int

--Calculate the difference
SELECT @TimeDifference = ROUND(DATEDIFF(mi, GetUTCDate(), GetDate()), -1)

--Fix the time difference
SELECT @BusinessMilestone = DATEADD(mi, @TimeDifference, @BusinessMilestone)
SELECT @2ndBusinessMilestone = DATEADD(mi, @TimeDifference, @2ndBusinessMilestone)

Ther you go! Now you will need to do this for each Activity you defined.

Tuesday, August 02, 2005

Bam Durations

Ever notice the duration field in a BAM query? You end up with a value like 1.102304-3e. Well BAM by default shows you the duration in days. It is iactually quite easy to adjust this to whatever you want.

All you need to do is make a change to two of the views that are created for you;
1. The ActiveAliasView
2. The CompletedAliasView

Both of which can be found in BAMPrimaryImport. You are loking for a statement that will look like this;

[Duration] = CAST([TimeStamp] AS FLOAT) - CAST([TimeStamp] AS FLOAT

What you need to add is this;
[Duration] = CAST([TimeStamp] AS FLOAT)*24(For Days)*60(For Minutes)*60(For Seconds) - CAST([TimeStamp] AS FLOAT*24*60*60

You will notice that if you query the BAMPrimaryImport DB that all the durations will appear as seconds, but if you have a processed cube, it will still reflect the old data, and when you add the new data, it will become unreliable. So if you need to do this, you must be prepared to start the cubes from scratch.