State Machine Activity Pack and ADO.NET Activity Pack CTP1 Release now Available

For the last year I’ve had to say “Sorry we don’t have the State Machine in WF4.”  If you are a fan of the state machine I’ve got good news.  Today the team is releasing the first CTP of a couple Activity Packs on CodePlex.  To give them a spin, just download from CodePlex and check out the user guide.

State Machine Activity Pack

clip_image001

After installing, you get some new activities in the toolbox that allow you to create a state machine.

clip_image001[5]

The State Machine supports composite states and all sorts of really cool stuff.  I’m just getting ready to take a 2 hour flight back to Seattle so you know what I’m going to do on the plane…

I’ll have a screencast on endpoint.tv available for this soon.

ADO.NET Activity Pack

In the hands on labs for Workflow you may have noticed that when I wanted to update the database I used a CodeActivity<T> and wrote some Entity Framework code.  That was because there was no set of activities for updating a database.

Now we have a simple set of activities for doing ADO.NET calls.

  • ExecuteSqlQuery activity allows you to query a database using SQL statement or stored procedure and process the query result.
  • ExecuteSqlQuery<T> activity allows you to get a collection of objects from the query result to be used in the workflow.
  • ExecuteSqlNonQuery activity allows you to modify database using SQL statement or stored procedure, such as INSERT, UPDATE and DELETE.

For example, if you have a query to return a list of suppliers you can use ExecuteSqlQuery<T>

ExecuteSqlQuery

Next you configure the connection

conn

Then you define the query you want to execute

query

Then you define how to turn the query result into something you want to use

record

Can’t wait to try this one out – I’ll have more for you later.  Got to catch a plane now – hope my battery holds up!