BM-Bloggers

The blogs of Black Marble staff

Microsoft CRM 4.0 adapter for BizTalk 2006

Microsoft have just released the Microsoft BizTalk® Server 2006 adapter for Microsoft Dynamics® CRM 4.0, the adapter has the same functionality as the 3.0 adapter plus :-

•             Support for both 32-bit and 64-bit deployments of Microsoft Dynamics CRM 4.0

•             Support for form-based authentication

•             Support the joy that is multi-tenancy

Best of all the adapter is free.

 

Download Here

b.

Enigma, Bletchley Park and the Battle of the Atlantic

I attended a very interesting BCS talk last night hosted by the West Yorkshire Branch about Enigma, Bletchley Park and the Battle of the Atlantic.

Dr Mark Baldwin is a superb speaker; he spoke about Enigma machine itself, the decoding efforts started by the Poles in the early 1930's, subsequent wartime efforts to break the codes, the machines used to aid in this process, the effects that code breaking had on the battle of the Atlantic and Bletchley Park itself for 2 hours without any notes! At the end of the talk, there was also the opportunity to examine a rare 4-rotor Enigma machine that Dr Baldwin had brought with him.

I was particularly intrigued to hear that the Germans thought that the sheer number of possible combinations that the Enigma machine allowed for (3 × 10114, a number significantly larger than the number of atoms in the observable universe!) precluded anyone being able to decode their messages; an assumption that remained until many years after the war. The rotors used with the Enigma machine were also not rewired at any point during the war. In addition, because they assumed that nobody could read the messages produced by such a system, they made very little effort to break the codes produced by our Typex system!

I was also saddened to see the state that Bletchley Park is now in. Many of the huts where so much incredibly important work was carried out are in a very poor state, some have even already been destroyed. Bletchley Park has receives no external funding and has been deemed ineligible for Heritage Lottery funding. I would urge you to sign the petition located at http://petitions.number10.gov.uk/BletchleyPark/ in the hope that the government will do something to help save this crucial piece of British history.

On a happier note, Robert mentioned to me that Black Marble does sponsor Bletchley Park! I look forward to being able to visit in the near future.

My First Post - by Lauren, age 23

mynameis

Hello! This is my first post as a BM Blogger! I've been the Graphic Designer here for just over a year, although I do a little more than graphic design. The new BM Bloggers site templates for example.

Here I hope to post little examples of what I'm working on and the daft little scribbles that seem to end up on my page.

So.. I guess we'll have to see what I come up with..

Flash problems

Are you seeing the error "Cannot play media. You do not have the correct version of the flash player. Download the correct version" on the BBC web site or on YouTube  "Hello, you either have JavaScript turned off or an old version of Macromedia's Flash Player. Get the latest Flash player"?

I have been on my Dell Mini; I suspect the problem was the upgrade route I took from XP-Home -> IE8 Beta ->XP Prof meant the registry was a mess. Repeated re-installation of Flash and Shockwave had no effect.

After much fiddling I fixed it by downgrading to IE7, running the Abode Uninstaller, the installing Flash and upgrading to IE8 again. However I suspect I did not need the IE downgrade first, but I had done this previously.

Hope this saves you some time.

First thoughts on the Acer Aspire One

You can’t say that things never change. I nipped out to Tesco last night for a few bits of shopping – you know, some beer, spices for cooking, etc – and came back with an Acer Aspire One. As you do…

To be fair, I have been looking at them closely, and Tesco are by far the cheapest place to get one. I picked up the 1Gb RAM, 120Gb HDD Linux model for about two hundred and fifty nicker, which I thought was pretty reasonable.

So, I hear you thinking, why did he just buy an Aspire One after singing the praises of the Dell Mini 9? The answer – this is for home use. Our home needs are different. We want something to use whilst researching our family tree; we need to be able to store scanned documents whilst out and about; run the family tree software and upload photos from a camera prior to pushing everything onto the Home Server back at home base. The Dell doesn’t have the storage for all that.

Add to that the keyboard on the Dell, which my wife really didn’t like and you have a good case for the Acer.

Out of the box it looks lovely – we got the white model and it’s clean, shiny and sleek. It also comes with a slip-on pouch which will protect it whilst in a bag, something I’ve not seen amongst the competition. Like the Dell, it’s completely silent (I wasn’t expecting that, it having a hard drive which I though would hum gently) and quick to boot.

I must say that I like the feel of it. I’m not so keen on the trackpad, whose buttons are located either side of the pad, rather than across the bottom, the de facto standard as far as I am concerned. It makes it harder to click with your thumb whilst tracking with a finger. The keyboard, though, is great. A full complement of keys and the same layout as my Travelmate meant I could type quickly and accurately with no learning curve, unlike the Dell. However, the keys are slightly smaller so if you have stubby fingers you might prefer the Dell.

I was also impressed with the Linux OS and interface installed on the One. I’m almost sad to say that it will be replaced by XP – for the novice user it really is a clean, task-centric interface. If it didn’t have to run Windows applications I’d leave it alone – I really would.

I don’t like the power charger. No sleek, compact charger like the Dell – it’s a standard laptop-style adapter, which means a cloverleaf power cord and a charger with a lead to connect to the laptop. The extra cables mean extra bulk and as a result I probably wouldn’t want to be carrying it around.

Which leads me to the battery. The OS reckoned it had two hours life available on a full charge. That’s not great, given what we need to use it for. However, the battery is only a three-cell, unlike the Dell’s four cell, which explains, whilst not justifying, the lower life. The upside is that I can get a six cell battery for around seventy quid, which by all accounts on the web increases the usage time significantly (I’ve seen figures like six hours being thrown around).

Overall, I’m really pleased with it. It’s comfortable to use, wasn’t very expensive, looks the business and meets our needs almost perfectly. I think the larger battery will be an imminent purchase, and it will get an XP makeover, but it compares very favourably indeed with the Dell. I would probably suggest my colleagues got the Dell for business use (we need less storage and want to carry the charger around), but if my parents asked, I’d point them at the Acer.

Time for the old pros and cons, then:

Pro

  • Small and lightweight.
  • Beautiful to look at (at least, the white one is!).
  • Good size hard disk for storage.
  • Performance is good.
  • Screen quality is great.
  • Keyboard is better for home users (and it has all the function keys!).
  • Linux environment is really good (if you’re happy with Linux and don’t want to install Windows apps).

Con

  • Trickier to upgrade than the Dell (no handy covers here – it’s a strip-down job).
  • Shiny case is likely to be a fingerprint magnet.
  • Standard hard drive means moving parts so a bit more fragile than the Dell.
  • Battery life out of the box is uninspiring.

Running fitness.Net tests in unit test – some tips

I posted a while ago on wiring in Fitness.Net into a unit test framework using HTML files to hold the tests. Well I have been using the technique for some workflow acceptance testing and hit a couple of gotta’s that are easy to forget:

  • Make sure the HTML files containing the user story tests are set to copy to the project output directory in the IDE – if they are not then the framework cannot find the tests, so obviously none are run. The danger is you think the problem is an incorrect class or method name, when it is a simple missing file problem.
  • If you edit the user story HTML file make sure you rebuild the solution. If you don’t do this the copy to the output directory might not be triggered as a simple build maybe skipped as the IDE will not see any changes to source files it needs to compile the project. This is especially easy to forget if you are using a test add-in such as Testdriven.net as opposed to clicking on build yourself.
  • Be careful with the HTML editor you use to create user story file in case it reformats the page. This is important for parameters (but it seems not for the method name fields). You need to make they are formatted

           <td>My Value</td>

as opposed to

           <td>
           My Value
           </td>

as the latter will include the carriage returns characters in the parameters passed into the test so will probably fail.

I think that is all for now, I will post any others I find as they crop up

Upcoming events in October

It is getting to that conference time of year again; I can’t believe the PDC is only 3 weeks away, then VBug  the next week and DDD7 just after that.

A bit closer to home there are some free events coming up this month:

Look forward to seeing you at one of the events in Yorkshire

A bit further from home, Guy has had a bit of a coup at the Bristol .Net Usergroup. He has got Oren Eini the developer of RhinoMocks speaking on the 13th of October during a rare UK visit. For those of you who the name Oren is not familiar, he is the man behind blog http://ayende.com/blog/ a major resource for all things Agile.

Testing Driven Development for Workflow Foundation

As we move into the SOA world workflows will become more common and so the need to test them will increase. If we take the most simplistic view these are a sets if statements and loops so should be amenable to automated testing and TDD.

However you have to careful how you try to do this, it is too easy to forget that your workflow will run the the WF thread. Why is this problem?

Consider this scenario, if you create a simple sequential WF console application you get a block of code like this in the Main(args) method

using (WorkflowRuntime workflowRuntime = new WorkflowRuntime())
{
   AutoResetEvent waitHandle = new AutoResetEvent(false);
   workflowRuntime.WorkflowCompleted += delegate(object sender, WorkflowCompletedEventArgs e)
   {
      // could put asserts here (A)
      waitHandle.Set();
   };

   workflowRuntime.WorkflowTerminated += delegate(object sender, WorkflowTerminatedEventArgs e)
   {
          // could put asserts here (B)
   
   waitHandle.Set();
   };

  WorkflowInstance instance = workflowRuntime.CreateWorkflow(typeof(WorkflowConsoleApplication1.Workflow1));
   instance.Start();

   waitHandle.WaitOne();
}

// could put asserts here (C)

This block of code will be the basis of each of your unit tests, but as indicated you could put your test asserts at one of three places

  • In the success delegate
  • In the fail/terminate delegate
  • After the workflow has completed

The best place is the third option, when the workflow has finished, even though you know in a test whether it should completed OK or failed. The problem with the previous two locations is that the anonymous delegate will be run in the WF worker thread. Interestingly, if the assert passes in this location all will be OK, but if it fails the thrown assert exception (the mechanism used in nUnit to trap failure and in other test frameworks to my knowledge) will be in the wrong thread and so will not be picked up by the test harness, so in effect the test runner stalls waiting for completion or an exception, neither of which arrive. This issue is not the the case if the asserts are done when the workflow completes. This does mean that you have to pass results out of the workflow, but this should not be a major issue as the results should be simple objects (workflow parameters) or checks on external (mock?) systems, such as file systems, DBs or Smtp servers.

Though not always standard practice in TDD, I think it is a good idea here to move the code in the above sample’s using statement into a static method in your test class; it is boiler plate that will probably be use in many tests. As tests are meant to readable I think a single line call to the RunWorkFlow() method is better than a block of repeated loop and delegate code. Remember you do have to be careful here, as you may need to pass in parameters and get a return value to get the end state of the workflow; the requirement will depend what your workflow does and how it interacts with other systems. It maybe you need more than one version of the RunWorkFlow() static method depending on what is under test e.g one to harvest output parameters from completed workflow runs and another to harvest inner exceptions that are inside the workflow terminated delegate.

So now there is not reason to not test your WF workflows – assuming you can mock out any external connections, and if you are using web services or IoC to talk to data stores this should be fairly easy. 

Next I am off to try to do the same with SharePoint workflows.