Happy and honored to be going to TechEd Hong Kong again this year

I have to say – TechEd Hong Kong has been one of the best conferences I’ve ever been to.  The hospitality shown by the people from Microsoft is really second to none.  Hong Kong is a beautiful city to visit and the people (not just from Microsoft) were very accomodating.


 


This year, not only do I get to hang out with my old friend Bob Beauchemin – I also get to bring Shannon with me this year. I am sure we’ll have a blast.


And – I get to do talks on WF/WCF (one of my current favorite topics). BAM (always one of my favorite topics) – and its integration in BizTalk Server R2. Plus – I get to do two talks on new features in Orcas and ASP.NET!

Should be a great week in Hong Kong if you are in that area of the world – sign up!

On my way to Norway

To teach a Windows Workflow Foundation 5-day course.  Everyone says it will be beautiful.

 BTW – I don’t plan on updating the Atlas Workflow Designer until they release the next version of Atlas – read Biertand Roy’s blog about why –

Link to Atlas and more  – they are about to change from closures to prototypes.  This will be a great chance for me to re-architect the whole thing.  The next big feature will be HTML based rule editing.

Finally some bits!

I’ve been teasing for a while about my Atlas-base Windows Workflow designer for a while.  Its just that although I had some basic functionality working months ago – it has taken me this long with all the other consulting and training I’ve been doing to actually get things working to what I consider a beta level.


So with this post I am announcing beta 1 of the Atlas Workflow Designer.  I am putting up source code – but I am releasing it under the MIT license (which basically means you can use it for any purpose – even commercial – you just have to leave my copyright notice in it so I get credit :) ).


Any bug reports are welcome – although code reviews are not ;-) .  Personally I am happy with the functionality - I am not necessarily happy with the way all the code is factored.  Some of it to be perfectly honest is a total hack.  Mostly in the Atlas based “class” that runs the designer in the browser.  There is some serious refactoring that needs to get done there, which I will be working on for future releases.  Also – the persistence layer (saving the xaml and rules to the database) isn’t as layered as I’d like (I have plans for a workflow persistence provider so different stores can be easily plugged in).  Also the coupling between the javascript and the service is a little tight – but that may be unavoidable in this particular application.


The biggest thing to get working better is the property grid and rules.  As of now – all you can put in for rules is “true” (yes – I know this sucks – but making a near full-featured rule editor in the browser is another big task).   There also may be some other property types that cause trouble -  but I think that is mostly taken care of.  


You can put bug reports here or email them to me – but remember – I am giving this code away essentially – I am not charging you for it ;-) .  But – if you are someone in need of consulting with WF (whether with designers or any other issues) please drop me a line :)


I’ll try to post a camtasia of myself using it later so you can get a handle on how it works – plus there is a slightly weird issue in Mozilla (where you can drop the activities is pretty funky right now – but pretty much everything else works).  You’ll need SQLExpress installed to get the persistence layer to work correctly (or import the mdf into SQLServer and change the connection string in the web.config). 


Anyway – enjoy – hopefully this will be useful.

AtlasWorkflowDesigner.zip (947.94 KB)

Tech Eds

Paul is having fun at TechEd Australia talking about WF – I am looking forward to doing the same at TechEd Hong Kong at the end of September (also just looking forward to going to Hong Kong!).


I hope that the image on this page is the speaker “outfit” :)


I’ll also be doing two talks on Atlas – should be a blast.

Yes – I still love Atlas

I have to give kudos to the ASP.NET Team.  I really love the Atlas programming model.  I’d like to tell you that my Atlas based Workflow Designer is ready – but it isn’t.  But – I did re-build the WF WorkflowMonitor sample application tonight as an ASP.NET Atlas based application (oh – and I also did is as a non-Atlas based ASP.NET application for those of you that are still suck doing flicker-based PostBacks ;-) ).


What is Workflow Monitor?  Well the Windows Workflow Foundation runtime will take advantage of a TrackingService  – if one is found inside of the WF runtime.  The runtime ships with a SqlTrackingService – which by default tracks all Activity events.  See my post on the WF forums if you have never gotten tracking up and running for the steps I think people should go through to get the zen of WF tracking – http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=438583&SiteID=1.


One of the coolest steps is to use the Workflow Monitor sample that ships with the WF SDK.  It is a Windows Forms application that will (assuming you are using the SqlTrackingService and have added your workflow assembly as a reference or into the directory where Workflow Monitor is running) show you what has executed in terms of your Workflows.  If you set the SqlTrackingService.IsTransactional property to false, you can even see this in semi-realtime as the SqlTrackingService will write each event to the database as it happens rather than batch them (all writes are done transactionally regardless of the IsTransactional property BTW).


Why is this cool?  Well – to me it shows off one of the big features of using WF – visibility.  You can even show this to your pointy-haired bosses and they might start to see the advantage of WF.  Here is a screen shot of Workflow Monitor in action:


 



So what’s so cool here?  Well two of WF’s major features are being emphasized.  First – Visibility (sometimes referred to as Transparency – I like the simplier term).  At runtime and after runtime we can actually *see* what our processes have done.  The second major WF feature displayed is the designer re-hosting inside of another application other than Visual Studio. Although the designer really plays into visiblity – the fact that we can host the designer in any application royalty free I think is a huge bonus feature of WF.  Oh – not to mention tracking and the capabilities of the out-of-box SqlTrackingService.


So given my recent perseveration with Atlas and the WF designer I thought – wow wouldn’t that be a cool combination? Having the visibility into your WF processes for the masses – even those who don’t have the WF runtime on their machines – or those who you don’t want to have to deploy the Workflow Monitor sample (which could be made into a pretty deployable click-once application very easily).


So here we go – unlike last nights tease post – not only will I show you a Workflow Monitor application hosted in ASP.NET – I’ll post the code as well.


So here is my version of the Workflow Monitor in ASP.NET (which at the designer level borrows alot of code from the Workflow Monitor sample just to keep it consistent with what people have become used to).  First let’s look at the Atlas version.  Why an Atlas version?  Well first of all as I mentioned I think Atlas rocks.  But it rocks for a very good reason (and that reason isn’t that pointy-haired bosses know the term AJAX now and think they are so cool because of that).


Atlas and Ajax is cool because is gives the user the best browser experience possible.  Clearly the smart-client experience is going to be superior.  But if you have to go with a browser only application – why not make that application as easy as possible to use – and as nice as possible to look at.  I think AJAX browser applications do do that better than non-AJAX ones, and I think that Atlas is a great framework if you are building ASP.NET applications.


So in the spirit of cross-browser love – I am going to show you all the screen shots in Firefox.  :)


Here is my atlas/ajax based Workflow Monitor application in Firefox:


 



This is the ASP.NET Workflow Monitor in Firefox, before any workflow has been selected from the list of tracked workflows in the GridView on the right side of the page (to make this managable for more than a demo you’d want to restrict the time-frame of the query for these instances or give the use the ability to restirct the query – you can find how to do that from the Workflow Monitor sample itself).  Once I select an workflow from the list of tracked workflows on the left – I get the following (because it is using Atlas and an UpdatePanel there is no post-back flicker – only the workflow image itself is being updated:


 



Again – I have to tip my hat to the ASP.NET team on the job they did on Atlas, I never would have believed I could just write my ASP.NET page using the declarative ASP.NET model, add a few extra declarations and have a cross-browser AJAX application. But I have to say wow – they did it.  My contribution to this demo pretty much pales in comparison to theirs.


So how does this code work?  Well quite a while ago I posted about hosting the WF desinger in ASP.NET using a control and a handler to render a workflow as an pure image.  The worklow designer (WorkflowView actually) makes this option availlable as a public method.  The post I made last night about a WF Atlas based designer is also based on that code – as is this code (for honest disclosrure I borrowed much of the Workflow Monitor code directly for the worklfow drawing and use of the tracking API).


All that really happens is that each time you select a workflow from the list in the right-side GridView, a post-back is done to the server.  On the server-side some code in the page executes and retrieves the tracked workflow from the SqlTrackingService Query API (the same code that the Workflow Monitor example uses) based on its InstanceId. That information (the SqlTrackingServiceInstance)  is stored in ASP.NET session.  The HttpHandler – once it gets a request from the current session uses the SqlTrackingService instance to generate the image for the current workflow (the code from Workflow Monitor already decorated the current worklfow with special glyphs or images based on the execution status).


Just like the in Windows Forms version, this version loads the workflow into the Workflow Designer, but unlike that version which shows the results to the screen, this version captures an image (you can do this from the Workflow menu in Visual Stuiod 2005 as well when you are designing a workflow).


In the Atlas version there is no flicker and the browser app appears fairly close to Workflow Monitor.  With a Atlas timer – you could replicate the Workflow Monitor fucntionality almost completely and always hightlght and select the most recent workflow.


Again – if you are unlucky enough to be stuck doing ASP.NET without Atlas – I built a version that removes all the Atlas references and tags, and does work – just looks pretty bad since there is lots of post-backs and white screens in the browser.   You can download – either version (or hey download both versions and see the beauty of atlas – and remember you have to download and install the latest version of atlas for this to work – as well as beta 2.2 of WF) :


AtlasWorkflowMonitor.zip (697.68 KB)


NonAtlasWorkflowMonitor.zip (292.61 KB)


If you are stuck not using Atlas – this might a good time to introduce your pointy-haird boss to AJAX.  I am sure you’ll be using Atlas in a very short amount of time ;-)

How I spend my Sunday afternoon – playing with Atlas

So before I spent all my time playing with BizTalk and Windows Workflow Foundation (WF) - I used to do quite a bit of ASP.NET (there are even a few old ASP.NET posts laying around on my blog :) ).


Before that of course I used to do ASP/COM.  I joke that I started learning about and teaching AJAX back in 1999 (thanks to the brilliance of John Lam ).


I looked at Atlas a little last fall, but never got into it very deeply.  I decided to play with it over the weekend, and I have to say – I am really really impressed.  I decide to tackle what I thought would be a pretty interesting application – hosting the WF designer in an HTML only – AJAX based application.


I had already done the code to get images to be generated from the Workflow Designer on the server instead of hosting the designer in a browser as a control (see http://www.masteringbiztalk.com/blogs/jon/PermaLink,guid,28601754-c305-4597-a0a6-48f32be1eddb.aspx).


So I built a little teaser avi of the functionality.  Sorry no code yet – it needs some work before it is ready for public consumption – but even at this point I have to say I think it looks pretty cool .  I think building a real design app around it will be possible. 


So  you can download the avi of my Windows Workflow Foundation – AJAX based designer application built with Atlas  here – go ahead its only 411k ;-) .  I’d post images – but I’ve posted too many of them lately.  Hopefully I’ll have time to get it done before TechEd next week. 


Anyone who is coming to TechEd – stop by the TLC Workflow booth – that is where I will be spending most of my time when not going to sessions or doing my session.  My session will be on Building Custom Activities with WF.  You can see the time here – http://www.msteched.com/content/sessions.aspx (you can find it by searching for Workflow – there are going to be a number of great talks you should attend if you are interested in learning more about WF).