Syringe.Net.Nz
Irregular Injection of Opinion
RSS 2.0|Atom 1.0|CDF

 Wednesday, September 14, 2005
WWF Hosts, Services and Event Driven Activities

One of the fundamental things you'll need to get your head around when you start playing with workflows is how to go about getting stuff out of, but more importantly into your executing workflow. Here's my 30 second synopsis......

1. Your workflow runs inside a runtime engine.
2. All of your communications from the outside world will come to you via services provided by your host. In addition, in many cases your communications with the outside world will be sent by way of services provided by your host.

This is basically the provider pattern in action and it's an important concept to grasp... here's an example of why.

Say you build a workflow that manages registrations for your user group events via email. The logic is obviously going to be pretty simple, receive registration emails, send confirmations etc.... Your workflow declarativly defines the logic of what should happen in the sequence. Your workflow contains EventSink activities e.g. ReceiveEmail that allow your eworkflow to receive inbound mail. Try, as much as you can, to think of these EventSink activities in their abstract form. That is, your activity represents a mechanism by which your workflow receives an email but, as far as is possible, doesn't mandate or specify too much concrete implementation as to how that is delivered. The actual mechanics of how it does this will often depend on where your workflow might be running- e.g. You would probably receive the email in a different way depending on whether you are running your workflow in Outlook or on a server hosted in IIS. If we want to be able to use exactly the same Workflow definition, with exactly the same Activities then we need some sort of indirection mechanism to seperate the logical concept of ReceiveEmail with the actual concrete implementation of how we do it.

So let me give you an example. You have an activity that represents receiving an email. This is an abstract concept. You then create a workflow definition (in code or XOML/XAML) that uses this activity. You then host this workflow in a couple of different hosts. When you set up each of the hosts you can construct a different service type to service you ReceiveEmail activity depending on where you are running the host. When it is running, your activity is going to ask the runtime to provide it with a service that implements a certain known .NET Interface type. Thus you could have two different services that use two different email receipt mechanism, one for a desktop host and one for a server host. Through this mechanism you achieve the indirection that enables us to use the same delcarative business logic definition (the workflow) in a number of differnt contexts which may have markedly different requirements.

 

Windows Workflow|Wednesday, September 14, 2005 8:33:02 PM UTC|Comments [6]|    
All ABout WWF- No not the wrestling stupid!

All About WWF
SO Windows Workflow Foundation shipped today. We've been kicking it around for a bit now.

WWF is going to be the worflow engine for windows. It basically allows you to declarativly stitch together application logic into worflows. Not only does it support your typical 'Biztalk style' sequential workflow types but it also allows you to build state machine type workflows. You can either write them in code or.... wait for it..... you can declare them in XAML (though it's called XOML in the current drop). What this means is you could potentially stictch together a whole application out of components in just XML. Avalon would form the UI and WWF could be used to provide a state based execution engine. Slap a nice GUI UI around it and you've got a high productivity app builder that any old BA can use.

I'm going to post a bit over the next few days about some of the things that I've learnt around WWF thus far and some of the cool ideas that I've got for WWF.

I'll post some screen shots tonight once I'm back on my dev machine.

.NET | Windows Workflow|Wednesday, September 14, 2005 8:28:38 PM UTC|Comments [916]|    
 Tuesday, September 13, 2005
Coolest New Tech @ PDC TOday

Was the new Linq namespace which is the unified data query namespace.

Will post more on it once I've found all the details but should be up on MSDN today.

.NET|Tuesday, September 13, 2005 9:20:38 PM UTC|Comments [3]|    
MS Office 12 - Otago Univeristy Student Edition....

Sitting in the Office 12 session here @ PDC....

THe new Office UI has.... wait for it.....

'Chunks' and 'Floaties'...... sounds like what you'd see after a big night on Castle St.

The Office UI has changed a whole heap. There are no longer any menus except File.

Yes you heard right. NO MORE MENUS.

Everything is driven from either the new tab based Ribbon Toolbar which is made up of Chunks. Or by mousing over 'Floaties' that are like toolbar type smart tags.

.NET|Tuesday, September 13, 2005 9:12:20 PM UTC|Comments [1]|    
 Monday, September 12, 2005
Haven't Posted To Sacreligion For A While...

But Seth Veale, one of my crew in Dunedin sent me this

http://www.venganza.org/

Sacrilegion|Monday, September 12, 2005 12:03:41 AM UTC|Comments [654]|    
 Wednesday, September 07, 2005
This One Is For Casey!

Hooters is coming to New Zealand.....

I look forward to it being added to his wings tour next time around.

Human Aggregation|Wednesday, September 07, 2005 10:48:52 PM UTC|Comments [4]|    
 Tuesday, September 06, 2005
To Target Or Not To Target..... That Is The Question....

OK... so according to the great Labour Party, Tax Cuts (aka. Working for Families) should be targetted, abeit to the level that sprog popping Catholics on $120k will get some of the goodies.

But, Health funding (doctor subsidies) and Education funding (Student loan interest) should be spread around as broadly and thinly as possible.

This is complete madness.....

I say we give everyhone in NZ a bit more of their money back- in recognition of the fact that we work our asses off to earn it in the first place. And, I also reckon that if we're going to spend an extra $400 million on tertiary education then it should be spent on people who are genuinely bright and hardworking and who may come from a background that might otherwise prevent them from undertaking advanced study. It should not be spent on families who'll really just se it to reduce the mortgage on their 6th investment property.

This election REALY is about a difference in ideology. Don't let anyone tell you it's not. 

Politics|Tuesday, September 06, 2005 9:25:02 PM UTC|Comments [1234]|    
Casting Strings to SqlDbType compatible types at runtime

I HATE doing monkey work and had the pleasure of such this afternoon.....

So herewith a switch statement that casts strings appropriatly for most SqlDbType type parameters.

string nodeValue = node.Value;

switch (prm.SqlDbType)

{

case SqlDbType.BigInt:

prm.Value = Int64.Parse(nodeValue);

break;

case SqlDbType.Bit:

prm.Value = Boolean.Parse(nodeValue);

break;

case SqlDbType.Char:

case SqlDbType.NChar:

case SqlDbType.NVarChar:

case SqlDbType.VarChar:

prm.Value = LeftStr(nodeValue,prm.Size);

break;

case SqlDbType.DateTime:

case SqlDbType.SmallDateTime:

prm.Value = DateTime.Parse(nodeValue);

break;

case SqlDbType.Decimal:

case SqlDbType.Money:

case SqlDbType.SmallMoney:

prm.Value = Decimal.Parse(nodeValue);

break;

case SqlDbType.Float:

prm.Value = Double.Parse(nodeValue);

break;

case SqlDbType.Int:

prm.Value = Int32.Parse(nodeValue);

break;

case SqlDbType.Real:

prm.Value = Single.Parse(nodeValue);

break;

case SqlDbType.SmallInt:

prm.Value = Int16.Parse(nodeValue);

break;

case SqlDbType.Text:

prm.Value = nodeValue;

break;

case SqlDbType.TinyInt:

prm.Value = Byte.Parse(nodeValue);

break;

case SqlDbType.UniqueIdentifier:

prm.Value = Guid.NewGuid(nodeValue);

break;

}

.NET|Tuesday, September 06, 2005 4:40:54 AM UTC|Comments [16]|    
 Monday, September 05, 2005
Forthcoming Webcast On Workflow

Expat 'softie Paul Andrew has posted a schedule of forthcoming webcasts on Workflow in Windows Applications.

I'm one of the presenters.

Monday: Simple Human Workflow Using EMail
Monday, September 26, 2005

10:00 A.M.–11:00 A.M. Pacific Time 

In this session New Zealand based Regional Director, Chris Auld, will walk attendees through a simple worked example of the use of SMTP email as part of a workflow solution. Chris will demonstrate how to create custom activities to query Active Directory to retrieve user data, send email and finally wait for email responses to continue the workflow process. The code intensive session will give users taking their first steps with workflow a good grounding in some of the key extensibility concepts.

Now that is REALY early for you kiwis but it would be GREAT to see you there..... I'll post a bit more about workflow stuff after PDC :-)

.NET|Monday, September 05, 2005 12:49:08 AM UTC|Comments [1]|    
 Sunday, September 04, 2005
Hotel Review: Sky City Grand

Bless them all, Microsoft put us up in the new Sky City Grand Hotel for Tech Ed this year.
Thought I'd pen a quick review of my thoughts on the place. I was there for 6 nights - had sessions on Fri, Tue and Wed.

General thoughts are that it was a bloody good pad. Room was comfortable, king size bed, seperate bath AND shower.
There was broadband in the room but I thought the cost was exorbitant going on extortionate. $33 per day is a bit rich in my mind.
The Gym was fantastic. A full suite of brand new equipment.
2 Treadmills, 2 Exercycles, 1 Cross Trainer, 1 Reclined Bike. All these were fancy new Technogym units so they integrated with my Polar HRM strap and also had built in Polar Own Zone adaptive training. i.e. resistance changes to keep you in zone.
Good set of weights machines including a lat machine, bench press machine and a more general cable machine. For legs they had quad and hamstring machines. I couldn't get the hamstring one to work- but I think that was ignorance as much as anything.
It would have been nice if they'd had a few more larger size dumbells- they topped out @ 10kg.
Anyway had a few good sessions in the gym.

Had room service a couple of times. Top quality but a bit rich and hard to spot the health options. My mussel chowder was VERY creamy and the corn fritters I ordered were done in a deep fried 'bannana fritter' style. Well presented, top quality, but a coronary waiting to happen.

Travel|Sunday, September 04, 2005 9:23:02 PM UTC|Comments [2]|    
Holy Smoke: People Actually Read My Blog

Seems that at east some people read my blog.... I was in the top 10 referrers to DPFs blog this month.

Not sure about others but it's where I go for my NZ news while traveling... :-) Missed the whole PM on the Plane thing last week as I was coming back from BNE at the time.

Human Aggregation | Politics|Sunday, September 04, 2005 9:01:03 PM UTC|Comments [200]|    
 Thursday, September 01, 2005
ARC312 Tech Ed Auckland

Herewith the:

.NET|Thursday, September 01, 2005 4:05:44 AM UTC|Comments [1040]|