locked
Create my "first" 4.0 workflow RRS feed

  • Question

  • Hi,

    I'm pretty confident with WF I started use a year ago. Today, I downloaded the beta 2 of VS2010 and tried to test new features. I was stopped in my try even before creating the project. I should have missing something because I don't find which project I should create.

    With fx 3.5 I used either Sequential/State Machine library project, plus another project of my choice (mainly ASP.Net).
    With fx 4.0, I see only 4 available projects:
    - Activity Designer Project
    - Activity Library
    - Workflow console application
    - WCF workflow service application

    none of them seems to be what I'm looking for and I don't understand where went StateMachine/Sequential WF projects. Which kind of project should I create to create a workflow assembly? It seems that "Activity library" can do what I want but how to put states inside a workflow?

    Besides, I tried to create a WF Console project. The new project contains Program.cs and workflow1.xaml. Here, were I open the designer, it's empty and I see the message "drap activities here" but I cannot drop any activity except "Termination" and FlowChart. I presume FlowChart is the core activity of WF 4.0. Is there any other "root" activity?

    Thanks
    Sunday, November 1, 2009 10:06 PM

Answers

  • Hi,

    There are a couple of things here.  You can use either Activity Library or Workflow Console Application.  The empty space should be able to contain any activity (in v1 we had Sequence & StateMachine as the two roots), but in wf4 you can use any activity as a root.  You should be able to drag a sequence out, or an If, or a While if you want.  So, really, any activity can be the "root" activity.

    With regards to States and State Machine, in vs2010 and .NET 4 we will not ship a state machine on the wf4 model.  You can find more details about that in this blog post: http://blogs.msdn.com/endpoint/archive/2009/05/01/the-road-to-4-wf-changes-between-beta-1-and-ctp.aspx 

    You can find more details about state machine migration options here (go to the bottom and find the State Machine Migration guidance docx file) http://www.microsoft.com/downloads/details.aspx?FamilyID=bd94c260-b5e0-4d12-93ec-53567505e685&displaylang=en

    Hope this helps,

    matt

    Program Manager -- wf designer -- http://blogs.msdn.com/mwinkle
    Monday, November 2, 2009 1:10 AM

All replies

  • Hi,

    There are a couple of things here.  You can use either Activity Library or Workflow Console Application.  The empty space should be able to contain any activity (in v1 we had Sequence & StateMachine as the two roots), but in wf4 you can use any activity as a root.  You should be able to drag a sequence out, or an If, or a While if you want.  So, really, any activity can be the "root" activity.

    With regards to States and State Machine, in vs2010 and .NET 4 we will not ship a state machine on the wf4 model.  You can find more details about that in this blog post: http://blogs.msdn.com/endpoint/archive/2009/05/01/the-road-to-4-wf-changes-between-beta-1-and-ctp.aspx 

    You can find more details about state machine migration options here (go to the bottom and find the State Machine Migration guidance docx file) http://www.microsoft.com/downloads/details.aspx?FamilyID=bd94c260-b5e0-4d12-93ec-53567505e685&displaylang=en

    Hope this helps,

    matt

    Program Manager -- wf designer -- http://blogs.msdn.com/mwinkle
    Monday, November 2, 2009 1:10 AM
  • Hi Matt,

    Thx for your answer. I'll read ASAP your links :)
    Monday, November 2, 2009 7:34 AM
  • Hi Louis,


    I did a short webcast on this:

    http://www.cloudcasts.net/ViewWebcast.aspx?webcastid=2521462414723599439

    It should take you through the basics and get you up and running.

    Regards,

    Alan



    www.CloudCasts.net - Community Webcasts Powered by Azure
    Monday, November 2, 2009 3:27 PM