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
After installing, you get some new activities in the toolbox that allow you to create a state machine.
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>
Next you configure the connection
Then you define the query you want to execute
Then you define how to turn the query result into something you want to use
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!
Comments
Anonymous
April 21, 2010
The comment has been removedAnonymous
April 29, 2010
Where can I get some more info on persisting all these bits? I want to have a simple workflow which each activity is a "Person" and they set a state to Approve or Reject (and close the workflow on a reject) ...I'm totally stumped where to go to learn this :)Anonymous
April 29, 2010
@Steve - persist what bits? Persist the workflow or persist the person in the database?Anonymous
May 03, 2010
@Steve - there is a user guide of this state machine and ADO.NET activity athttp://wf.codeplex.com/releases/view/43586 and http://wf.codeplex.com/releases/view/43585. Take a look.